Pushdown Automata (PDA)

the equivalence of the acceptance modes

Having two different definitions of 'accept' raises an obvious worry: do they describe the same machines? Could it be that some languages are catchable only by checking the final state, and others only by emptying the stack? The reassuring answer is no. The two acceptance modes are EQUIVALENT in expressive power: the class of languages accepted by final state is exactly the class accepted by empty stack. Both classes are precisely the context-free languages.

Equivalence is proved by showing you can mechanically convert one kind of machine into the other. To turn an empty-stack acceptor into a final-state acceptor, you add a special bottom marker below the original Z0; whenever the original machine would empty its stack down to that marker, the new machine instead does an ε-move into a fresh accepting state. Going the other way, to turn a final-state acceptor into an empty-stack one, you let the machine, upon reaching an accepting state, run a clean-up routine of ε-moves that pops everything off the stack; the special marker prevents accidental emptying during the normal run. Each conversion changes only the wrapper, never the language.

This matters because it lets you reason and build using whichever mode is convenient, knowing the choice never changes which languages are recognisable. Empty-stack acceptance pairs beautifully with the grammar-to-PDA construction; final-state acceptance feels closer to finite automata and is often easier to reason about for a specific machine. The equivalence is what makes 'the PDA recognises L' an unambiguous statement regardless of which definition you started from.

Take an empty-stack PDA P. Build P' with a new bottom symbol Z' below Z0 and a new accepting state qf. P' simulates P; whenever P's stack would hit Z', P' does an ε-move to qf. Then P' accepts by final state exactly the language P accepted by empty stack.

A small wrapper converts each mode into the other; both recognise exactly the context-free languages.

This equivalence is about the CLASS of languages, not individual machines: a single PDA may accept different languages under the two modes, but the two FAMILIES of recognisable languages coincide.

Also called
final state equals empty stackL(P) equals N(P) in class兩接受模式等價