Professional Documents
Culture Documents
Kleene's Theorem
Kleene's Theorem
In the last three chapters we introduced three separate ways of defining a language: by regular
expression, by finite automaton, and by transition graph. (Remember that the language defined by a machine is the set of all
words it accepts.) In this chapter we will present a theorem proved by Kleene in 1956, which (in our version) says that if a
language can be- defined by any one of these three ways, then it can also be defined by the other two. One way of stating
this is to say that all three of these methods of defining languages are equivalent.
THEOREM 6 Any language that can be defined by 1. regular expression or 2. finite automaton or 3. transition graph can be
defined by all three methods. This theorem is the most important and fundamental result in the Theory of Finite Automata.
We are going to take extreme care with its proof.
Part 1: Every language that can be defined by a finite automaton can also be defined by a transition graph.
Part 2: Every language that can be defined by a transition graph can also be defined by a regular expression.
(TG->GTG)
Part 3: Every language that can be defined by a regular expression can also be defined by a finite automaton. When we
have proven these three parts, we have finished our theorem.
This is the easiest part. Every finite automaton is itself a transition graph. Therefore, any language that has been defined by a
finite automaton has already been defined by a transition graph. Done.
The proof of this part will be by constructive algorithm. This means that we present a procedure that starts out with a
transition graph and ends up with a regular expression that defines the same language. To be acceptable as a method of
proof, any algorithm must satisfy two criteria. It must work for every conceivable TG, and it must guarantee to finish its job
in a finite time (a finite number of steps). For the purposes of theorem-proving alone, it does not have to be a good
algorithm (quick, least storage used, etc.). It just has to work in every case.
This process is illustrated below on a TG that has three start states: 1, 3, and 5.
ii) Unique final state:
If we had to make up a regular expression for the language of all strings that begin and end with double letters, we would
probably write:
Example: Let us start with the TG that accepts strings with an even number of a's and an even number of b's, the language
EVEN-EVEN.
which becomes:
which becomes:
which is exactly the regular expression we used to define this language before. Anyone who was wondering how we could
have thought up that complicated regular expression we presented in Chapter 4 can see now that it came from the obvious
TG for this language by way of our algorithm. We still have one part of Kleene's theorem yet to prove. We must show that
for each regular expression we can build a finite automaton that accepts the same language.