Consider the following statements.

I. If L_{1} ∪ 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?This question was previously asked in

GATE CS 2020 Official Paper

Option 4 : Neither I nor II

NIC Scientist B 2020: Full Mock Test

2701

120 Questions
120 Marks
180 Mins

__Statement I:__ FALSE

If L_{1} ∪ L_{2} is regular, then neither L_{1} nor L_{2} needs necessarily be regular.

Example:

Assume L_{1}= {a^{n} b^{n}, n ≥ 0} over the alphabet {a, b} and L_{2} be the complement of L_{1}.

Neither L_{1 }nor L_{2} is regular (both are DCFL) but L_{1} ∪ L_{2}= {a^{n} b^{n}} ∪ {a^{n} b^{n}}^{c} = (a + b)^{* }is regular.

__Statement II:__ FALSE. The infinite Union of regular languages is not regular.

Example:

Given alphabet {a, b}.

L_{1}= {ε}

L_{2}= {ab}

L_{3}= {aabb}

L_{4}= {aaabbb}

:

:

L = L_{1} ∪ L_{2} ∪ L_{3 }∪ L_{4} …

Each of the above are regular but their infinite Union gives L_{1}= {a^{n} b^{n}, n ≥ 0} which is not regular but DCFL.

**Note:**