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.

Work in pairs

The goal of the lab is to practice with JFLAP (a tool for experimenting with finite automata and other computability topics) and to design and test finite automata (DFAs and NFAs).

- 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. - Do not use "convert to DFA" or "minimize DFA" options.
- Consult the JFLAP tutorial as needed.

Unless specified otherwise, the alphabet is the set of 0 and 1. Recall that zero is an even number.

Please design and test the following finite automata:

- DFA to recognize the language of all strings that have a pattern 01 but not 101
- DFA to recognize the language of all strings that have an odd number of occurrences of a pattern 01.
- Use the approach on p. 46 in the book to construct a DFA for the following language that is a union of two simpler languages: all strings that have an odd number of 0s or end at 00 (or both). First construct the two simpler automata (you don't need to submit them)
- Use the approach on p. 46 in the book (modified to construct an intersection instead of a union) to construct a DFA for the following language: all strings that have at least three 0s and at most two 1s. First construct the two simpler automata (you don't need to submit them)
- Construct an NFA for the language of all strings with at least two 0s or at least two 1s.
- Construct an NFA for the language of all strings that have at least two occurrences of a pattern 01.

After the sorting programs trial run, continue working on your sorting program. For the final submission include, in addition to your Java files, a write-up on what sorting algorithms you are using and why. Discuss its efficiency in practice: effects of programming choices, such as an array versus ArrayList, using specific Java methods, etc.

If you changed anything in your program after the initial run, please indicate what you changed and why. Also include things that you tried that didn't work out and explain why.

- Submit your JFLAP files as attachments, CC your group. Make sure to submit your DFA 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.
- The sorting files need to be submitted as .java files and a write-up.

The views and opinions expressed in this page are strictly those of the page author. The contents of this page have not been reviewed or approved by the University of Minnesota.