Minimising a DFA
Two states are equivalent if no word tells them apart. The minimal automaton merges such states.
Rules
- Remove unreachable states
- Start: accepting against non-accepting
- Split blocks when transitions lead to different blocks
- Repeat until nothing changes
Your turn
Three problems on this topic. The software checks your answer exactly.
- 1 · Minimise a DFA
- 2
- 3
Minimise the automaton. How many states does the minimal DFA have?
| δ | a | b |
|---|---|---|
| → *q0 | q3 | q2 |
| q1 | q4 | q4 |
| *q2 | q4 | q1 |
| q3 | q3 | q0 |
| q4 | q1 | q1 |
Number of states
Worked example
Minimise the automaton. How many states does the minimal DFA have?
| δ | a | b |
|---|---|---|
| → *q0 | q0 | q3 |
| *q1 | q2 | q4 |
| *q2 | q1 | q4 |
| *q3 | q2 | q2 |
| *q4 | q5 | q0 |
| q5 | q3 | q1 |
Worked solution
- 1First split accepting and non-accepting states, then refine the blocks until all transitions lead to the same block.
- 2Minimal automaton:
- 3→ *q0: a→q0, b→q1
- 4*q1: a→q2, b→q2
- 5*q2: a→q2, b→q3
- 6*q3: a→q4, b→q0
- 7q4: a→q1, b→q2
Typical mistake: Remove unreachable states first, or too many blocks remain.
Common questions
Is the minimal DFA unique?
Yes, up to the names of the states.
