0
25kviews
Design a PDA to check for well-formed parentheses
1 Answer
2
4.5kviews

$$δ(q_0,(,z_0) = (q_0,(z_0)$$ $$δ(q_0,(,() = (q_0,(()$$ $$δ(q_1,),( ) =(q_1, ε)$$ $$δ(q_0, ε,z_0)=(q_f, ε)$$

enter image description here

What if closing bracket comes when opening bracket is on the top of the stack. That's on q0 state. You directly jumped over q1. Your diagram is correct but in equations you have no where given the q0 to q1 transition


Please log in to add an answer.