Overview
Computation, Computers, and Programs CFG/PDA http://www.cs.caltech.edu/courses/cs20/a/ October 25, 2002
1
C A L I F O R N I A I N S T I T U T E O F T E C H N O I L O G Y If this page displays slowly, try turning off the “smooth line art” option in Acrobat, under Edit->PreferencesCS20a: summary (Oct 24, 2002)
- Context-free languages
– Grammars G = (V, T, P, S)
- Pushdown automata
– N-PDA = CFG – D-PDA < CFG
- Today
– What languages are context-free?
- Pumping lemma (similar to pumping lemma for regular
languages)
- Ogden’s lemma
Computation, Computers, and Programs CFG/PDA http://www.cs.caltech.edu/courses/cs20/a/ October 25, 2002
2
C A L I F O R N I A I N S T I T U T E O F T E C H N O I L O G Y If this page displays slowly, try turning off the “smooth line art” option in Acrobat, under Edit->PreferencesRegular languages
- Intuition: if a FA accepts a string that is “long
enough,” it must repeat a state
– But it can’t remember that the state was repeated – So it can be forced to repeat the state over and over
q0 qm qj=qk a1,...,aj aj+1,...,ak ak+1,...,am
Computation, Computers, and Programs CFG/PDA http://www.cs.caltech.edu/courses/cs20/a/ October 25, 2002
3
C A L I F O R N I A I N S T I T U T E O F T E C H N O I L O G Y If this page displays slowly, try turning off the “smooth line art” option in Acrobat, under Edit->PreferencesPumping lemma for regular languages
Lemma (the Pumping Lemma)
- Let L be a regular set.
- There is a constant n s.t. for any z where |z| ≥ n,
then z can be written z = uvw, where – |uv| ≤ n – |v| ≥ 1 – For all i ≥ 0, uviw ∈ L – n is bounded by |Q|