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 explore combining finite automata, and contstructing NFAs.

Unless specified otherwise, the alphabet is the set of 0 and 1.

Please design finite automata as stated below. Try to construct reasonably simple automata. When a problem asks for an NFA, constructing a DFA is OK if you believe that it is the simplest solution.

- 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.

For each automaton in questions 1-4 write a short explanation of how it was constructed.

- Construct an automaton (DFA or NFA) for the language of all strings that end with an even number of 0s (i.e. the last longest subsequence of 0s at the end of the string has an even length). Note that an empty substring of zeros has an even length.
- Construct an (DFA or NFA) for a language of all strings of length at least 3 that have a pattern 01.
- Construct an automaton (DFA or NFA) for a concatenation of the following languages: a language of all strings of an odd length and a language of strings that can be represented as a non-empty sequence of 1s followed by a non-empty sequence of 0s. (Old phrasing for the second language: strings that consist of at least one 1 followed by at least one zero). Test the automaton carefully.
- Construct an automaton (DFA or NFA) for A* (* stands for the "star" regular operation), where A is the language of strings of length at least two with no occurrences of the pattern 00. Think carefully of what the language is. Use the * construction for NFA. Test the automaton thoroughly.
- Use the "convert to DFA" function of JFLAP to convert an NFA for the language of all strings with at least two 0s to a DFA.
- Use the "convert to DFA" function of JFLAP to convert an NFA for the language of all strings that end with two 1s to a DFA.

- 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.