GATE / CS ARCHIVE

GATE CSE 2025 SET 2 / QUESTION 30

GATE CSE 2025 Set 2 Q30

Theory of Computation · Closure Properties & Language Hierarchy · Full GATE CSE 2025 Set 2 paper

GATE 2025 Set 2, Q30 1 mark · MSQ
Report issue

Closure Properties & Language Hierarchy

Question 30, GATE 2025: Match language families (i) context-free, (ii) recursive/decidable, (iii) regular with properties (a) closed under union, (b) not closed under complementation, (c) closed under intersection. Select every option whose three matches are all valid.
A. i→a, ii→b, iii→c.
B. i→b, ii→a, iii→c.
C. i→b, ii→c, iii→a.
D. i→a, ii→c, iii→b.
Tap to enlarge
Select all that apply
Answer & solution

Official answer: B, C

Context-free languages are closed under union: introduce a new start symbol that chooses either grammar. They are not closed under complementation. One way to understand the latter fact is that closure under both union and complement would, by De Morgan's law, imply closure under intersection, which CFLs do not have.

Decidable languages are closed under union and intersection because both deciders halt: run them and combine their Boolean answers with OR or AND. They are closed under complement by swapping acceptance and rejection. Regular languages have all three closures: product automata handle union/intersection, and swapping accepting states in a complete DFA handles complement.

Now inspect each full option. A incorrectly assigns nonclosure under complement to decidable languages. B correctly assigns CFL nonclosure, decidable union closure, and regular intersection closure. C correctly assigns CFL nonclosure, decidable intersection closure, and regular union closure. D incorrectly denies complement closure to regular languages. Therefore B and C are correct. This is not a one-to-one matching puzzle: a family can possess more than one listed closure property.

Original paper, page 24 · Answer key