Proving that the given language is non regular

1.1k Views Asked by At

We had a question today as follows:

Let $L$ be a nonregular language and $X$ a finite set of strings from the same alphabet as $L$.

(a) Prove that $L ∪ X$ is nonregular.

(b) Prove that $L - X$ is nonregular.

I have no clue on how to proceed. Can you please help me out on how to prove that a union of languages is regular or not? Thanks!

1

There are 1 best solutions below

0
On BEST ANSWER

This may not be the simplest possible answer, but I came up with this:

$X \setminus L$ is regular, because $X$ is finite. Finite languages are always regular.

Notice that $L = (L \cup X) \setminus (X \setminus L)$. Since we know $X \setminus L$ is regular and that regular languages are closed under set difference and $L$ is nonregular, it's only possible for $L \cup X$ to be nonregular.

For part b: Notice that $L = (L \setminus X) \cup (X \cap L)$. We know that $X \cap L$ is regular, because it's a finite language. Since regular languages are closed under union and $L$ is nonregular, it's only possible for $L \setminus X$ to be nonregular as well.