Pushdown Automaton
Lecture 9
Every pushdown automaton accepts a context-free-language and vice versa.
Essentially an NFA with a stack
In every state, a PDA has as input: top of stack and input character, and can push/pop the stack and go to another state.
Note that PDA = NFA w/ stack and DPDA = DFA w/ stack
PDA is more powerful than DPDA
Note that we cannot do the powerset construction (which can convert NFAs to DFAs) since the stack has unbounded size
Example
Sketch
push
0to stack until we see#then, pop from stack whenever we consume
accept when stack is empty
definition
where
is the set of states
is the input alphabet
is the stack alphabet
is the transition function
and
For a PDA in state , seeing input with ToS , move to state $
TODO
is the initial state
are the accepting states