Formal Languages, Automata and Computability: WWW - Cs.cmu - Edu/ Emc/flac09
Formal Languages, Automata and Computability: WWW - Cs.cmu - Edu/ Emc/flac09
FORMAL LANGUAGES,
AUTOMATA AND
COMPUTABILITY
www.cs.cmu.edu/~emc/flac09
INSTRUCTORS
Edmund Clarke
Will Klieber Yi Wu
Grading
Exams: 50%
- Final Exam: 25%
- Midterm Exam: 25%
Homework: 45%
Class Participation: 5%
Attendance is required.
HOMEWORK
Homework will be assigned every Thursday
and will be due one week later at the
beginning of class
WAYS OF THINKING
PART 2
Computability Theory:
Turing Machines, decidability, reducibility, the arithmetic hierarchy, the
recursion theorem, the Post correspondence problem.
PART 3
Complexity Theory and Applications:
time complexity, classes P and NP, NP-completeness, space complexity
PSPACE, PSPACE-completeness, the polynomial hierarchy, randomized
complexity, classes RP and BPP.
Mathematical Models of Computation
(predated computers as we know them)
PART 1
Automata and Languages: (1940’s)
finite automata, regular languages, pushdown automata, context-free
languages, pumping lemmas.
PART 2
Computability Theory: (1930’s-40’s)
Turing Machines, decidability, reducibility, the arithmetic hierarchy, the
recursion theorem, the Post correspondence problem.
PART 3
Complexity Theory and Applications: (1960’s-70’s)
time complexity, classes P and NP, NP-completeness, space complexity
PPACE, PSPACE-completeness, the polynomial hierarchy, randomized
complexity, classes RP and BPP.
This class will emphasize PROOFS
Easy to understand
Correct
Suppose A {1, 2, …, 2n} with |A| = n+1
TRUE
LEVEL 1
HINT 1:
THE PIGEONHOLE PRINCIPLE
If you put 6 pigeons in 5 holes
then at least one hole will have
more than one pigeon
LEVEL 1
HINT 1:
THE PIGEONHOLE PRINCIPLE
If you put 6 pigeons in 5 holes
then at least one hole will have
more than one pigeon
LEVEL 1
HINT 1:
THE PIGEONHOLE PRINCIPLE
If you put 6 pigeons in 5 holes
then at least one hole will have
more than one pigeon
HINT 2:
Every integer a can be written as a = 2km,
where m is an odd number
LEVEL 2
PROOF IDEA:
Given: A {1, 2, …, 2n} and |A| = n+1
states
0 q1 1
0,1
1
q0 q2
0 0
1
q3 states
L(M) = {0,1}*
0 0
1
q0 q1
1
0,1
1 0
0 0 1
q q0 q00 q001
1
A language L is regular if it is
recognized by a deterministic
finite automaton (DFA),
i.e. if there is a DFA M such
that L = L (M).
L = { w | w contains 001} is regular
Proof: Let
M1 = (Q1, Σ, 1, q01, F1) be finite automaton for L1
and
2
M2 = (Q2, Σ, 2, q0, F2) be finite automaton for L2
F = { (q1, q2) | q1 F1 or q2 F2 }
0
0
1
q0 q1
1 1
1
0
p0 p1
0
1
q0,p0 q1,p0
1
0 0
0 0
1
q0,p1 q1,p1
1
Intersection THEOREM
Given two languages, L1 and L2, define
the intersection of L1 and L2 as
L1 L2 = { w | w L1 and w L2 }