IAE Academy

GATE 2025 CS1 Q.59: solution and answer

GATE 2025 · CS1Q.59 · 2 marks · NAT

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

GATE 2025 CS1 question 59: State transition table with columns Present state, Next state (X=0, X=1), Output f (X=0, X=1).Tap to open full size
Figure from the GATE 2025 CS1 paper. It is part of the question.
Figure description

State transition table with columns Present state, Next state (X=0, X=1), Output f (X=0, X=1). Rows: A: F, B, 0, 0. B: D, C, 0, 0. C: F, E, 0, 0. D: G, A, 1, 0. E: D, C, 0, 0. F: F, B, 1, 1. G: G, H, 0, 1. H: G, A, 1, 0.

Answer and solution

ANSWER

The minimum number of states required is 5.

Official answer: 5Source: Official answer key, GATE 2025 CS1 (IIT Roorkee)

  1. Minimise by partition refinement. Two states are equivalent only if they give the same output for both inputs and move to equivalent states on both inputs.

  2. Group the states by their output pair . This gives with , with , with and with .

  3. Refine by the classes of the next states. lies in . lies in . lies in . lies in . So splits into and .

  4. and have identical next states, so stays together.

  5. Re-check with the new classes. and both go to . and have identical next states, going to . and still agree. No class splits further, so the partition is stable.

  6. The final classes are , , , , . The minimum number of states is .

KEY IDEA

Minimise a completely specified FSM by partition refinement. Start from the output classes, then split any class whose members go to different classes on some input, until no class splits.

WATCH OUT FOR

Merging states just because their outputs match, such as all of A, B, C, E, without checking that their next states fall in equivalent classes. Another slip is stopping after one refinement pass.

From the GATE 2025 CS1 paper. Every question of this paper · Download the full paper · All 37 Sequential questions, with notes

More Sequential questions