Let be a CFL. Then such that satisfying , there exist strings satisfying:
- ,
Using the Lemma to Prove Non-CFL
To show is not a CFL, assume is a CFL and derive a contradiction.
Standard proof structure:
- Assume is a CFL with pumping length .
- Choose a string with .
- Consider all possible decompositions satisfying and .
- Show that for every such decomposition, some for some .
- Contradiction. is not a CFL.
Example
Prove is not a CFL.
Assume is a CFL with pumping length . Choose , so .
Any decomposition with means spans at most 2 of the 3 symbol types (cannot reach from the -block to the -block in characters).
Case 1: lies entirely in . Pumping increases the count of s or s (or both) but not s. The pumped string has unequal counts.
Case 2: lies entirely in . Pumping increases s or s but not s. Unequal counts.
In all cases, . Contradiction. is not a CFL.
Ogden’s Lemma
A generalization of the pumping lemma for CFL. Allows marking “distinguished” positions in . Guarantees or contains at least 1 distinguished position.
Useful when the standard lemma is insufficient to force a contradiction. Every CFL satisfies Ogden’s lemma; it strictly subsumes the pumping lemma.