GATE / CS ARCHIVE

GATE CSE 2001 / QUESTION 1.5

Closure properties of context-free languages

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

GATE 2001, Q1.5 1 mark · MCQ
Report issue

Closure Properties & Language Hierarchy

Question 1.5, GATE 2001: Which statement about context-free languages is true: every CFL has a deterministic PDA; CFLs are closed under union; CFLs are closed under intersection; or CFLs are closed under complement?
Tap to enlarge
Your answer
Answer & solution

Answer: B (no official key was published)

Step 1: Given grammars with disjoint renamed nonterminals and start symbols S1,S2, introduce a fresh start S→S1|S2. This grammar generates their union, proving B.

Step 2: The CFLs {an bn cm} and {am bn cn} have intersection{an bn cn}, which is not context-free. Thus C is false. If CFLs were closed under complement, their union closure and De Morgan would imply intersection closure, so D also fails.

Finally deterministic PDA languages form a strict subclass of CFLs; an arbitrary CFL need not have a deterministic PDA. Hence A is false.

Original paper, page 1