Similar questions 3 more →
Finite-State Machine Design


Answer & solution
Answer: {A}, {B}, {C,D}, {E,F,G}, {H}. (no official key was published)
Two Mealy states are equivalent if every finite input string produces the same output string from either state. In particular they must first agree on their immediate output for each input. The output pairs are (1,1) for A,B,E,F,G and (0,1) for C,D,H. This gives the initial partition P0={ABEFG,CDH}.
Refine each block according to the blocks reached on inputs 0 and 1, while retaining the output test. In P0, A and B lead respectively to blocks (ABEFG,CDH); E,F,G lead to (CDH,CDH); and C,D,H lead to (CDH,ABEFG). Hence P1={AB,EFG,CDH}.
Now use P1 to distinguish formerly similar successor states. A reaches (AB,CDH), whereas B reaches (EFG,CDH), splitting A from B. C and D both reach (CDH,EFG), whereas H reaches (CDH,AB), splitting H from CD. The states E,F,G still both transition into CDH. Thus P2={A,B,CD,EFG,H}.
Check stability: C and D have equal outputs and both go into CD on 0 and EFG on 1. Each of E,F,G has output 1 on both inputs and goes into CD on both inputs. No further split is needed. The singleton blocks trivially satisfy stability, so P2 is the equivalence partition.
Refinement never separates equivalent states: a split witnesses a finite input on which outputs eventually differ. For example, A and B are distinguished by 000, producing 111 and 110 respectively; H and C are distinguished by 100, producing 111 and 110. Conversely, a stable equal-output partition guarantees equal output sequences by induction on input length. This proves both directions, rather than guessing equivalent states from one-step transitions alone.