Pushdown automata, DPDA and NPDA

December 4, 2026 · Team EasyExamNotes · 2 min read (est.) · 0 comments

Share on WhatsApp

← RGPV CS-501 Theory of Computation December 2025 Solved Question Paper

← RGPV CS-501 Theory of Computation May 2023 Solved Paper

Question

Explain pushdown automata, including deterministic and nondeterministic PDAs.

Asked in: CS-501 | December 2025 | 6(a)

Explain DPDA and NPDA with suitable examples.

Asked in: CS-501 | May 2023 | 6(a)

Answer

A pushdown automaton extends a finite automaton with an unbounded last-in-first-out stack. It is described by (Q,Σ,Γ,δ,q₀,Z₀,F), where Γ is the stack alphabet and Z₀ the initial stack symbol. A transition depends on the current state, an input symbol or ε, and the stack top; it replaces the top by a string of stack symbols and changes state.

Acceptance may be defined by final state or empty stack after consuming all input. For NPDAs these acceptance modes characterize the same class of languages.

Deterministic PDA

A DPDA has at most one possible move for each configuration. In particular, if an ε move is enabled for a state and stack top, no consuming move may be enabled for that pair. A DPDA recognizes deterministic context-free languages. For aⁿbⁿ it pushes one marker per a and pops one per b.

Nondeterministic PDA

An NPDA may choose among several moves. It accepts if at least one computation accepts. For even-length palindromes wwᴿ, it can guess the midpoint, then pop and compare symbols. This language over a binary alphabet is context-free but not deterministic context-free.

Unlike DFA and NFA, DPDA and NPDA do not have equal expressive power: deterministic context-free languages form a proper subset of context-free languages. PDAs are useful for parsing nested syntax and matching delimiters.

Pushdown automata, DPDA and NPDA diagram
Pushdown automata, DPDA and NPDA — original illustration

← RGPV CS-501 Theory of Computation December 2025 Solved Question Paper

← RGPV CS-501 Theory of Computation May 2023 Solved Paper

Discussion

Ask a question, share your thoughts or report an error.

Sign in to participate in the discussion.

Join the discussion