0

Can this grammar be converted to a PDA?

`S-> aS | EPSILON `

I think no because I cannot define how much “a” to push-pop.

Jonathan Leffler
  • 730,956
  • 141
  • 904
  • 1,278
  • 1
    A PDA that doesn't use its stack is equivalent to an NFA. Can you see how to make an NFA for this language? – Welbog Jan 26 '18 at 15:47
  • Is it possibile to create a PDA that accept that grammar with empty stack? –  Jan 26 '18 at 15:49
  • 1
    If you never push anything on the stack, the stack will remain empty, and you can accept as soon as you run out of input. If you're worried about symbols besides a, just push onto the stack whenever you see any, and your stack won't be empty anymore. – Patrick87 Jan 26 '18 at 15:56

0 Answers0