CS322D Tutorials PowerPoint PPT Presentation

presentation player overlay
1 / 7
About This Presentation
Transcript and Presenter's Notes

Title: CS322D Tutorials


1
CS322D Tutorials
2
Q1. Given state diagram PDA ( PushDown Automata )
M that recognizes  the language anbn  n gt 0
  1. The stack initially has one symbol Z
  2. Transition label aZaZ means on input a, the top
    of the stack should be Z, which is popped and the
    two symbols aZ are pushed back on the stack.

3
a. By using JFLAB show if the string aaaabbbb is
accepted or not .
4
To start a new NPDA, start JFLAP and click
the Pushdown Automaton option from the menu, as
shown below
5
After adding four states to the screen, setting
the initial state to be q0 and the final state to
be q3 and adding transitions. The screen should
look similar to one below.
6
Click on the Input menu and select Step with
Closure. It will prompt you for input, so enter
aaaabbbb (representing a4b4). After clicking
OK or pressing enter, the following screen
should come up
This text box which currently contains a 'Z', is
our stack.
7
If we click the step button, we can see an
example of how the stack changes as the
simulation runs.
  • The stack will be at its largest when the  a
     values have been processed, and it will get
    smaller if b values are processed.
  • The stack will finally end back where it started
    with a value of Z.
Write a Comment
User Comments (0)
About PowerShow.com