Prove or disprove that languages are regular

1k Views Asked by At

I want to ask a question. How can I prove that languages are regular? Do I need to draw finite automata in order to prove or disprove?

Question: Assume that $L_1$ and $L_1 \cup L_2 \cup L_3 $ are regular languages. Is $L_2L_3$ necessarily a regular language? Prove by construction or disprove by counterexample.

1

There are 1 best solutions below

0
On BEST ANSWER

To prove that a language $L$ is regular, there are 3 ways:

  1. Build a finite (deterministic or non-deterministic) automaton $M$ such that the language accepted by $M$ is equal to $L$;
  2. Build a regular expression for $L$;
  3. Use closure-properties, combine steps 1,2.

As far your question is concerned, there is a trivial solution: let $L_1$ be the set of all strings over the input alphabet, say $\{a\}^*$; now make $L_2L_3$ a non-regular language, for example, $L_2=\{a\}$ and $L_3=\{a^{p-1}: \text{p is prime}\}$.

It might be more interesting to solve the problem with $L_1=\emptyset$; that is, find $L_2,L_3$ such that $L_2 \cup L_3$ is regular and $L_2L_3$ is not regular.