Design a PDA to check for well-formed parentheses

Mumbai university > Comp > SEM 4 > TCS

Marks: 10M

Year: Dec 2014


$$δ(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.

Continue reading

Find answer to specific questions by searching them here. It's the best way to discover useful content.

Find more