Prove that the language L = {a^(m+n) b^m a^n | m, n ≥ 0} ∪ {a^m b^n a^(m+n) | m, n ≥ 0} is not regular [duplicate]

In general, how can we go about proving that union of two languages as non regular. In this case, the individual languages can be proved as non regular using pumping lemma. How can we apply pumping lemma to union of two languages ?

marked as duplicate by Raphael♦Feb 6 '14 at 10:25

Regular languages are closed under finite intersection, use that to your advantage. In this case, the reason the language isn't regular is because it has a $K = \{a^n b^n | n \geq 0 \}$ hidden inside it, pull it out using a regular language as a filter. More explicitly, notice that $K = L \cap a^*b^*$.