http://s13.postimg.org/t8dvy26zr/Untitled.jpg I need state diagram of Pushdown a
ID: 3544454 • Letter: H
Question
http://s13.postimg.org/t8dvy26zr/Untitled.jpg
I need state diagram of Pushdown automata
I already have a informal description it's here:
http://s7.postimg.org/pnxuzdxyj/Untitledd.png
I need state diagram of Pushdown automata I already have a informal description it's here:Explanation / Answer
L = {w | length of w is odd and 0 is middle point}
I am giving the transition function by seeing it u can design graph
states = {q0,q1,q2}
start state = q0
stack symbols = {z0,x}
start stack symbol = z0
final state = {q2}
transition function ar given below
(q0,1,z0) = (q0,xz0)
(q0,1,x) = (q0,xx)
//In q0 state if we saw 0 means we have two choice
1. It is not the middle 0 then just pust symbol x for this 0 and rmain in q0 itself
2. It is the middle 0 the move to state q1 and use q1 to pop the symbol for remaining input
(q0,0,z0) = (q0,xz0) (q1,z0)
(q0,0,x) = (q0,xz0) (q1,x)
// as soon we reach to q1 state it indicte that we have find the middle point and just start to pop the sysbol.
(q1,1,x) = (q1,epsilon)
(q1,0,x) = (q1,epsilon)
//at the end of the string if stack contain z0 menas srting is valid and make the stack empty and reach to final state q2.
(q1,epsilon,z0) = (q2,epsilon)
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.