is the suggested PDA correct?

34 Views Asked by At

so i have this language

$$ L = \{x^{i} v^{j} z^{j+2} w^{k} v^{i+k} | i,j,k \ge 0 \}$$

i made this PDA for it .

states $ = \{q_0 ... q_5 , final\} $

alphabet $= \{ x,v,z,w \}$

stack alphabet $= \{ A , B , \bot \}$

$\bot$ is the end of the stack symbol

transition function and start state and final state in the graph

enter image description here

i have two questions :

  1. is the PDA correct? the idea is simple :

in q0 push A for each x seen

in q1 push B for each v seen

in q2 pop B for each z seen

q3 is for the +2 of z

in q4 push A for each w seen

in q5 pop A for each v

if you get to the end of the stack symbol go to the final state

my main concern is : did i get the epsilon transitions right

  1. is it possible to give a DPDA for it ? (it seems that if we had $i,j,k \ge 1$ then omitting red epsilon transitions from the above PDA gives us a DPDA . cannot we just some how get along with the condition $\ge0$)