Pumping Lemma of Regular Languages
The pumping lemma for regular languages is a lemma that describes an essential property of all regular languages. Informally, it says that all sufficiently long strings in a regular language may be pumped—that is, have a middle section of the string repeated an arbitrary number of times—to produce a new string that is also part of the language.
Please remember that we only talk about infinite languages.
Pumping Lemma of Regular Languages and Its Proof
Pumping Lemma states that, if is an infinite regular language, there must exists a pumping length ( is only dependent on the language).
If an integer is a pumping length. For any and , there must exists a way of dividing into,
Where, and .
And , .
This can be proven with regular expression- and is very simple.
Because is infinite, there must exist at least one star, that is,
Where is not empty.
Thus, if matches , matches , matches , we will have the pumping lemma.
Example
We usually use pumping lemma to prove a language is not regular.
For example, we would like to prove,
Is not a regular language.
We assume there exists a pumping length , and assume that this is a regular language.
Pumping lemma tells us that for every string longer than pumping length, there must exists a pumping decomposition. We can take,
We know that a pumping decomposition exists, but we don't know exactly how- it's okay, we can assume,
No matter how decomposes, there are only there cases for .
- contains only , then obviously, , because there will be more than .
- contains only , then obviously, , because there will be more than .
- contains and , then , then
Thus, there doesn't exists such a decomposition.
In conclusion, is not a regular language.