COMS W3261
Computer Science Theory
Lecture 3: September 16, 2009
Deterministic Finite Automata

1. Outline

2. Review

3. Deterministic Finite Automata

4. Example of a DFA

5. Practice Problems

  1. Construct a DFA for a light switch.
  2. Let L be the language { w | w is any string of a's and b's containing at least one a and at least one b }.
    1. Construct a DFA for L.
    2. Show the behavior of your DFA processing the input string aabaa.
    3. Construct a regular expression for L.
  3. Let L be the language { abxba | x is any string of a's, b's, and c's not containing ba }. This language models comments in the programming language C.
    1. Construct a DFA for L.
    2. Show the behavior of your DFA processing the input string abcbaba.
    3. Construct a regular expression for L.
    4. Show how your regular expression generates ababcba.
  4. Construct a DFA for the language L((a+b)*abba(a+b)*).
  5. Let L be the language consisting of all strings of a's and b's having an even number of a's and an even number of b's.
    1. Construct a DFA for L.
    2. Show the behavior of your DFA processing the input string abbaabab.
    3. Construct a regular expression for L.
    4. Show how your regular expression generates abbaabab.

6. Reading Assignment



aho@cs.columbia.edu