CSci 3501 Algorithms and Computability - Lab 10.
November 12th. Due Wednesday, November 18th at 11:59pm
What to submit and when:
- All submissions are electronic: by e-mail to elenam at morris.umn.edu and CC to all lab
partners. Please do not delete your e-mail from "Sent mail" or your
mailbox until the end of the semester.
- When working on the lab, please comment your work so that it is
clear what contributions of each person are.
- At the end of the lab each group should send me the results of their
in-class work. Please indicate if this is your final submission.
- If your submission at the end of the lab time was not final,
please send me(CC to the lab partner(s)) a final copy before the due
time. Please use the subject "3501 Lab N", where N is the lab
number.
Lab assignment
Work in pairs
Lab overview and goals
The goals of this lab are:
- To study context free grammars (CFG) and pushdown automata using JFLAP
- To study context free pumping lemma using JFLAP
CFG and pushdown automata
Use the corresponding sections of JFLAP tutorial as a reference.
Define the following in JFLAP:
- A context free grammar for the language of strings a^n b^m, where n >= m
- A context free grammar for the language of strings a^k followed by any number of b followed by c^k
- A pushdown automaton for the language of strings a^k followed by any number of b followed by c^k (do not convert your grammar from the previous question into an automaton or vice versa)
Pumping lemma for context free languages
Use the tutorial
for the pumping lemma. Play the "pumping lemma game" for the
following examples. For each example indicate if the language is
context-free or not and why.
- The third language (a^n b^j a^n b^j, n >= 0, j >= 0) -- computer
goes first.
- The eighth language (a^k b^n c^n d^j: j not equal to k) -- you go
first
Using JFLAP and naming your files
- Please save your automata files as .jff files and your data as .txt files. Files names must be as follows: names of those in the group followed by question name, e.g.
SmithAdams3.jff
(where 3 refers to the question number). This will help me in running test data
- To load test data from a file, go to
Input -> Multiple Runs -> Load Inputs
- When adding multiple transitions between the same two states, add them one by one. Typing "0, 1" in a label for an arrow will give you a wrong result since the automaton will try to match this input exactly, including the comma.
- When writing DFA, check that every state has a transition on every symbol. JFLAP does not check it.
- Use
Convert -> Combine Automata
to copy one automaton into a file for another one.
- Consult the JFLAP tutorial as
needed.
What to submit
- Submit your JFLAP files as attachments, CC your group. Make sure
to submit your automata
files (as .jff) and your input data (as .txt). Make sure to follow the naming requirements! Make it clear which
data refers to which automaton.
CSci 3501
course web site.