Home › GATE CSE › computerscience › Theory of Computation › The PUMPING LEMMA for regular languages states t…
The PUMPING LEMMA for regular languages states that for any regular language $L$, there exists a pumping length $p$ such that every string $s \in L$ with $|s| \geq p$ can be DIVIDED into $s = xyz$ where
A$|xy| \leq p$, $|y| \geq 1$, AND $xy^i z \in L$ for all $i \geq 0$
B$|x| \geq |y|$, $|y| \geq |z|$, AND $xyz \in L$
C$|s| = p$ exactly, with $y$ being any single character
D$|x| = |y| = |z| = p/3$
Answer & Solution
Correct answer: A. $|xy| \leq p$, $|y| \geq 1$, AND $xy^i z \in L$ for all $i \geq 0$
1. The Pumping Lemma is a TOOL for proving languages NOT regular. Its statement:
2. For every regular language $L$, there exists a 'pumping length' $p \geq 1$ such that every string $s \in L$ with $|s| \geq p$ can be written as $s = xyz$ satisfying:
- $|xy| \leq p$ (the chosen prefix is short)
- $|y| \geq 1$ (the pumped portion is non-empty)
- For all $i \geq 0$, $xy^iz \in L$ (pumping y up or down keeps you in L)
3. APPLICATION: to prove $L$ is NOT regular, find a string $s \in L$ such that NO division satisfies all three conditions for any $p$.
4. Famous proof: $L = \{a^n b^n\}$ is not regular. Take $s = a^p b^p$. Any division puts $y$ in the $a$-prefix; pumping $y$ creates more $a$'s than $b$'s — outside $L$.
5. Options B, C, D mis-state the lemma.
_Source: Jeff Erickson, "Models of Computation", §2.10 (The Pumping Lemma)._
Related questions
Which class of grammars generates ALL recursively enumerable languages?What is a LEFTMOST DERIVATION?Which of the following languages is CONTEXT-FREE?Consider the grammar $S \to (S) \mid SS \mid \varepsilon$. The language generated isEvery regular language is also context-free. The PROOF construction isThe CYK algorithm parses a CFG in CNF. Its time complexity for a string of length $n$ isA LEFT-RECURSIVE rule in a CFG has the form $A \to A\alpha$ for some non-empty $\alpha$. WContext-free languages are CLOSED under which of the following operations?