union of non-regular language and finite language

1.2k Views Asked by At

Is the union of a non-regular language and a finite language necessarily non-regular?

My suspicion is that it is, and I am yet to think of a counterexample, but am not sure how one might set out a proof.

1

There are 1 best solutions below

0
On BEST ANSWER

Say $L_1$ is nonregular and $L_2$ is finite and so regular. Note that $L_1\cap L_2$ is also regular.

If $L_1\cup L_2$ were regular then we would have $$L_1=((L_1\cup L_2)-L_2)\cup (L_1\cap L_2)$$ so that $L_1$ is also regular. Therefore $L_1\cup L_2$ must be irregular.