Professional Documents
Culture Documents
OR
Actions of the Example PDA
Input 000111
Stack Z0
Actions of the Example PDA
Input 00111
Stack (Push X) X
Z0
Actions of the Example PDA
Input 0111
Stack (Push X) X
X
Z0
Actions of the Example PDA
Input 111
Stack (Push X) X
X
X
Z0
Actions of the Example PDA
Input 111
Stack (pop X) X
X
X
Z0
Actions of the Example PDA
Input 11
Stack (pop X) X
X
Z0
Actions of the Example PDA
Input 1
Stack (pop X) X
Z0
Actions of the Example PDA
Input
Stack Z0
PDA and CFG
• PDA are equivalent in specification power with CFG.
• A language is context-free if and only if some pushdown
automata recognizes it.
• Note: This means that:
1. If a language L is CFL then there is a PDA ML that
recognizes it
2. If a language L is recognized by a PDA ML then there is a
CFG GL that generates L
• Some CFL are more easily described in terms of their
generator (i.e. CFG), whereas others are more easily
described in terms of their recognizers (i.e. PDA).
CFG to PDA conversion