GATE 2020 CS – Question 18
Consider the following statements.
I. If $L_1\cup L_2$ is regular, then both $L_1$ and $L_2$ must be regular.
II. The class of regular languages is closed under infinite union.
Which of the above statements is/are TRUE?
Practise this question in The GATE Grind →
Show answer and explanation
Correct answer: (D) Neither I nor II
Explanation
I is false: $L_1=\{a^nb^n\}$ and $L_2$ its complement give a regular union $\Sigma^*$. II is false: the infinite union of $\{a^nb^n\}$'s singletons is non-regular.