PDAIntroduction

PDAIntroduction - An Introduction to Pushdown Automata COT...

Info iconThis preview shows pages 1–9. Sign up to view the full content.

View Full Document Right Arrow Icon
An Introduction to Pushdown Automata COT 4210 Summer 2006 Dr. David A. Workman School of EE and CS
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
July 12, 2006 (c) Dr. David A. Workman 2 Definition A (nondeterministic) PDA is a 6-tuple, M = (Q, Σ , Γ , δ , q 0 , Z 0 , A). Q = finite set of states Σ = input alphabet Γ = stack alphabet q 0 Q (initial state) Z 0 Γ (initial stack symbol) BOS A Q (set of accept states) δ rel : Q × ( Σ∪Λ ) × Γ→ Q × Γ * (partial relation) Finite Control (read head)(advances one symbol on each read operation) a 1 a 2 a 3 ….. a k …. a n (string over the input alphabet) q stack Z top Z 0 String over the stack alphabet Γ Configuration of M = ( q , a k …a n , Z top …Z 0 )
Background image of page 2
July 12, 2006 (c) Dr. David A. Workman 3 Languages Accepted by PDA Move Relation on Configurations: (q , x, Zw) M (q', x, γ w) if and only if (q', γ ) δ (q, Λ , Z) //stack move (q , ax, Zw) M (q', x, γ w) if and only if (q', γ ) δ (q, a, Z) a ∈Σ // read move L stk (M) = { x Σ * | (q 0 , x, Z 0 ) M * (q', λ ,λ ) } L ste (M) = { x Σ * | (q 0 , x, Z 0 ) M * (q', λ , θ ), for some q' A } 1 2 3 (a,Z 0 ) a (a, a) aa (b, a) λ (b, a) λ ( Λ , Z 0 ) λ L stk (M) = { a n b n | n 0 } 1 2 3 (a,Z 0 ) aZ 0 (a, a) aa (b, a) λ (b, a) λ L ste (M) = { a n b n | n 0 } ( Λ , Z 0 ) λ
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
July 12, 2006 (c) Dr. David A. Workman 4 L stk (M) = L ste (M’) M accepts by empty stack q0 p0 M’ accepts by final state ' 0 0 ' 0 / ) , ( Z Z Z Λ q1 ' 0 ' 0 / ) , ( Z Z Λ } { } { ' } , { ' 0 ' 0 ' Z A p Q Q Γ = Γ = =
Background image of page 4
July 12, 2006 (c) Dr. David A. Workman 5 L ste (M) = L stk (M’) M accepts by final state q0 p0 M’ accepts by empty stack ' 0 0 ' 0 / ) , ( Z Z Z Λ q1 ' Z / ) , ( Γ Λ where Z λ } { ' } , { ' 0 ' 0 ' Z A p Q Q Γ = Γ Φ = = ' Z / ) , ( Γ Λ where Z
Background image of page 5

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
July 12, 2006 (c) Dr. David A. Workman 6 PDA Examples L = { x {a, b}* | |x| a = |x| b } 1 2 (a,Z 0 ) aZ 0 (a, a) aa (b, b) bb (b, a) λ (a, b) λ ( Λ , Z 0 ) Z 0 (b,Z 0 ) bZ 0 Accept by final state 1 2 (a,Z 0 ) aZ 0 (a, a) aa (b, b) bb (b, a) λ (a, b) λ ( Λ , Z 0 ) Z 0 (b,Z 0 ) bZ 0 Accept by empty stack 1' ( Λ , Z' 0 ) Z 0 Z' 0 3 ( Λ , Z 0 ) λ ( Λ , Z' 0 ) λ
Background image of page 6
July 12, 2006 (c) Dr. David A. Workman 7 PDA Examples L = { a0 n 1 n | n 0 } { b0 n 1 2n | n 0 } 5 2 (a, Z 0 ) a empty stack 1 3 (b, Z b (0, a) 0 (0, 0) 00 (0, 0) 00 (0, b) 0 4 ( Λ ,a) λ ( Λ ,b) λ (1, 0 ) λ (1, 0 ) λ 6 (1, 0 ) λ (1, 0 ) 0 (1, 0 ) 0
Background image of page 7

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
July 12, 2006 (c) Dr. David A. Workman 8 PDA Examples L = { a0 n 1 n | n 0 } { b0 n 1 2n | n 0 } Accept by final state 5 2 (a, Z 0 ) a 1 ( Λ , Z' 0 ) Z 0 Z' 0 3 (b, Z b (0, a) 0 (0, 0) 00 (0, 0) 00 (0, b) 0 4 ( Λ ,a) λ ( Λ ,b) λ (1, 0 ) λ (1, 0 ) λ 6 (1, 0 ) λ (1, 0 ) 0 (1, 0 ) 0 1' ( Λ
Background image of page 8
Image of page 9
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 23

PDAIntroduction - An Introduction to Pushdown Automata COT...

This preview shows document pages 1 - 9. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online