Minimizing a Mealy machine by partition refinement
Finite-State Machine Design

Answer & solution
Official answer: 5
Step through it (3 steps)
Approach: Equivalent Mealy states must produce the same immediate output for each input and lead to equivalent states. Refine partitions until stable.
Group first by output pair: P0={{A,B,C,E},{D,H},{F},{G}}, corresponding to 00,10,11,01. States in different groups are already distinguishable by a single input.
Within the 00 group, A and C go on input 0 to F, while B and E go to the 10 group {D,H}. Those destination groups differ, so split 00 into {A,C} and {B,E}. On input 1 they all initially went to the 00 group, which did not prevent the split required by input 0.
Now check P1={{A,C},{B,E},{D,H},{F},{G}}. A,C both lead to {F} on 0 and {B,E} on 1. B,E both lead to {D,H} on 0 and {A,C} on 1. D,H both lead to {G} on 0 and {A,C} on 1. Thus every multi-state group has identical destination-group signatures and no further split is required.
The stable equivalence classes are AC, BE, DH, F and G: five states. Partition refinement both constructs a five-state realization and proves that the distinguishable classes cannot be merged.





