Question

QUESTION TWO a. Explain a Push Down Automata (10 Marks) b. Suppose a file consists of as and bs only and the search is for th

0 0
Add a comment Improve this question Transcribed image text
Answer #1

a.)

a pushdown automaton (PDA) is a finiteautomation that can make use of a stack containingdata.

A PDA is formally defined as a7-tuple:

where

  • isa finite set of states
  • isa finite set which is called the inputalphabet
  • isa finite set which is called the stackalphabet
  • isa finite subset of ,the transition relation.
  • isthe start state
  • isthe initial stack symbol
  • isthe set of accepting states

Pushdown automata differ fromfinite state machines in two ways:

  1. They can use the top of the stack to decide whichtransition to take.
  2. They can manipulate the stack as part of performing atransition.

Pushdown automata choose atransition by indexing a table by input signal, current state, andthe symbol at the top of the stack. This means that those threeparameters completely determine the transition path that is chosen.Finite state machines just look at the input signal and the currentstate: they have no stack to work with. Pushdown automata add thestack as a parameter for choice.

Pushdown automata can alsomanipulate the stack, as part of performing a transition. Finitestate machines choose a new state, the result of following thetransition. The manipulation can be to push a particular symbol tothe top of the stack, or to pop off the top of the stack. Theautomaton can alternatively ignore the stack, and leave it as itis. The choice of manipulation (or no manipulation) is determinedby the transition table.

Put together: Given an inputsignal, current state, and stack symbol, the automaton can follow atransition to another state, and optionally manipulate (push orpop) the stack

Add a comment
Know the answer?
Add Answer to:
QUESTION TWO a. Explain a Push Down Automata (10 Marks) b. Suppose a file consists of...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT