Sie sind auf Seite 1von 10

Costas Busch - RPI Fall 2003 1

 A PDA M = (Q, Σ, Γ, δ, q0, z0, F) is said to be


deterministic if
◦ δ(p, a, β) = (q, γ)
 ie. To be deterministic, there must be at most one
choice of move for any state p, input symbol a, and
stack symbol β.
◦ δ(p, ε, β) is not empty then δ(p, a, β) must be
empty for every a∈ Σ, p ∈Q, β ∈ Γ.
 ie. there must not be a choice between using input ε or
real input.
 Formally, δ(p, ε, β) and δ(p, a, β) cannot both be
nonempty.

2
Allowed transitions:
a, b / w
q1 q2

q1 , b/ w q2

(deterministic choices)
Costas Busch - RPI Fall 2003 3
Allowed transitions:

q2 q2
a, b / w1  , b / w1

q1 q1

a, c / w2  , c / w2
q3 q3

(deterministic choices)
Costas Busch - RPI Fall 2003 4
Not allowed:

q2 q2
a, b / w1  , b / w1

q1 q1

a, b / w2
a, b / w2 q3 q3

(non deterministic choices)


Costas Busch - RPI Fall 2003 5
L( M )  {a b : n  0}
n n

a , / a b,a / 

a , / a b,a /   ,z / z
q0 q1 q2 q3

Costas Busch - RPI Fall 2003 6


Definition:
A language L is deterministic context-free
if there exists some DPDA that accepts it

Example:
The language L( M )  {a b : n  0}
n n

is deterministic context-free

Costas Busch - RPI Fall 2003 7


Example of Non-DPDA (PDA)
L(M )  {vv : v {a, b} }
R *

a,  / a a, a / 
b,  / b b, b / 

 , /   ,z / z
q0 q1 q2

Costas Busch - RPI Fall 2003 8


Example of Non-DPDA (PDA)
Not allowed in DPDAs

a,  / a a, a / 
b,  / b b, b / 

 , /   ,z / z
q0 q1 q2

Costas Busch - RPI Fall 2003 9


Not allowed in DPDAs

a,   a a, a  
b,   b b, b  

q0 ,    q1 , $  $ q2

Costas Busch - RPI Fall 2003 10

Das könnte Ihnen auch gefallen