Dark Mode

9,581 views

11 votes

Consider the following statements.

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

Which of the above statements is/are TRUE?

- Ⅰ only
- Ⅱ only
- Both Ⅰ and Ⅱ
- Neither Ⅰ nor Ⅱ

20 votes

Best answer

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.

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.

1 vote

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.

2

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

See: https://gateoverflow.in/3078/proof-regarding-infinite-union-intesection

So D is correct.