Skip to content
Official PYQ · 2001

GATE CS 2001 Q1.5 — Context-free Grammars and Push-down Automata

Explain with AI

Which of the following statements is true?

Choose one option
View worked solution

Answer: B

We analyze each statement based on the closure properties and acceptance models of Context-Free Languages (CFLs):

  • Option A is false: The set of languages accepted by Deterministic Pushdown Automata (DPDAs) is the class of Deterministic CFLs (DCFLs), which is a proper subset of CFLs. For example, the language L={wwR∣w∈{a,b}∗}L = \{ww^R \mid w \in \{a, b\}^*\} is a CFL but cannot be accepted by any DPDA.
  • Option B is true: CFLs are closed under union. If L1L_1 and L2L_2 are CFLs with start symbols S1S_1 and S2S_2 respectively, we can define a new grammar with start symbol SS and production S→S1∣S2S \rightarrow S_1 \mid S_2 to generate L1∪L2L_1 \cup L_2.
  • Option C is false: CFLs are not closed under intersection. For example, L1={anbncm∣n,m≥0}L_1 = \{a^n b^n c^m \mid n, m \ge 0\} and L2={ambncn∣n,m≥0}L_2 = \{a^m b^n c^n \mid n, m \ge 0\} are both CFLs, but their intersection L1∩L2={anbncn∣n≥0}L_1 \cap L_2 = \{a^n b^n c^n \mid n \ge 0\} is a well-known non-CFL.
  • Option D is false: CFLs are not closed under complementation. If they were, they would also be closed under intersection because of De Morgan's Law: L1∩L2=L1‾∪L2‾‾L_1 \cap L_2 = \overline{\overline{L_1} \cup \overline{L_2}}, which contradicts the fact that CFLs are not closed under intersection.

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore Context-free Grammars and Push-down Automata questions