GATE / CS ARCHIVE

GATE CSE 1999 / QUESTION 2.4

False context-free closure claims

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

GATE 1999, Q2.4 2 marks · MSQ
Report issue

Closure Properties & Language Hierarchy

Question 2.4, GATE 1999: L1 is context-free and L2 regular. Which claims are false in general: A L1−L2 is not context-free; B L1∩L2 is context-free; C complement L1 is context-free; D complement L2 is regular?
Tap to enlarge
Select all that apply
Answer & solution

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

Regular languages are closed under complement, and intersecting a CFL with a regular language preserves context-freeness using a PDA–DFA product. Thus L1−L2=L1∩complement(L2) is context-free, so A is false; B and D are true. CFLs are not closed under complement: otherwise their union closure plus De Morgan would imply intersection closure, contradicted by the standard an bn cn construction. Hence C is also false as a universal assertion. Some particular L1 do have context-free complements, so the conclusion is about closure, not every instance.

Original paper, page 3