Asked By : Raphael
Best Answer from StackOverflow
Question Source : http://cs.stackexchange.com/questions/1031
Answered By : Romuald
- The pumping lemma, as exemplified in Dave’s answer;
- Closure properties of regular languages (set operations, concatenation, Kleene star, mirror, homomorphisms);
- A regular language has a finite number of prefix equivalence class, Myhill–Nerode theorem.
To prove that a language $L$ is not regular using closure properties, the technique is to combine $L$ with regular languages by operations that preserve regularity in order to obtain a language known to be not regular, e.g., the archetypical language $I= { a^n b^n | n in mathbb{N} }$. For instance, let $L= {a^p b^q | p neq q }$. Assume $L$ is regular, as regular languages are closed under complementation so is $L$’s complement $L^c$. Now take the intersection of $L^c$ and $a^star b^star$ which is regular, we obtain $I$ which is not regular. The Myhill–Nerode theorem can be used to prove that $I$ is not regular. For $p geq 0 $, $I/a^p= { a^{r}b^rb^p| r in mathbb{N} }=I.{b^p}$. All classes are different and there is a countable infinity of such classes. As a regular language must have a finite number of classes $I$ is not regular.