Question

Consider a finite state machine (FSM) with one input XX and one output ff, represented by the given state transition table. The minimum number of states required to realize this FSM is ________. (Answer in integer)

Present stateNext state (X=0)Next state (X=1)Output f (X=0)Output f (X=1)
AFB00
BDC00
CFE00
DGA10
EDC00
FFB11
GGH01
HGA10
Official answer and solution
Official answer
5
From
Official GATE 2025 answer key

Solution

Apply Moore/Mealy partition refinement starting from the output equivalence classes.

  1. Initial partition P0P_0 by output (f∣X=0,f∣X=1)(f|_{X=0}, f|_{X=1}):
    • Output (0, 0): {A,B,C,E}\{A, B, C, E\}
    • Output (1, 0): {D,H}\{D, H\}
    • Output (1, 1): {F}\{F\}
    • Output (0, 1): {G}\{G\}
  2. Refine {D,H}\{D, H\}:
    • Both DD and HH transition to (G,A)(G, A), so D≡HD \equiv H.
  3. Refine {A,B,C,E}\{A, B, C, E\}:
    • BB and EE have the exact same next-state transitions (D,C)(D, C), so B≡EB \equiv E.
    • AA transitions to (F,B)(F, B) and CC transitions to (F,E)(F, E). Since B≡EB \equiv E, AA and CC transition to equivalent next states for all inputs, while differing from BB and EE on X=0X = 0 (F≢DF \not\equiv D). Thus {A,B,C,E}\{A, B, C, E\} splits into {A,C}\{A, C\} and {B,E}\{B, E\}.

The final equivalence classes are {A,C},{B,E},{D,H},{F},{G}\{A, C\}, \{B, E\}, \{D, H\}, \{F\}, \{G\}, giving a minimum of 5 states.

Final answer

5

The answer is the one in the official GATE answer key. The solution is this site's own explanation.

Source

Paper
GATE 2025 Computer Science and Information Technology - Session 1 (CS1)
Question
59 of 65
Section
Computer Science and Information Technology

Report an error in this question

GATE questions are the work of the organising institutes. This site is independent and is not affiliated with them.