Download presentation

Presentation is loading. Please wait.

Published byCarissa Aspell Modified over 2 years ago

1
Top-Down PDA Sequence of steps to which string X= [][[][]] has to be accepted by NPDA NT(G) Grammar has productions s [S]S|^

2
We compare the moves made by NT(G) in accepting this string be leftmost derivation of this string. S=> [S]S =>[ ] S => [ ][S]S => [ ][ [S] S ] S =>[ ] [[ ] S] S => [ ] [ [ ] [S] S] S [ ] [ [ ] [ ] S] S [ ] [ [ ] [ ] ] S => [ ] [ [ ] [ ] ]

3
Transition table for Top Down PDA NT(G) Move#StateInputStack symbolMove 1q0^Z0(q1, SZ0) 2q1^S(q1, [S]S), (q1, ^) 3q1[[(q1, ^) 4q1]](q1, ^) 5q2^Z0(q2, Z0)

4
To the right of the each move that replace a variable on stack, we show the corresponding step in the left most derivation. (q0, [ ] [ [ ] [ ] ], Z0 ) Steps are derived by using the moves in transition table |- (q1, [ ] [ [ ][ ] ], SZ0) S |- (q1, [ ] [ [ ] [ ] ], [S]SZ0) => [S]S |- (q1, ] [ [ ] [ ] ], S]SZ0) |- (q1, ] [ [ ] [ ] ], ]SZ0) |- (q1, [ [ ] [ ] ], SZ0) |- (q1, [ [ ] [ ] ], [S]SZ0) =>[ ] [S]S |- (q1, [ ] [ ] ], S]SZ0) |- (q1,, [ ] [ ] ], [S] S]SZ0) =>[ ] [ [S]S]S |- (q1, ] [ ] ], S] S]SZ0) |- (q1, ] [ ] ], ] S]SZ0) |- (q1, [ ] ], S]SZ0) |- (q1, [ ] ], [S]S]SZ0) => [ ] [ [ ] [S]S]S |- (q1, ] ], S]S]SZ0) |- (q1, ] ], ]S]SZ0)

5
|- (q1, ], S]SZ0) |- (q1, ], ]SZ0) |- (q1, ^, SZ0) |- (q1, ^, Z0) = > [ ] [ [ ] [ ] ] |- (q2, ^, Z0) These are the sequence of steps that string x to be accepted

6
Thank you

Similar presentations

Presentation is loading. Please wait....

OK

Fall 2005Costas Busch - RPI1 Pushdown Automata PDAs.

Fall 2005Costas Busch - RPI1 Pushdown Automata PDAs.

© 2018 SlidePlayer.com Inc.

All rights reserved.

Ads by Google

Ppt on factoring polynomials Ppt on water activity of foods Ppt on kingdom of dreams Ppt on high sea sales india Ppt on industrial revolution in india Ppt on 3 idiots learning Ppt on conference call etiquette tips Ppt on role of entrepreneurship in economic development Ppt on next generation 2-stroke engine parts Ppt on peace and nonviolence