Prove or disprove: If $A$ and $A ∩ B$ are regular, then $B$ is regular.

automataformal-languagesregular-language

I suspect the Myhill–Nerode theorem will come into play, but not certain. If this was a union as opposed to an intersect, I'd be pretty confident that this would be true, but with it being an intersect, I'm less sure (albeit, I may be wrong about that too). I know that the empty language is a regular subset of all non-regular languages (or any language), so I was thinking that maybe if $A$ and $B$ shared only the empty language, then $B$ could be non-regular and this statement would be false.

Best Answer

Disprove: let $A = (ab)^*$, and $B = \{a^n b^n : n \in \Bbb{N}\}$. Recall that $B$ is famously not regular. Then $A \cap B = \{\varepsilon, ab\}$, a finite language, which is hence regular.

EDIT: Come to think of it, your thoughts lead to a solution that is a bit more elegant. If we just take $A = \emptyset$ and $B$ to be any non-regular language, then $A \cap B = \emptyset$ is regular.