Nonregular Languages
Learn to use the pumping theorem to prove a language is nonregular.
Examples of nonregular languages
We’ll use the pumping theorem to prove that the following languages are not regular:
- The language .
- The language of palindromes.
- The language of repeated halves, .
- The language over of balanced parentheses.
- The language .
- The language PRIME = , where is a prime number.
- The language .
The language
We’ll now show that the language is not regular by showing that it does not satisfy the pumping theorem.
Intuitively, we can surmise that is not regular because a finite machine has no way to track an arbitrarily large number of 's to match the subsequent 's. We can only go so far before we run out of states. Consider the diagram below accepting the singleton language . (Once again, we omit the jail state for readability.)
Get hands-on with 1400+ tech skills courses.