PUSH DOWN AUTOMATA (PDA)
PDA for Lwwr
PDA as a state diagram
PDA for Lwwr: Transition Diagram
PDA’s Instantaneous Description (ID)
How does the PDA for Lwwr work on input “1111”?
Principles about IDs
Acceptance by…
Example 2: language of balanced paranthesis
Example 2: language of balanced paranthesis (another design)
Example: L of balanced parenthesis
PDA for Lwwr: Proof of correctness
PDAs accepting by final state and empty stack are equivalent
PN==> PF construction
Example: Matching parenthesis “(” “)”
PF==> PN construction
Equivalence of PDAs and CFGs
CFGs == PDAs ==> CFLs
Converting CFG to PDA
Formal construction of PDA from CFG
Example: CFG to PDA
Simulating string 0011 on the new PDA …
Proof of correctness for CFG ==> PDA construction
Converting a PDA into a CFG
Example: Bracket matching PDA to CFG
Two ways to build a CFG
Deterministic PDAs
This PDA for Lwwr is non-deterministic
D-PDA for Lwcwr = {wcwR | c is some special symbol not in w}
Deterministic PDA: Definition
PDA vs DPDA vs Regular languages
MORE EXAMPLES
MORE EXAMPLES
MORE EXAMPLES
1.01M

Lecture 15 PDA

1. PUSH DOWN AUTOMATA (PDA)

Lecture #15
PUSH DOWN
AUTOMATA
(PDA)

2.

Pushdown automata are machines to accept contextfree languages.
For a context-free grammar G, there is an equivalent
pushdown automaton M to recognize the language
generated by the grammar G.

3.

Description of pushdown automaton
(PDA)
A PDA has
an input tape,
a finite control, and
a stack.
0
0
0
1
0
0
0
(input tape)
step1: read 0, push 0, and move to right
q1
q1
q1
(finite control)
step2: read 0, push 0, and move to right
0
0
(stack)

4.

There are 2 types of moves (Non-determinstic):
1. According to an input symbol, current state, and
top symbol of the stack, a decision is made, then
the input head is moved ahead one symbol.
2. Next move is decided by the current state and the
top symbol of the stack only. The input symbol
is not used. Hence the input head is not moved at
all after the decision is made. This type of move
is called ε-move that allows the PDA to
manipulate the stack without reading input
symbol.

5.

Languages accepted by PDA's
There are two ways to accept inputs:
1. The PDA accepts an input if after reading the
input and the machine empty its stack.
The set of inputs accepted by the PDA is the
language accepted by empty stack.
2. Some states of the PDA are final states. The
PDA accepts an input if the machine enters a
final state.
The set of inputs accepted by the PDA is the
language accepted by final state.

6.

Definition of PDA's

7.

Moves:
0
0
1
0
δ
0
0
1
0
B
G
G
R
R

8.

-Moves:
English     Русский Rules