CS322D Tutorials - PowerPoint PPT Presentation

1 / 7
About This Presentation
Title:

CS322D Tutorials

Description:

CS322D Tutorials Q1. Given state diagram PDA ( PushDown Automata ) M that recognizes the language {anbn : n 0} The stack initially has one symbol: Z Transition ... – PowerPoint PPT presentation

Number of Views:42
Avg rating:3.0/5.0
Slides: 8
Provided by: LENO5238
Category:

less

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