- 2072 Chaitra
Pumping lemma: aⁿbaⁿ not regular
Short answer
If L is regular, there exists p such that any w∈L with |w|≥p can be split w=xyz with |xy|≤p, |y|≥1 and xy^iz∈L for all i. For L={a^n b a^n}, assume regular with p, take w=a^p b a^p. Since |xy|≤p, y=a^k (k≥1). Then xy^2z = a^(p+k) b a^p, not of form a^n b a^n, contradiction, so L not regular.
Define the pumping lemma for regular languages. Use it to show that L = {aⁿbaⁿ : n = 0, 1, 2, ...} is not regular.
Pumping lemma
If L is regular, there is an integer p ≥ 1 such that every w ∈ L with |w| ≥ p can be split as w = xyz where
- |xy| ≤ p,
- |y| ≥ 1,
- xyⁱz ∈ L for all i ≥ 0.
Proof that L = {aⁿbaⁿ : n ≥ 0} is not regular
Assume L is regular with pumping length p.
- Take w = aᵖbaᵖ ∈ L. |w| = 2p + 1 ≥ p.
- Write w = xyz with |xy| ≤ p and |y| ≥ 1. The first p symbols are all a, so y = aᵏ with 1 ≤ k ≤ p (y lies inside the first block of a's).
- Take i = 2: xy²z = a^(p+k) b aᵖ.
- This string has p + k a's before the b and only p after it. Since k ≥ 1, the two counts are different, so it is not of the form aⁿbaⁿ. Thus xy²z ∉ L.
This contradicts the pumping lemma. Therefore L = {aⁿbaⁿ} is not regular. ∎
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- 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 (CFL): ww not CF · Theory of Computation, chapter 3
- Pumping lemma (CFL): aⁿbⁿcⁿ not CF · Theory of Computation, chapter 3
- Pumping lemma: equal 0s and 1s · Theory of Computation, chapter 2 · asked 2×
- Pumping lemma: a^p, p prime · Theory of Computation, chapter 2 · asked 2×
- Regular expressions and regular languages · Discrete Structure, chapter 2
- Closure properties of regular languages · Discrete Structure, chapter 2 · asked 2×