Adding or Removing multiple symbols from stack in PDA

Re: Adding or Removing multiple symbols from stack in PDA

by Giorgio Satta -
Number of replies: 0

According to the definition of PDA, in a move you can only read the topmost symbol from the stack. Therefore you cannot remove the two top-most symbols of the stack in a single move.

To remove the two top-most symbols of the stack, you have to use a sequence of two moves, the second one being an epsilon move, and you need to use a special PDA state that forces you to apply the second move only after the first one.