Click here to load reader
Jul 18, 2018
Formal Languages, Automata,
Computation
Klaus Sutner
Carnegie Mellon University
Fall 2017
1 Administrivia
FLAC
Web & Piazza 3
http://www.cs.cmu.edu/~flac
http://piazza.com/ 15-453
http://www.cs.cmu.edu/~flachttp://piazza.com/
Piazza 4
. . . is great
Its a good way to share information and get answers withoutterrible delays.
. . . sucks
It can be used to avoid work by asking lots of silly questions, andrelying on others to do all the heavy lifting.
This is an upper lever class, dont play games.
Also, dont repost the same question a dozen times.
Course Staff 5
Prof:Klaus Sutner, [email protected],http://www.cs.cmu.edu/~sutner
TAs:Xiaorong Zhang [email protected] Niu [email protected]
Course secretary:Rosie Battenfelder, [email protected]
[email protected]://www.cs.cmu.edu/[email protected]@[email protected]
Course Material 6
No textbook, but lots of handouts.
Additional material will be posted on the web.
If you absolutely want to have a textbook:
M. SipserIntroduction to the Theory of Computation
Learning Style 7
The topics covered in this course translate into quite a bit ofmaterial. Allocate enough time to deal with this material.
Read the notes, search the net, go to the library, talk to each other,talk to us.
Post on piazza (but make sure to read previous posts first).
One of the desired outcomes of this course is that you know whereto find more information should you ever need it (the lifelonglearning meme).
Samuel Beckett 8
Ever tried. Ever failed.
No matter. Try Again. Fail again. Fail better.
Bureaucracy 9
The usual testing:
homeworks 50% midterm (in-house) 20% final 30%
There are no makeups; if you miss some assessment you can sit foran oral exam.
Bureaucracy II 10
Midterm is in-house, 80 minutes on Oct 19.
Final will be a project (think 8 pages), more later.
Homework is obviously critically important.
Preserving TA Sanity 11
Typeset your solutions to the homework and submit pdf on afs(more on this on Piazza).
If you have extensive conversations with other students about a HW,mention them as collaborators in your submission.
If you use a computer program in your homework, make sure toreference it properly (but do not hand in 50 pages of code).
Lateness 12
You have a total of 5 (five) late days at your disposal; use prudently.
A late day is a discrete atom, with no smaller parts.
Mention lateness in the header of your HW.
Cooperation 13
Lectures will be warm and friendly. Make sure to be an activeparticipant FLAC is not a spectator sport.
You are strongly encouraged to talk about the course material toeach other, the course staff and other students.
This includes discussions of homework problems.
Limits to Cooperation 14
However, even after ample consultation, the work you submit mustbe written entirely by yourself.
List all your consultants on the first page of your homework. Wewill provide a convenient template.
To avoid problems with originality, do not take notes whendiscussing homework problems.
If you write on a board, erase everything in the end.
More on Limits 15
Think of this as being able to copyright your solution: you may havehad conversations about it with other during the problem solvingphase, but the actual work is solely yours. No one should be in theroom when you start writing things up.
Needless to say, you have to be able to explain all the details of yoursolution at any time.
Dont even think about copy & paste (from each other or the web),file sharing, clairvoyance, telepathy, . . .
If you have any questions about policy issues talk to the course staff,preferably some time before you get into trouble.
Yet More on Limits 16
And, of course, all the official university policies apply.
http://www.cmu.edu/academic-integrity/index.html
http://www.cmu.edu/academic-integrity/index.html
Email 17
Some of you may still remember email (a medieval communication tool,predating social networks). If you decide to get in touch via email, use
Subject line:
[FLAC] will miss midterm
or some such. I filter rather aggressively, make sure to have the [CDM]tag.
Wellness 18
Take care of yourself. Do your best to maintain a healthy lifestyle thissemester by eating well, exercising, avoiding drugs and alcohol, gettingenough sleep and taking some time to relax. This will help you achieveyour goals and cope with stress.
All of us benefit from support during times of struggle. There are manyhelpful resources available on campus and an important part of thecollege experience is learning how to ask for help. Asking for supportsooner rather than later is almost always helpful.
If you or anyone you know experiences any academic stress, difficult lifeevents, or feelings like anxiety or depression, we strongly encourage youto seek support. Counseling and Psychological Services (CaPS) is here tohelp: call 412-268-2922 and visit their website athttp://www.cmu.edu/counseling/. Consider reaching out to a friend,faculty or family member you trust for help getting connected to thesupport that can help.
http://www.cmu.edu/counseling/
Wellness II 19
If you or someone you know is feeling suicidal or in danger of self-harm,call someone immediately, day or night:
CaPS: 412-268-2922Re:solve Crisis Network: 888-796-8226If the situation is life threatening, call the policeOn campus: CMU Police: 412-268-2323Off campus: 911
Administrivia
2 FLAC
Formal Languages, Automata, Computation 21
This is the official course title for 15-453.
Mostly a historical artifact, a better title would be
CAFL: Computation, Automata, Formal Languages
Well start with the general theory of computation, then dive all the waydown to finite state machines, and then talk a bit about the Chomskyhierarchy and complexity theory.
The Computational Universe 22
This may sound like just a whole bunch of math.
It is, but this is a CS course: we dont live in the set-theory universe ofmath, we live in the computational universe.
What matters to us is not just the pure mathematical theory, but itscomputational meaning. In particular we want to emphasize algorithms.
As you will see, this makes life much more interesting, but also quitechallenging.
Theory First 23
A (ironic?) fact of history:
The theory of computation predates computers.
In fact, computability theory was closely connected to problems in thefoundations of mathematics in the 1930s, there simply was no computerscience at the time. Bear this in mind, otherwise things may occasionallyseem a bit bizarre.
As it turns out, computability theory is highly relevant to computerscience, but one needs a bit of background to see why.
Early History 24
Early mathematics was very much focused on computation (Plimpton322, about 1800 BCE).
Eratosthenes 25
Around 240 BCE, error may have been as low as 1%. Also calculateddiameter of sun, not as accurate (27 times Earth, in reality 109).
Beginnings of Abstraction 26
Full Abstraction 27
Things changed when the field matured. For example, the mainaccomplishments in mathematics in the 19th century can be summarizedlike so:
complex variables
abstract groups
set theory
While such top ten lists are often contentious, this one is fairlyuncontroversial.
Note that computation is essentially absent, the level of abstraction israther high (logical depth).
Even More Abstraction 28
What Could Go Wrong? 29
Despite all the progress, in the last third of the 19th century a number ofannoying problems came to light.
If Gauss says he has proved something, it seems very probableto me; if Cauchy says so, it is about as likely as not; if Dirichletsays so, it is certain.
Carl Gustav Jacob Jacobi
For example, seemingly intuitive notions in analysis such as continuityand differentiability are much more subtle than they might seem. It isvery, very easy to trip up.
Levels of Trouble 30
paradox para doxa; outside of the doctrine, a misalignment withcommon sense
antinomy anti nomos; against the law, not just a misalignment, butsomething offensive, in need of correction
contradiction contra dicere; to speak against, a direct counterargument,all hell breaks loose (aka inconsistency)
This hierarchy is entirely informal, dont over-interpret.
Weierstrass Monster 31
f(x) =n0
bn cos(anx)
0.5 1 1.5 2 2.5 3
-1.5
-1
-0.5
0.5
1
1.5
2
For 0 < b < 1 and ab > 1 + 3/2, this function is continuous butnowhere differentiable. A mild paradox.
Cantors Work 32
The unit square has the same size as the unit interval.
There are more reals than rationals.
There is an infinite hierarchy of increasing infinities.
Paradoxical, no more.
Remarkably, Cantor was lead to his discoveries by studying Fourieranalysis, a relentlessly applied part of mathematics.
More Trouble in Paradise 33
Burali-Forti
The set of all ordinal numbers.
Russell
S = {x | x / x }
Konig, Richard
The least natural number not definable by