Pushdown Automata (PDA)

a deterministic pushdown automaton

A deterministic pushdown automaton is a PDA stripped of guessing: at every moment there is at most ONE legal move, so the machine's behaviour on any input is a single, fully determined run with no branching. There is no cloning, no 'try every choice' — just one path, like a recipe with no decision points. This is the practical workhorse, because a machine with a unique next move is one a computer can actually execute step by step.

Determinism here needs two careful conditions. First, for any state, input symbol, and stack-top symbol, δ gives at most one move — no ambiguity in the ordinary transitions. Second, ε-moves must not compete with reading-moves: if an ε-move is available in some configuration, then no input-reading move may also be available there, otherwise the machine would face a choice. Together these guarantee that from any instantaneous description there is never more than one ID it can yield. A DPDA usually accepts by final state, since empty-stack acceptance for a deterministic machine has technical awkwardness (it could only accept prefix-free languages).

The deep and surprising fact is what this restriction costs. For finite automata, determinism is free — every NFA has an equivalent DFA. For pushdown automata, determinism is NOT free: a deterministic PDA recognises strictly fewer languages than a nondeterministic one. The languages it can recognise are called the deterministic context-free languages, and they are a proper subset of all context-free languages. This is precisely why real compilers care: a DPDA is efficiently and unambiguously runnable, so language designers deliberately keep their grammars within the deterministic class.

a^n b^n IS deterministic: while reading a's push, then switch to popping on the first b, with no guessing — the input itself signals the midpoint. So a DPDA recognises a^n b^n, but no DPDA recognises even-length palindromes.

At most one move per configuration; DPDAs recognise a strict subset of context-free languages.

Do not assume DPDAs equal PDAs the way DFAs equal NFAs — they do NOT. Determinising a PDA is impossible in general; the deterministic class is strictly smaller.

Also called
DPDAdeterministic PDA確定型 PDA決定性下推自動機