COMS W3261 CS Theory
Lecture 4: Regular Expressions and Finite Automata

1. Equivalence of DFA's, NFA's, ε-NFA's, and Regular Expressions

2. McNaughton-Yamada-Thompson Algorithm: From an RE to an Equivalent ε-NFA

3. From a DFA to an Equivalent RE

4. Practice Problems

  1. Using structural induction prove that the MYT algorithm produces an ε-NFA with at most 2n states from a regular expression of length n.
  2. Consider the regular expression R = a+b*a.
    1. Use the MYT algorithm to construct an equivalent ε-NFA for the regular expression R.
    2. Simulate the behavior of your ε-NFA on the input string bba using the two-stack algorithm.
    3. Use the subset construction to convert your ε-NFA into a DFA.
    4. Show the behavior of your DFA on the input string bba.
  3. Convert the following DFA into an equivalent regular expression. A is the start state and {B} is the set of final states.

  4. Convert the following DFA into an equivalent regular expression. A is the start state and the only final state.

  5. Convert the following DFA into an equivalent regular expression. A is the start state and {B, C} is the set of final states.
  6. Extend the ripping algorithm to apply to epsilon-NFAs.
  7. Prove that the ripping algorithm constructs an equivalent regular expression for the DFA to which it is applied.

5. Reading



aho@cs.columbia.edu
verma@cs.columbia.edu