CSci 3501 Algorithms and Computability - Lab 7.

October 7. Due Wednesday, October 13 at 11:59pm

What to submit and when:

Lab assignment

Work in pairs

Lab overview and goals

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

Using JFLAP and naming your files

Lab task 1 (24 points: 4 points for each problem)

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:

  1. DFA to recognize the language of all strings that have a pattern 01 but not 101
  2. DFA to recognize the language of all strings that have an odd number of occurrences of a pattern 01.
  3. 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)
  4. 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)
  5. Construct an NFA for the language of all strings with at least two 0s or at least two 1s.
  6. Construct an NFA for the language of all strings that have at least two occurrences of a pattern 01.

Lab task 2 (to be graded after the final presentation)

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.

What to submit


CSci 3501 course web site.