954,483 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

push down automata for a^n b c^n+2, n>0

designing a pushdown automata for the language a^n b c^(n+2), n>0 I have been asked to implement the automata for the above language .. please help?

I tried popping a 2 (c)s everytime I push an (a) on to the stack but it seems not to work with odd number of (a)s ....

megan11
Newbie Poster
3 posts since Dec 2011
Reputation Points: 10
Solved Threads: 0
 

It's a^n b c^(n+2), and if you can't even use basic parentheses how are you even human?

PROTIP: a^n b c^n c c is the same thing.

Rashakil Fol
Super Senior Demiposter
Team Colleague
2,658 posts since Jun 2005
Reputation Points: 1,135
Solved Threads: 177
 

Ok i apologize do u have any suggestions other than costructive criticism which i appreciate..

megan11
Newbie Poster
3 posts since Dec 2011
Reputation Points: 10
Solved Threads: 0
 

for all a's and b's push onto the stack , then for first two c's pop b and for the remaining c's pop a's .hence solved1

srinath1
Newbie Poster
11 posts since Jan 2012
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You