Which ONE of the following languages is accepted by a deterministic pushdown automaton?
- (A)
Any regular language.
- (B)
Any context-free language.
- (C)
Any language accepted by a non-deterministic pushdown automaton.
- (D)
Any decidable language.
Which ONE of the following languages is accepted by a deterministic pushdown automaton?
Any regular language.
Any context-free language.
Any language accepted by a non-deterministic pushdown automaton.
Any decidable language.
ANSWER
Every regular language is accepted by a deterministic pushdown automaton, so the answer is (A).
Official answer: ASource: Official answer key, GATE 2025 CS2 (IIT Roorkee)
A deterministic pushdown automaton (DPDA) accepts exactly the deterministic context-free languages (DCFLs). The question asks which option holds for every language in the class it names, so we test each class against the DCFLs.
(A) Any DFA is a DPDA that never touches its stack, so every regular language is accepted by a DPDA. This option is true for any regular language.
(B) The language is context-free, but a machine must guess where the middle of the input is, and a DPDA cannot do that. No DPDA accepts it, so not every context-free language is accepted by a DPDA.
(C) A language accepted by a non-deterministic pushdown automaton is exactly a context-free language. The same language is accepted by an NPDA but by no DPDA, so (C) fails.
(D) The language is decidable but not context-free. No PDA of either kind accepts it, so a decidable language need not be accepted by a DPDA, and (D) fails.
The classes nest as regular DCFL CFL decidable. Only the regular languages are all inside the DCFLs, so the answer is (A).
KEY IDEA
The languages a DPDA accepts (DCFLs) lie strictly between the regular languages and the context-free languages. Only the regular languages are guaranteed to be inside the DCFLs.
WATCH OUT FOR
Assuming a DPDA is as powerful as an NPDA, and picking (B) or (C). Languages like need a guess of the midpoint, which only a non-deterministic machine can make.
From the GATE 2025 CS2 paper. Every question of this paper · Download the full paper · All 9 CFG & PDA questions, with notes