Theory of Computation · Previous year questions
Context-Free Grammars, Pushdown Automata and CFLs
43 questions from GATE CS 2011 to 2026, newest first.
Questions
GATE CS 2026 Set 1, Q.25
Consider the following grammar where is the start symbol, and and are terminal symbols. Which of the following statement...
Context-Free Grammars, Pushdown Automata and CFLs
GATE CS 2026 Set 1, Q.51
Let and be two languages over a finite alphabet, such that and are regular languages. Which of the following statements is/are always true?
Context-Free Grammars, Pushdown Automata and CFLs
GATE CS 2026 Set 1, Q.52
Consider the following context-free grammar . In the above grammar, is the...
Context-Free Grammars, Pushdown Automata and CFLs
GATE CS 2026 Set 2, Q.48
Let and let . Which of the following constraints ensure(s) that the language is context-free?
Context-Free Grammars, Pushdown Automata and CFLs
GATE CS 2025 Set 1, Q.19
Consider the following context-free grammar , where , , and are the variables (non-terminals), and are the terminal symbols, is the start variable, and...
Context-Free Grammars, Pushdown Automata and CFLs
GATE CS 2025 Set 1, Q.45
Consider the following two languages over the alphabet , where and are natural numbers. …
Context-Free Grammars, Pushdown Automata and CFLs
GATE CS 2025 Set 2, Q.24
Which ONE of the following languages is accepted by a deterministic pushdown automaton?
Context-Free Grammars, Pushdown Automata and CFLs
GATE CS 2025 Set 2, Q.30
Consider the two lists List I and List II given below: List I List II (i) Context free languages (a) Closed under union (ii) Recursive languages (b) Not closed under complementa...
Context-Free Grammars, Pushdown Automata and CFLs · Decidability, Reducibility and Undecidability · Regular Expressions, Finite Automata and Regular Languages
GATE CS 2024 Set 1, Q.59
Let be a context-free grammar in Chomsky Normal Form with and containing 10 variable symbols including the start symbol . T...
Context-Free Grammars, Pushdown Automata and CFLs
GATE CS 2024 Set 2, Q.52
Consider a context-free grammar with the following 3 rules. Let . Let…
Context-Free Grammars, Pushdown Automata and CFLs
GATE CS 2023, Q.24
Which of the following statements is/are CORRECT?
Turing Machines and Chomsky Hierarchy · Regular Expressions, Finite Automata and Regular Languages · Context-Free Grammars, Pushdown Automata and CFLs
GATE CS 2023, Q.39
Consider the context-free grammar below where and are non-ter...
Context-Free Grammars, Pushdown Automata and CFLs
GATE CS 2023, Q.40
Consider the pushdown automaton (PDA) P below, which runs on the input alphabet , has stack alphabet , and has three states , with being...
Context-Free Grammars, Pushdown Automata and CFLs
GATE CS 2022, Q.23
Which of the following statements is/are TRUE?
Decidability, Reducibility and Undecidability · Context-Free Grammars, Pushdown Automata and CFLs
GATE CS 2022, Q.47
Consider the following languages: Note that is the reversal of t...
Regular Expressions, Finite Automata and Regular Languages · Context-Free Grammars, Pushdown Automata and CFLs
GATE CS 2022, Q.48
Consider the following languages: Which of the followi...
Context-Free Grammars, Pushdown Automata and CFLs
GATE CS 2021 Set 1, Q.11 (CS Q.1)
Suppose that is a regular language and is a context-free language. Which one of the following languages is NOT necessarily context-free?
Context-Free Grammars, Pushdown Automata and CFLs
GATE CS 2021 Set 1, Q.61 (CS Q.51)
In a pushdown automaton , a transition of the form, where , ,...
Context-Free Grammars, Pushdown Automata and CFLs
GATE CS 2021 Set 2, Q.22 (CS Q.12)
Let be a regular language and be a context-free language. Which of the following languages is/are context-free?
Context-Free Grammars, Pushdown Automata and CFLs
GATE CS 2021 Set 2, Q.51 (CS Q.41)
For a string , we define to be the reverse of . For example, if then . Which of the following languages is/are context-free?
Context-Free Grammars, Pushdown Automata and CFLs
GATE CS 2020, Q.20 (CS Q.10)
Consider the language and the following statements. I. is deterministic context-free. II. is context-free but no...
Context-Free Grammars, Pushdown Automata and CFLs · Parsing and Syntax Analysis (LL and LR)
GATE CS 2020, Q.42 (CS Q.32)
Consider the following languages. W...
Regular Expressions, Finite Automata and Regular Languages · Context-Free Grammars, Pushdown Automata and CFLs
GATE CS 2019, Q.41 (CS Q.31)
Which one of the following languages over is NOT context-free?
Context-Free Grammars, Pushdown Automata and CFLs
GATE CS 2018, Q.45 (CS Q.35)
Consider the following languages: I. II.…
Context-Free Grammars, Pushdown Automata and CFLs
GATE CS 2017 Set 1, Q.10 (CS Q.10)
Consider the following context-free grammar over the alphabet with as the start symbol: Which one of the...
Context-Free Grammars, Pushdown Automata and CFLs
GATE CS 2017 Set 1, Q.34 (CS Q.34)
If is a grammar with productions where is the start variable, then which one of the following strings is not genera...
Context-Free Grammars, Pushdown Automata and CFLs
GATE CS 2017 Set 1, Q.37 (CS Q.37)
Consider the context-free grammars over the alphabet given below. and are non-terminals. …
Context-Free Grammars, Pushdown Automata and CFLs · Regular Expressions, Finite Automata and Regular Languages
GATE CS 2017 Set 1, Q.38 (CS Q.38)
Consider the following languages over the alphabet . Let and . Which of the...
Context-Free Grammars, Pushdown Automata and CFLs
GATE CS 2017 Set 2, Q.4 (CS Q.4)
Let be any two context-free languages and be any regular language. Then which of the following is/are CORRECT? I. is context-free. II.…
Context-Free Grammars, Pushdown Automata and CFLs
GATE CS 2017 Set 2, Q.16 (CS Q.16)
Identify the language generated by the following grammar, where is the start variable.…
Context-Free Grammars, Pushdown Automata and CFLs
GATE CS 2017 Set 2, Q.40 (CS Q.40)
Consider the following languages.…
Context-Free Grammars, Pushdown Automata and CFLs · Turing Machines and Chomsky Hierarchy
GATE CS 2016 Set 1, Q.26 (CS Q.16)
Which of the following languages is generated by the given grammar?
Context-Free Grammars, Pushdown Automata and CFLs
GATE CS 2016 Set 1, Q.52 (CS Q.42)
Consider the following context-free grammars: …
Context-Free Grammars, Pushdown Automata and CFLs
GATE CS 2016 Set 1, Q.53 (CS Q.43)
Consider the transition diagram of a PDA given below with input alphabet and stack alphabet . is the initial stack symbol. Let den...
Context-Free Grammars, Pushdown Automata and CFLs
GATE CS 2016 Set 2, Q.27 (CS Q.17)
Language is defined by the grammar: Language is defined by the grammar: Consider the following...
Regular Expressions, Finite Automata and Regular Languages · Context-Free Grammars, Pushdown Automata and CFLs
GATE CS 2016 Set 2, Q.53 (CS Q.43)
Consider the following languages: Which one of the following is TRUE?
Context-Free Grammars, Pushdown Automata and CFLs
GATE CS 2016 Set 2, Q.56 (CS Q.46)
A student wrote two context-free grammars and for generating a single C-like array declaration. The dimension of the array is at least one. For example, int a[1...
Parsing and Syntax Analysis (LL and LR) · Context-Free Grammars, Pushdown Automata and CFLs
GATE CS 2015 Set 1, Q.61 (CS Q.51)
Consider the NPDA , where (as per usual convention) is the set of states...
Context-Free Grammars, Pushdown Automata and CFLs
GATE CS 2015 Set 3, Q.42 (CS Q.32)
Which of the following languages are context-free?…
Context-Free Grammars, Pushdown Automata and CFLs
GATE CS 2014 Set 3, Q.46 (CS Q.36)
Consider the following languages over the alphabet : …
Context-Free Grammars, Pushdown Automata and CFLs
GATE CS 2013, Q.32 (CS Q.32)
Consider the following languages. Which one of the following statements is FALSE?
Context-Free Grammars, Pushdown Automata and CFLs
GATE CS 2011, Q.8 (CS Q.8)
Which of the following pairs have DIFFERENT expressive power?
Context-Free Grammars, Pushdown Automata and CFLs
GATE CS 2011, Q.26 (CS Q.26)
Consider the languages , and as given below. …
Context-Free Grammars, Pushdown Automata and CFLs