Question: Consider a process where some super heroes and a enemy are fighting to recover planets that the enemy has controlled, for which the enemy

Consider a process where some super heroes and a enemy are fighting 

Consider a process where some super heroes and a enemy are fighting to recover planets that the enemy has controlled, for which the enemy or the super heroes can win battles, this information is received in an input chain. The chain initially contains a certain number of letters "P", as many as planets the enemy has under its power. The rest of the chain is made up of "A" and "T" signs. Each A symbol at the entrance gives the super heroes energy, and every three units of energy the super heroes take back another planet in exchange for those three units of energy. On the other hand, each "T" is a victory for enemy. If the enemy wins 4 battles in a row, the super heroes lose energy. If an A is received before the enemy wins 4 battles, The super heroes lose no energy. If you receive four "T" s when the super heroes have no stored energy, then the super heroes were defeated. a) Design a stack automaton that accepts chains of the form xy where x = x = p" eye {A,T}', such that it gives the super heroes enough energy to recover all the planets (it can For example, the string PPAATTATTATTTTATTATTTTAATTTTTTTTTTTTTT string PPAATTATTATTTTATTTTATTTTAAAAAAAA is accepted by the automaton, but the is not accepted by the automaton.

Step by Step Solution

3.41 Rating (151 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

To design a stack automaton for this problem we can start by defining the following states 1 Start T... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Physics Questions!