Skip to content

TOC-PDA

To access the infinite memory space, an NFA is upgraded by a stack. A stack has these basic operations.

  • Push
  • Pop

The computational model combines a finite state machine and a stack is called pushdown automata (PDA).

Pushdown automata

PDA

A pushdown automaton is a 6-tuple (Q,Σ,Γ,δ,q0,F), where

  • Q is the finite set of states;
  • Σ is the finite input alphabet;
  • Γ is the finite stack alphabet;
  • δ:Q×Σϵ×ΓϵP(Q×Γϵ) is the transition function;
  • q0Q is the initial state;
  • FQ is the set of final states;

The transition function δ:Q×Σϵ×ΓϵP(Q×Γϵ) is understood as

Transition Function

If:

  • The current state is qQ
  • The next input symbol is sΣϵ
  • The symbol on top of the stack is rΓϵ

Then:

  • The next state is qQ
  • The new stack symbol on the top is rΓϵ

PDA is defined from NFA.

  • ϵ is included in Σϵ and Γϵ.
  • The domain of δ is the power set P(Q×Γϵ).
  • PDA has multiple choices for the next state.

Computation on PDA

An input string w=w1w2wn is accepted by a PDA M if there exists a sequence of states t0,t1,,tnQ and a sequence of strings r0,r1,,rnΓ such that:

  1. t0=q0 (where t0 is the initial state);
  2. r0=ε (the stack is empty initially);
  3. tnF (tn is a final state); and
  4. For i=0,,n,(ti+1,b)δ(ti,wi+1,a),where ri=sa and ri+1=sb for some a,bΓε and sΓ.

The last condition explains a transition.

  • Each string ri is the content of the stack.
  • The leftmost symbol in ri is at the bottom of the stack.
  • The rightmost symbol in ri is at the top of the stack (a and b).
  • The PDA consumes wi+1, changes the stack symbol from a to b, and shifts to state ti+1.

Example

A PDA for 0n1n

PDA