In a CS course I\'m taking there is an example of a language that is not regular:
{a^nb^n | n >= 0}
I can understand that it is not regu
Assume L = {anbn | n ≥ 0} is regular. Then we can use the pumping lemma.
Let n be the pumping lemma number. Consider w = anbn∈L. The pumping lemma states that you can divide w into xyz such that xy ≤ n, y ≥ 1 and ∀ i∈ℕ0: xyiz∈L.
Using the first two rules we can easily see that no matter how we divide w into xyz, y will always consist of only as and that it will contain at least one such letter. With rule 3 we conclude that an-kbn∈L where k = |y| ≥ 1. But n-k ≠ n violates the definition of L, so that an-kbn∉L. This is a contradiction