GATE / CS ARCHIVE

GATE CSE 1992 / QUESTION 2(xix)

Closure of context-free languages

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

GATE 1992, Q2(xix) MSQ
Report issue

Closure Properties & Language Hierarchy

Question 2(xix), GATE 1992: Which closures hold for CFLs: union, complement, intersection, Kleene star?
Question 2(xix), GATE 1992: Which closures hold for CFLs: union, complement, intersection, Kleene star?
Tap to enlarge
Select all that apply
Answer & solution

Answer: A, D (no official key was published)

For union, introduce a new start symbol choosing either original grammar. For star, use a new start that produces ε or concatenates one original-language word with another repetition. Hence both operations preserve context-freeness. Intersection does not: {an bn cm} intersected with {am bn cn} gives the non-CFL equal-three-block language. If CFLs were also closed under complement, De Morgan together with union closure would imply intersection closure, contradicting that example. Thus complement and arbitrary intersection fail.

Original paper, page 4