[Math] Proving that $L= \{a^nb^n, n\ge 0\}$ is not a regular language.

automataregular expressionsregular-language

The questions i'm 'stuck' on is: Let $\Sigma = \{0,1,2\}$ be the alphabet, and let $L$ be the collection of all the languages that contains only words that have even length. Prove that there are languages in $L$ that are not regular.

So the way i looked at this question in by searching an iregular language, That still stands in the conditions of $L$. Then I saw this language $L_1=\{a^nb^n \mid n\ge0\}$ as an example of a nonregular language. But it didn't have any explanation. [Except that fact I actually couldn't find a regular expression for that one].

How can i actually prove that something isn't a regular language?

Thanks.

Best Answer

Use the pumping lemma and show that you can't pump any word of the form $a^nb^n$ for any $n$.