Minimization Step by Step
Run table filling step by step on the product automaton for "contains aa or contains bb": predict which pairs are marked in each round, check that the minimal automaton is equivalent to the original, and meet a product that minimization does not shrink.
Last updated:
Table filling on the product automaton
The tool below holds the product automaton from the lesson Minimizing Automata by Table Filling, for the words that contain or contain .
The state is written (qa,pb) in the tool, and likewise the others.
The button “Minimise step by step” shows the steps of minimization one at a time:
removing the states that cannot be reached, the pairs marked in each round with the distinguishing word of each pair, and at the end the classes and the quotient automaton.
The tool needs JavaScript. Solve the questions below on paper, using the transition table of the product in the lesson.
Questions
Question 1. Before you press “Minimise step by step”, predict:
how many states will be removed because they cannot be reached?
How many pairs will be marked in round 0? Which pairs will be marked in round 1, and by which distinguishing word?
Then go through the steps in the tool and compare.
Hint
Round 0 marks every pair of an accepting and a non-accepting state.
In round 1 only pairs of two non-accepting states are left; for each such pair, check where each letter leads the two states.
Answer
One state is removed, . 8 states remain: 5 accepting and 3 non-accepting, so round 0 marks pairs, with the distinguishing word .
Round 1 marks the three pairs of non-accepting states:
- by the word : it leads to and to , and only the second accepts.
- by the word : it leads to and to .
- by the word : it leads to and to .
Round 2 marks no pair, so minimization stops. The classes are the three non-accepting states, each on its own, and the five accepting states together:
4 states, as in the validator designed directly.
Question 2. At the end of the steps, press “Show the minimal automaton as machine B”.
Go back to machine A, choose “the other machine” in “Check against” and press “Check”.
Predict the result before you press, and explain why it has to come out this way.
Hint
Machine B is the quotient automaton of A. What did the lesson prove about the language of the quotient automaton?
Answer
The tool reports that the machines accept exactly the same words:
they are equivalent automata. Removing states that cannot be reached changes no run, and the lesson proved that the quotient automaton recognizes the same language as the automaton it was built from.
Hence , with 4 states instead of 9.
Question 3. Change machine A so that it recognizes the words that contain and contain :
in the product automaton, only the state accepts. Double-click a state, or tick its Accepting box in the list of states, to switch it between accepting and not accepting.
Before minimizing, predict how many states will remain, then run it.
Why is the result different from the one for “or”?
Hint
For “or”, the five accepting states were merged, because from each of them every continuation is accepted.
For “and”, are there two different states from which exactly the same continuations are accepted?
Think about what each state still lacks before and before .
Answer
8 states remain: only the unreachable is removed, and no pair is merged.
The table marks pairs up to round 3; for example the shortest distinguishing word of and is , which completes from and then .
For “and”, each state remembers what is still missing in both parts, and that information changes which continuations are accepted.
For “or”, as soon as one part is complete the word is accepted under every continuation, so what the other component remembers no longer matters.
The transitions are the same in both versions; only the set of accepting states changed, and it decides which states merge.
Back to Minimizing Automata by Table Filling, or see the glossary.