• 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 {0n#1n∣n≥0}\{0^n\#1^n|n\ge0\}

    • Sketch

      • push 0 to stack until we see #

      • then, pop 00 from stack whenever we consume 11

      • accept when stack is empty

  • definition

    • M=(Q,Σ,Γ,δ,q0,F)M=(Q,\Sigma,\Gamma,\delta,q_0,F) where

      • QQ is the set of states

      • Σ\Sigma is the input alphabet

      • Γ\Gamma is the stack alphabet

      • δ:Q×Σϵ×Γϵ→2Q×Γϵ\delta:Q\times\Sigma_\epsilon\times\Gamma_\epsilon→2^{Q\times\Gamma_\epsilon} is the transition function

        • Σϵ≔Σ∪{ϵ}\Sigma_\epsilon\coloneqq\Sigma\cup\{\epsilon\} and Γϵ≔Γ∪{ϵ}\Gamma_\epsilon\coloneqq\Gamma\cup\{\epsilon\}

        • For a PDA in state pp, seeing input aa with ToS dd, move to state $

        • TODO

      • q0∈Qq_0\in Q is the initial state

      • F⊆QF\subseteq Q are the accepting states

Snapshot: 84b34f19db8bb5a5ba52e85643e64a9ae86eeffeb6adbcd9b323cdcfe913a6fc117a765d81740449b2b352eafd96385b999cfdb00145d6017943a0c3191903f6 list?snapshot=84b34f19db8bb5a5ba52e85643e64a9ae86eeffeb6adbcd9b323cdcfe913a6fc117a765d81740449b2b352eafd96385b999cfdb00145d6017943a0c3191903f6