next up previous
Next: Deterministic PDAs Up: Pushdown automata Previous: How does a PDA

The language of a PDA

There are two ways to define the language of a PDA $ P=(Q,\Sigma,\Gamma,\delta,q_0,Z_0,F)$ ( $ L(P)\subseteq \Sigma^*$). because there are two notions of acceptance:

Acceptance by final state

$\displaystyle L(P) = \{ w \mid (q_0,w,Z_0) \vdash_P^* (q,\epsilon,\gamma) \wedge
q\in F\} $

That is the PDA accepts the word $ w$ if there is any sequence of IDs starting from $ (q_0,w,Z_0)$ and leading to $ (q,\epsilon,\gamma)$, where $ q\in F$ is one of the final states. Here it doesn't play a role what the contents of the stack are at the end.

In our example the PDA $ {P_0}$ would accept $ 0110$ because $ (q_0,0110,\char93 )\vdash_{P_0}^*(q_2,\epsilon,\epsilon)$ and $ q_2 \in F$. Hence we conclude $ 0110\in L({P_0})$.

On the other hand since there is no successful sequence of IDs starting with $ (q_0,0011,\char93 )$ we know that $ 0011\notin L({P_0})$.

Acceptance by empty stack

$\displaystyle L(P) = \{ w \mid (q_0,w,Z_0) \vdash_P^* (q,\epsilon,\epsilon) \}$

That is the PDA accepts the word $ w$ if there is any sequence of IDs starting from $ (q_0,w,Z_0)$ and leading to $ (q,\epsilon,\epsilon)$, in this case the final state plays no role.

If we specify a PDA for acceptance by empty stack we will leave out the set of final states $ F$ and just use $ P=(Q,\Sigma,\Gamma,\delta,q_0,Z_0)$.

Our example automaton $ {P_0}$ also works if we leave out $ F$ and use acceptance by empty stack.

We can always turn a PDA which use one acceptance method into one which uses the other. Hence, both acceptance criteria specify the same class of languages.


next up previous
Next: Deterministic PDAs Up: Pushdown automata Previous: How does a PDA
Thorsten Altenkirch 2001-05-08