9,581 views

Consider the following statements.

1. If $L_1 \cup L_2$ is regular, then both   $L_1$ and $L_2$ must be regular.
2. The class of regular languages is closed under infinite union.

Which of the above statements is/are TRUE?

1. Ⅰ only
2. Ⅱ only
3. Both Ⅰ and  Ⅱ
4. Neither Ⅰ nor  Ⅱ

$\color{red}{\text{Find Detailed Video Solution Below}}$ $\color{BLACK}{\text{ , With ALL Variations:}}$

https://youtu.be/tpPAYwgZf2o

Keeping $L_2$ as $\Sigma^*,$ what ever may be $L_1,$, we get a Regular language.

So, statement I is wrong.

If regular languages are closed under infinite union, then $L=\{a^n.b^n | n>0 \}$ must be regular as it is equal to $\{ab\} \cup \{aabb\} \cup \{aaabbb\} \cup \ldots$

So, statement II is wrong.

Option D is correct.

Correct me if wrong, a^n b^n is not regular
a^n b^n is regular for n=0, it is simple as a*b*, which is regular.

a^n b^n is not regular for n>0. We need infinite memory for a^n b^n | n>0.
perfect solution, I too thought like this...

L1 is $\sum$*, L2 is string having equal number of a and b.

L1 U L2 is $\sum$* , which is regular, but L2 is CFL.

Regular language is closed under finite union but not closed under infinite union.

So D is correct.

by

I. is false since (a+b)* is regular but  L1 = (a+b)* and L2 ={$a^{n} b^{n} | n>=0$}

II. is false since  ab, aabb, aaabbb ........  (all of them is regular language) make language DCFL where each one of them is regular