- 2072 Kartik
Pumping lemma (CFL): aⁿbⁿcⁿ not CF
Short answer
Assume L is CFL with pumping length p. Choose s = a^p b^p c^p. Since |vxy| ≤ p, vxy misses at least one letter. With i=2, counts of other letters increase, breaking equality. Thus L is not context free.
Using the pumping theorem for context free languages, show that L = {aⁿbⁿcⁿ : n ≥ 0} is not context free.
Pumping lemma for CFLs: if L is context free, there is a constant p such that every s ∈ L with |s| ≥ p can be written s = uvxyz with (1) |vxy| ≤ p, (2) |vy| ≥ 1, (3) uvⁱxyⁱz ∈ L for all i ≥ 0.
Proof that L = { aⁿbⁿcⁿ : n ≥ 0 } is not context free
Assume L is context free, with pumping length p.
- Choose s = aᵖbᵖcᵖ. Then s ∈ L and |s| = 3p ≥ p.
- Let s = uvxyz satisfy the lemma. Since |vxy| ≤ p, the substring vxy cannot contain both an a and a c (between the last a and the first c there are p b's). So vxy has at most two kinds of letters, and some letter among a, b, c does not appear in vxy.
- The letters in v and y come from at most two of a, b, c, and |vy| ≥ 1. Pumping changes the counts of only those letters; the missing letter keeps count p.
- Take i = 2 (pumping up). Because |vy| ≥ 1, at least one letter count increases above p, while at least one letter (the one not in vxy) keeps count exactly p. Hence the counts of a, b, c are not all equal.
- If v or y contains two different letters, uv²xy²z also has letters out of the order a…b…c.
In every case uv²xy²z ∉ L, which contradicts condition (3).
Therefore the assumption is false: L = { aⁿbⁿcⁿ } is not context free.
(It is context sensitive. A single stack can compare two counts, but it cannot check three equal counts, since popping destroys the count.)
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- Pumping lemma (CFL): ww not CF · Theory of Computation, chapter 3
- Pumping lemma: a^(n²) not regular · Theory of Computation, chapter 2 · asked 5×
- Pumping lemma: aⁿb²ⁿ not regular · Theory of Computation, chapter 2 · asked 3×
- Pumping lemma: aⁿbaⁿ not regular · Theory of Computation, chapter 2
- CFGs for L1, L2; L1∩L2 not CF · Theory of Computation, chapter 3
- Pumping lemma: equal 0s and 1s · Theory of Computation, chapter 2 · asked 2×