GATE / CS ARCHIVE

GATE CSE 2020 / QUESTION 8

GATE CSE 2020 Q8

Theory of Computation · Closure Properties & Language Hierarchy · Full GATE CSE 2020 paper

GATE 2020, Q8 1 mark · MCQ
Report issue

Closure Properties & Language Hierarchy

Question 8, GATE 2020: Test I: if L1∪L2 is regular, both L1 and L2 must be regular. II: regular languages are closed under infinite union. Options: A I only; B II only; C both; D neither.
Tap to enlarge
Your answer
Answer & solution

Official answer: D

Worked explanation

Closure under a binary operation gives the forward implication: if both languages are regular then their union is regular. It does not give the converse. For a concrete converse counterexample choose L={an bn:n≥0} over {a,b}, and its complement. L is nonregular; its complement is nonregular because otherwise closure under complement would make L regular. Their union is the regular language {a,b}*. For infinite union, each singleton {an bn} has a finite automaton, but the union over all n is L. Finite union closure cannot be extended to countably many automata by treating an infinite construction as a finite automaton.

Derivation and answer

For I, take a nonregular language L and its complement; their union isΣ*, regular, although neither component is regular. For II, each singleton{an bn} is regular but their union over n≥0 is not. Both assertions are false, D.

Original paper, page 5 · Answer key