Computer science Automata and formal languages Lemma
Pumping lemma for regular languages
Builds on Regular languageDeterministic finite automatonString
Statement
Let be a regular language. Then there is an integer such that every string with length can be written as with and:
- ;
- ;
- for every integer .
Remarks
Take a DFA for and let be its number of states. While reading the first letters of , the automaton visits states, so by the pigeonhole principle some state repeats. Let be the nonempty piece read between the two visits; this loop can be skipped or repeated any number of times without changing the final state. Example of use: suppose were regular with constant , and take . By clause 2 the piece lies inside the 's, so has more 's than 's, which is a contradiction. The converse fails: there are non-regular languages that satisfy the conclusion, so the lemma can only show that a language is not regular.
Going deeper
For a student
The lemma is the usual first tool for proving that a language is not regular. One assumes regularity and picks a clever word of length at least . Then one shows that every allowed split leads to a pumped word outside the language. It is often combined with closure properties to reduce a hard case to a known one. Since the condition is only necessary, the Myhill–Nerode theorem, which gives a characterization, is needed in some cases. A similar pumping lemma holds for context-free languages, with two pumped pieces.
Reading path
To understand this page from the ground up, read these 4 pages in order. The foundations come first.
Show the path as a graph
- no evidence level
- Deterministic finite automaton concept
- Regular language concept
- String concept
- Pumping lemma for regular languages statement
Where this leads
4 pages build on this one.
Further reading
About this page
| Tag | CBR9WAGZGZ |
|---|---|
| URI | m2://CBR9WAGZGZ |
| Kind | statement, lemma |
| Writing | W0 stub |
| MSC | 68Q45 |
| Status | This copy of the site has no build data. Run m2 status CBR9WAGZGZ. |
| About | Regular language |
| Uses | Regular language, Deterministic finite automaton, String |
| Same as | |
| Changed | 3 November 2026 |
Markdown · JSON · Edit on GitHub
What this page needs for W1
- an inventory row: the row of the inventory that the node accounts for (0 of 1)
- a source with a locator (0 of 1)
The writing levels say how complete the text of a page is. They do not measure its truth.