Pushdown Automata questions

Q24

GATE CS 2025 CS-2Context Free LanguagesMCQ1 mark−1/3 if wrong
Which ONE of the following languages is accepted by a deterministic pushdown automaton?
Show answer without attempting

Answer: A

Q40

GATE CS 2023 CSContext Free LanguagesMCQ2 marks−2/3 if wrong
Consider the pushdown automaton (PDA) PP below, which runs on the input alphabet {a,b}\{a, b\}, has stack alphabet {⊥,A}\{\bot, A\}, and has three states {s,p,q}\{s, p, q\}, with ss being the start state. A transition from state uu to state vv, labelled c/X/γc/X/\gamma, where cc is an input symbol or ϵ\epsilon, XX is a stack symbol, and γ\gamma is a string of stack symbols, represents the fact that in state uu, the PDA can read cc from the input, with XX on the top of its stack, pop XX from the stack, push in the string γ\gamma on the stack, and go to state vv. In the initial configuration, the stack has only the symbol ⊥\bot in it. The PDA accepts by empty stack.

Which one of the following options correctly describes the language accepted by PP?
Question figure
Show answer without attempting

Answer: A

Q51

GATE CS 2021 CS-1Context Free LanguagesNAT2 marks
In a pushdown automaton P=(Q,Σ,Γ,δ,q0,F)P = (Q, \Sigma, \Gamma, \delta, q_0, F), a transition of the form,
p→a, X→Yqp \xrightarrow{a,\ X \to Y} q
where p,q∈Qp, q \in Q, a∈Σ∪{ϵ}a \in \Sigma \cup \{\epsilon\}, and X,Y∈Γ∪{ϵ}X, Y \in \Gamma \cup \{\epsilon\}, represents
(q,Y)∈δ(p,a,X).(q, Y) \in \delta(p, a, X).
Consider the following pushdown automaton over the input alphabet Σ={a,b}\Sigma = \{a, b\} and stack alphabet Γ={#,A}\Gamma = \{\#, A\}.
The number of strings of length 100 accepted by the above pushdown automaton is ______.
Question figure
Show answer without attempting

Answer: 50

Q10

GATE CS 2020 CSContext Free LanguagesMCQ1 mark−1/3 if wrong
Consider the language L={an∣n≥0}∪{anbn∣n≥0}L = \{a^n \mid n \ge 0\} \cup \{a^n b^n \mid n \ge 0\} and the following statements.

I. LL is deterministic context-free.
II. LL is context-free but not deterministic context-free.
III. LL is not LL(kk) for any kk.

Which of the above statements is/are TRUE?
Show answer without attempting

Answer: C

Q43

GATE CS 2016 CS-1Context Free LanguagesMCQ2 marks−2/3 if wrong
Consider the transition diagram of a PDA given below with input alphabet Σ={a,b}\Sigma = \{a,b\} and stack alphabet Γ={X,Z}\Gamma = \{X,Z\}. ZZ is the initial stack symbol. Let LL denote the language accepted by the PDA.

Which one of the following is TRUE?
Question figure
Show answer without attempting

Answer: D

Q50

GATE CS 2015 CS-1Context Free LanguagesMCQ2 marks−2/3 if wrong
Consider the NPDA ⟨Q={q0,q1,q2},Σ={0,1},Γ={0,1,⊥},δ,q0,⊥,F={q2}⟩\langle Q = \{q_0, q_1, q_2\}, \Sigma = \{0, 1\}, \Gamma = \{0, 1, \bot\}, \delta, q_0, \bot, F = \{q_2\} \rangle, where (as per usual convention) QQ is the set of states, Σ\Sigma is the input alphabet, Γ\Gamma is the stack alphabet, δ\delta is the state transition function, q0q_0 is the initial state, ⊥\bot is the initial stack symbol, and FF is the set of accepting states. The state transition is as follows:

Which one of the following sequences must follow the string 101100 so that the overall string is accepted by the automaton?
Question figure
Show answer without attempting

Answer: B

Q36

GATE CS 2014 CS-3Context Free LanguagesMCQ2 marks−2/3 if wrong
Consider the following languages over the alphabet Σ={0,1,c}\Sigma = \{0, 1, c\}:

L1={0n1n∣n≥0}L_1 = \{0^n1^n \mid n \ge 0\}
L2={wcwr∣w∈{0,1}∗}L_2 = \{wcw^r \mid w \in \{0, 1\}^*\}
L3={wwr∣w∈{0,1}∗}L_3 = \{ww^r \mid w \in \{0, 1\}^*\}

Here, wrw^r is the reverse of the string ww. Which of these languages are deterministic Context-free languages?
Show answer without attempting

Answer: C

0/70 correct0 marks

Related topics in Context Free Languages