Hello! Welcome back to our study of the Theory of Computation.
In our last lesson, we mastered the table-filling algorithm to systematically identify all pairs of indistinguishable states in a DFA. This process partitions the DFA's states into equivalence classes, where all states within a class are functionally identical. We saw that these states are prime candidates for merging.
Today, we will complete the minimization process. Our goal is to take these equivalence classes and use them to build a new, smaller DFA that accepts the exact same language. This lesson directly addresses the learning outcome: Construct the unique minimal DFA equivalent to a given DFA. By the end of this lesson, you will be able to transform any DFA into its most compact form, which is not just a minimal DFA, but the unique minimal DFA for that language.
1. From Equivalence Classes to a New Automaton
The process of constructing a new automaton from the equivalence classes of an old one is a formal procedure known as a quotient construction. Given your background in computer science, you can think of this as creating a new, more abstract data structure where each element represents a set of equivalent elements from the original structure.
Let's say our original DFA is and our table-filling algorithm has partitioned into equivalence classes of indistinguishable states. We denote the equivalence class containing state as .
We can now define the new, minimized DFA, , as follows:
- States (): The set of states in the new machine is the set of all equivalence classes.
- Alphabet (): The alphabet remains unchanged.
- Start State (): The new start state is the equivalence class containing the original start state, .
- Final States (): The new set of final states consists of all equivalence classes that contain an original final state. A key property guaranteed by the minimization algorithm is that an equivalence class will never mix final and non-final states.
- Transition Function (): This is the core of the construction. To find the transition from a new state on an input symbol , we look at where any state within that class (e.g., ) goes in the original machine. The new transition goes to the equivalence class containing that destination state, .
A crucial point here is that this new transition function is well-defined. This means that no matter which representative state you choose from an equivalence class, the resulting transition will always lead to the same destination class.
Lecture 13 DFA State Minimization
For a rigorous justification of this construction, please refer to the following lecture notes. They provide formal proofs that the quotient automaton is well-defined and accepts the same language as the original.
Please read the section 'The Quotient Construction' (pages 2-4). Focus on the formal definitions of the quotient automaton M/≈ and the proofs in Lemma 13.5 and Theorem 13.8, which establish that the construction is valid and language-preserving.
2. A Step-by-Step Example
Let's see this construction in action. The best way to understand the process is to walk through an example from start to finish.
Myhill Nerode Theorem - Table Filling Method
The following video segment demonstrates exactly how to combine the unmarked pairs from the table-filling algorithm to construct the final, minimized DFA.
Watch from 14:50 to the end of the video. The presenter takes the set of unmarked pairs (which represent the equivalence classes) and uses them to build the states and transitions of the new, smaller automaton.
As you saw in the video, the process boils down to these steps:
- Identify Equivalence Classes: After running the table-filling algorithm, group the states based on the unmarked pairs. Every state will belong to exactly one class.
- Create New States: Each equivalence class becomes a single state in the new DFA.
- Define Start and Final States:
- The new start state is the class containing the original start state.
- The new final states are the classes composed of original final states.
- Define Transitions: For each new state (class) and each symbol in the alphabet, pick a representative state from the class. Find its transition in the original DFA and see which class the destination state belongs to. This target class is the destination for the new transition.
The image below provides a fantastic summary of the entire process, showing the original DFA, the partitioning of states into equivalence classes (0-equivalence, 1-equivalence, etc.), and the resulting minimized DFA.

This image illustrates the entire workflow of DFA minimization. It begins with an initial DFA, shows the iterative process of partitioning states into equivalence classes, and concludes with the final, compact minimized DFA.
3. The Uniqueness of the Minimal DFA
A remarkable and powerful result in automata theory, known as the Myhill-Nerode Theorem, guarantees that the DFA produced by this method is not just small, but is the unique minimal DFA for the given regular language (up to isomorphism, which means you could rename the states, but the structure would be identical).
This is a profound concept. It means that any regular language has a single, canonical automaton representation. No matter what initial (and possibly bloated) DFA you start with, the minimization algorithm will always lead you to the same minimal machine.
1 Minimization of Finite Automata
The following resource provides a concise explanation for why this algorithm yields a truly minimal automaton.
First, read Lemma 1 in section 2. It states that a DFA is minimal if and only if all its state pairs are distinguishable. Our algorithm ensures this by merging all indistinguishable pairs. Then, review the 'Why is Aˆ minimal?' part of the proof of Theorem 1 at the end of the document. This connects the construction directly to the criterion from Lemma 1.
The existence of a unique minimal DFA has practical implications. For instance, to check if two different DFAs accept the same language, you can simply minimize both. If the resulting minimal DFAs are isomorphic, the original DFAs were equivalent. This is much more efficient than trying to test all possible strings.
Test your understanding!
In the previous lesson, you worked on the DFA below and found that the pairs and were indistinguishable. (All other pairs not containing these were distinguishable).
A DFA with seven states, q0 through q6. The alphabet is {a, b}. The start state is q0 and the only final state is q5.
Based on this, construct the minimal DFA. Provide its 5-tuple and draw its state diagram.
Show answer
1. Identify Equivalence Classes
The indistinguishable pairs are and . This partitions the original states into the following equivalence classes:
2. Define the 5-Tuple of
- (since is the only original final state)
3. Construct the Transition Function
We determine the new transitions by picking a representative from each class.
- From :
- From : (Let's use as the representative)
- From : (Let's use as the representative)
- From : (Final state)
- From : (Trap state)
4. Draw the State Diagram
The resulting minimal DFA looks like this:
(Imagine a state diagram with 5 states: S0, S1, S2, S3, S4)
- S0 is the start state.
- S3 is the final state.
- Transitions:
- S0 -> S1 on 'a' and 'b'
- S1 -> S2 on 'a' and 'b'
- S2 -> S3 on 'a' and 'b'
- S3 -> S4 on 'a' and 'b'
- S4 -> S4 on 'a' and 'b' (self-loop)
This 5-state DFA is equivalent to the original 7-state DFA.
Conclusion
In this lesson, we have completed our journey through DFA minimization. You now have a complete, powerful algorithm to take any DFA and reduce it to its smallest possible equivalent form.
Key Takeaways:
- The minimal DFA is constructed as a quotient automaton, where the states are the equivalence classes of indistinguishable states from the original DFA.
- The construction involves defining a new 5-tuple: the states, start state, final states, and transition function are all derived from the equivalence classes.
- The resulting minimized DFA is unique for any given regular language (up to state relabeling), providing a canonical representation.
- This uniqueness is a powerful tool for solving problems like testing the equivalence of two different DFAs.
Preview of the Next Lesson:
Now that we have a solid understanding of regular languages and their machine counterparts, we can start asking broader questions about their properties. In the next lesson, we will explore decision problems for regular languages. We will investigate algorithms that can answer questions like: Is the language accepted by a DFA empty? Is it finite or infinite? Is a given string a member of the language? The tools we've developed, especially minimization, will prove to be very useful.