Comp 2673, Spring 2003
Lab 9
May 27 and 29, 2003


Finite State Machines and Regular languages


In this lab you will create some finite state machines, and practice some with regular languages.

Start by running the automata simulator on one of the Sun machines. I downloaded it already and saved it on ~ftl/fsm/AutoSim.jar. To run it, log onto one of the machines in the Sun lab and type

    java -jar ~ftl/fsm/AutoSim.jar
If you want to clear the screen at any point, pull down the "File", and select "New" and then "Deterministic Finite Automaton". Now solve the following problems.
  1. Give the regular expression for the language from the alphabet {a, b, c} that consists of all the words that contain exactly one b. Create a finite state automaton that accepts this language and input it into the automaton simulator. Using the program, simulate it on the input words "acabaab", "aca", "b", "caab", "cbba", "bc", "bcb", "bbb", "acbca", and "bacca". Turn in the regular expression, and a drawing of the finite state automaton.
  2. Create a finite state machine that accepts the language from the alphabet {a, b} that consists of all words that have an even number of a's and an odd number of b's. Input it into the automaton simulator and test it. Create a thorough suite of test words to really exercise the machine. Turn in a drawing of the finite state automaton along with your list of test words.
  3. If you finish, take the remaining time to work on homework 6.