...

/

Minimal Mealy Machines

Minimal Mealy Machines

Learn how to minimize the number of states in a Mealy machine.

Minimizing number of states in Mealy machines

We can minimize the number of states in a Mealy machine just as we did for DFAs. The machine below, which prints a 11 for each bb and a 11 for every other aa, starting with the first, has one more state than it needs.

Press + to interact
An inefficient mealy machine
An inefficient mealy machine

Since we want the first aa to emit a 11 and then alternate from there, we can eliminate state q0q_0 and make q2q_2 the initial state.

Press + to interact
A minimal version of the Mealy machine shown in the previous figure
A minimal version of the Mealy machine shown in the previous figure

No move is needed for b ...