GATE / CS ARCHIVE

GATE CSE 1997 / QUESTION 70(a)

Equivalence partition of a Mealy machine

Digital Logic · Finite-State Machine Design · Full GATE CSE 1997 paper

GATE 1997, Q70(a) 2 marks · Descriptive
Report issue

Finite-State Machine Design

Question 70(a), GATE 1997: The Mealy state table gives (next state,output) for inputs 0 and 1:
A: 0→(B,1), 1→(H,1)
B: 0→(F,1), 1→(D,1)
C: 0→(D,0), 1→(E,1)
D: 0→(C,0), 1→(F,1)
E: 0→(D,1), 1→(C,1)
F: 0→(C,1), 1→(C,1)
G: 0→(C,1), 1→(D,1)
H: 0→(C,0), 1→(A,1).
No initial state is specified. Find the equivalence partition of its states.
Question 70(a), GATE 1997: The Mealy state table gives (next state,output) for inputs 0 and 1:
A: 0→(B,1), 1→(H,1)
B: 0→(F,1), 1→(D,1)
C: 0→(D,0), 1→(E,1)
D: 0→(C,0), 1→(F,1)
E: 0→(D,1), 1→(C,1)
F: 0→(C,1), 1→(C,1)
G: 0→(C,1), 1→(D,1)
H: 0→(C,0), 1→(A,1).
No initial state is specified. Find the equivalence partition of its states.
Tap to enlarge
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.

Original paper, page 10