1
$\begingroup$

I know that if you have two regular languages $L$ And $M$ then they are closed under intersection, that is the intersection is also regular.

However, if you have two non regular languages L and M, is it possible that their intersection is regular? I came across a certain example and it seems this is the case but seemed counter intuitive so I wanted to see if that was possible.

1 Answers 1

0

It is indeed possible. Even if the two languages L and M are complicated it may be the case that their intersection is trivial. In particular if they do not share the same alphabet. For example if L is $a^nb^n$ and $M$ is $c^nd^n$ the intersection is empty (thus regular).