Definition
Pumping Lemma for Regular Languages
(Infinite) regular language have a special property: Every word from a certain length onward can be pumped, i.e. every such word contains a substring that can be repeated arbitrarily often, with the resulting words still belong to the same language.
Let be an infinite regular language. Then there exists a bound (depending only on ) such that for every word with there exist words , such that:
and
A bit more formally:
Example
Positive Example
This is the minimal automaton with 3 states for the language , thus . Let’s pick an arbitrary word, like:
Thus , , . Clearly:
Negative Example
We want to show that if the pumping lemma does not apply to a language , then is non-regular language.
Given a language :
Assume that is regular, i.e. the pumping lemma holds.
Let with . Partition into
Because and the first symbols of are all ‘s, both and consist only of ‘s. So we can write:
and then:
so that:
Consider . The pumping lemma claims that must still be in :;
Here, the number of ‘s is and the number of ‘s is . Since , we have , so:
because words in must have the same number of ‘s and ‘s.
This is a contradiction, which means that the assumption of being regular must be wrong.