Eighth Lecture -- Regular Expressions and Finite Automata

Wednesday, October 11.

Main Theorem

Theorem: given a finite automaton M, there is a regular expression R such that the language denoted by the regular expression, L(R), is L(M), the language accepted by M.

We present two proofs.

Dynamic Programming

See detailed proof in pages 51-53 of Kozen. Analogy with shortest path algorithm.
See Chapter 25 of Cormen-Leiserson-Rivest-Stein, or for a complete treatment Aho, Hopcroft and Ullman: The Design and Analysis of Computer Algorithms, ("complete semirings") for more info.

Kleene Algebras

This is an optional excursion for the mathematically motivated. It is the "Supplementary Lecture A" of Kozen.

Short version: one can define addition (+) and multiplication as Union, and Concatenation for languages, and for matrices whose elements are languages. One can define also a * (asterate) operation on such matrices. The explicit formula for asterate yields regular expressions as the matrix elements.

One then proves that the equation

x = Ax + b
where x and b are vectors and A a matrix
has the solution

x = A* b
(* represents the asterate operation).

Finally, if the vector x is defined as x_i = language accepted by automaton when started in state i
one obtains an equation of the form x = Ax + b from the automaton. The solution, as above, is x=A*b. The entry x_1 of the vector x that corresponds to the language accepted from state 1, wlog the initial state of the automaton yields a regular expression for the language accepted by the automaton.

The theorem follows.