26 Qs · since 2011 · 41 marks · 1.6 marks/paperMedium yield
Context-Free Grammars (CFG) and Pushdown Automata (PDA) form a cornerstone of the GATE CS Theory of Computation syllabus. Questions systematically test the boundary between Regular… Guide
Topic guide
Context-Free Grammars (CFG) and Pushdown Automata (PDA) form a cornerstone of the GATE CS Theory of Computation syllabus. Questions systematically test the boundary between Regular, DCFL, CFL, and non-CFL classes, structural invariants of grammars (ambiguity, terminal count ratios, derivation steps), and operational tracing of PDAs. Over recent years, the topic has expanded from standard single-choice language classifications to multi-select invariant verification and exact counting NAT questions.
Language Identification from CFG
common · MCQ · 1.5 marks · 2025, 2023, 2017, 2016
Given a CFG with recursive and non-recursive productions, determine the exact regular expression or set-builder notation of the language generated.
CFL vs. DCFL vs. Non-CFL Language Classification
common · mixed · 2 marks · 2026, 2022, 2020, 2016
Given multiple parameterized languages (e.g., with linear constraints or variations), identify which are Context-Free, Deterministic Context-Free, or non-Context-Free based on single-stack LIFO nesting versus cross-serial dependencies.
PDA State Transition & Execution Tracing
occasional · mixed · 2 marks · 2021, 2016, 2015
Given a formal 6/7-tuple or transition diagram of an NPDA/DPDA, analyze stack operations (push/pop/noop) to find accepting suffixes or count the number of accepted strings of fixed length.
Grammar Ambiguity and Derivation Counting
occasional · MSQ · 1 marks · 2026
Determine if a grammar is ambiguous by finding multiple distinct parse trees/leftmost derivations for a short test string, or count unique rightmost derivations.
Grammar Invariants and Terminal Inequalities
occasional · MSQ · 2 marks · 2026, 2017
Analyze productions to establish mathematical invariants over the number of generated terminals (e.g., bounds on vs. ).
Closure Properties and Expressive Power Hierarchy
common · MCQ · 1 marks · 2025, 2022, 2021, 2011
Evaluate truth values of statements involving closure under intersection with regular sets, complementation, difference, or relative power of DPDA vs. NPDA vs. DFA/NFA.
Chomsky Normal Form (CNF) Derivations
rare · NAT · 2 marks · 2024
Compute the exact number of derivation steps required to generate a terminal string of given length using a grammar in CNF.
Terminal Count Invariants via Derivation Rule Balance
occasional · MSQ · 2 marks · 2024
Given a CFG, determine which equality or inequality relations over terminal counts (e.g., ) hold for all words by setting up linear equations over production rule application counts.
PDA Language Identification via State and Stack Tracing
common · MCQ · 2 marks · 2023
Given a formal transition diagram or definition of a PDA (with transition format ), trace state transitions, push/pop actions, and non-deterministic or -transitions to deduce the exact set of accepted strings under a specified acceptance criterion (e.g., acceptance by empty stack).
Derivation Steps in Chomsky Normal Form (CNF)
Used to find the exact number of derivation steps to generate any terminal string of length from a CFG in CNF ( binary rule applications and terminal rule applications).
CFL Set Difference Identity
Used when reasoning about why is not necessarily context-free, as CFLs are not closed under complementation.
PDA Stack Balance Invariant
Used to compute acceptance conditions on input lengths (e.g., with total length yielding valid range for ).
Non-terminal Conservation Law
Used to establish linear relations between production rule application counts , where is the net change in non-terminals produced by rule .
Terminal Count Accumulation
Used to express the total count of terminal symbol in word in terms of the number of times each production rule is applied.
PDA Transition Notation
Used to describe moving from state to upon reading input symbol with top stack symbol , replacing with string .
Language Acceptance by Empty Stack
Used when the PDA accepts a word precisely when the stack becomes completely empty after processing the input.
Shift from standard 1-mark classification MCQs to multi-select (MSQ) questions evaluating multiple language constraints simultaneously (e.g., nested vs cross-serial powers).
2026, 2022
Introduction of NAT questions involving exact combinatorial counting based on PDA stack dynamics or grammar normal form derivations.
2024, 2021
Increased focus on structural invariants of non-terminals (proving ratio bounds on terminal counts across recursive branches).
2026, 2017
Shift toward multi-select questions (MSQ) testing invariant terminal-count relations and boundary-case validation (e.g., base derivation strings disproving strict inequalities).
2024
Recent questions emphasize rigorous boundary condition checking (e.g., strictly vs , and vs ) via -transitions requiring stack symbol consumption for empty-stack acceptance.
2023
Easy: Direct language generation of linear/simple CFGs, standard closure definitions, or basic hierarchy questions (DPDA vs NPDA). Medium: Multi-variable linear constraints on index tuples (), PDA state-stack tracing with non-deterministic transitions, proving grammar invariants via induction on derivation rules, and MSQs requiring counterexamples for non-CFL/ambiguity claims.