0

enter image description hereenter image description here

Can someone please explain to me how to create pushdown automata for this language. I don't understand the set notation for the language if you could explain that would be great too. Thank you

  • Things depend a bit on the details of your PDA defintion, especially the acceptance condition. The transition from q0 to q1 should pop, not push. I am not sure what the point of all the epsilon transitions is. You need an accepting state or do you accept by empty stack and no more move possible? Probably you cannot test for empty stack; then in an intial step you could push "ac" and when you read c from the stack later you know that you have reached the bottom. – Peter Leupold May 04 '17 at 05:39

1 Answers1

0

The notation means: the language which consists of all the words that start with n letters a followed by m letters b; further, the numbers n and m must not be equal.

The obvious way to accept this with a PDA is this: From the start, for every a you read you put one on the stack; when you start seeing b, for every b you read you remove one of the a from the stack. If the last b removes the last stack symbol, then n=m and the PDA should reject; otherwise, if the word is from ab it should accept.

Peter Leupold
  • 1,162
  • 1
  • 9
  • 16