# How to convert NPDA to PDA?

I have been given this Nondeterministic pushdown automata and I need to convert it to deterministic pushdown automata, I have been stuck with this for a while now, I know that there cant be transitions where the pda doesnt read anything from the stack but i dont know how to solve this.

Suppose your stack alphabet is $$\Gamma =\left\{Z_0,X\right\}$$. You can eliminate transitions which don't pop stack, by guessing which stack symbol is at the top. like this:

before: $$(a,\epsilon)/XXX$$

after: $$(a, X)/XXXX$$, and $$(a, Z_0)/XXXZ_0$$

• @JohnKnot123 if it helps you please set it as accepted – GZZ Apr 27 '20 at 5:39