Consider the following statements.
I. If L₁ ∪ L₂ is regular, then both L₁ and L₂ must be regular. II. The class of regular languages is closed under infinite union.
Which of the above statements is/are TRUE?
- AI only
- BII only
- CBoth I and II
- Neither I nor II
Explanation
I is FALSE: a non-regular language L and its complement (also non-regular in general) can still union to something regular — regularity of a union says nothing about the regularity of the individual pieces (a classic counterexample: split any non-regular language and its complement arbitrarily so neither half alone is regular, yet their union is Σ*, which is regular). II is FALSE: regular languages are closed only under FINITE union — an infinite union of regular (even singleton) languages can produce any language whatsoever, including non-regular ones (e.g. {aⁿbⁿ} is the infinite union of the singleton regular languages {aⁿbⁿ} for each n). So neither I nor II.
Source: GATE CS 2020 (2020)
This question is part of a 15-day revision cycle — sign in and Project Forge will bring it back the day before you'd forget it.