See Kozen (1997) lectures 13-16.

DFA minimization

Every regular language has a minimal DFA that is unique up to isomorphism, and there is an algorithm for constructing it from any given DFA for . Proving uniqueness requires the Myhill-Nerode theorem, but constructing a minimal DFA can be achieved using a simple algorithm.

Given a DFA, the minimization process consists of two steps: getting rid of inaccessible states, and collapsing equivalent states.

The quotient construction

By ‘collapsing’ two states and , we mean we can identify the two states as being the same, and one larger state.

  1. We cannot collapse a final state and a non-final state , since if were such that and , it is impossible to ensure that is rejected and is accepted after collapsing.
  2. If we merge and , we are forced to also merge and for all , to preserve determinism.

These two observations imply inductively that we cannot collapse and if and for some string . It turns out that this is also a sufficient condition.

Proposition 283.1.

States an of a DFA can be safely collapsed iff there does not exist a string such that and .

The minimization algorithm

  1. Write down a table of all pairs , initially unmarked.
  2. Mark if and or vice versa.
  3. Repeat the following until no more changes occur: if there exists an unmarked pair such that is marked for some , then mark .
  4. When done, iff is not marked.

This is easily proved by induction on the length of distinguishing suffixes.


The Myhill-Nerode Relations

Correspondence between MH relations and DFAs

Let be a DFA for a regular language with no inaccessible states. induces an equivalence relation on defined by . Some properties of :

  1. it is a right congruence: .
  2. It refines : for all .
  3. It is of finite index, since has finitely many states.

Call any equivalence relation on a Myhill-Nerode relation for if it satisfies the three properties above, that is, if it is a right congruence of finite index refining .

Given any Myhill-Nerode relation on for , we can produce a DFA accepting :

These two constructions are inverses up to isomorphism, that is, , and . Thus, Myhill-Nerode relations for are in a bijective correspondence with DFAs for with no inaccessible states.

The Myhill-Nerode Theorem

There exists a coarsest Myhill-Nerode relation for any given regular set .

Definition 283.2.

Let , regular or not. We define an equivalence relation on in terms of as follows:

For any set , regular or not, satisfies properties 1 and 2 of Myhill-Nerode relations and is the coarsest such relation on . If is regular, this is also of finite index, and therefore a Myhill-Nerode relation on (the coarsest possible one, and corresponds to the unique minimal finite automaton for ).
j

Theorem 283.3.

Let . The following statements are equivalent:

  1. is regular;
  2. there exists a Myhill-Nerode relation for ;
  3. the relation is of finite index.

References

Kozen, D. C. (1997). Automata and Computability. Springer New York. https://doi.org/10.1007/978-1-4612-1844-9