GATE / CS ARCHIVE

GATE CSE 2003 / QUESTION 44

Minimal states for a latched count-difference detector

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

GATE 2003, Q44 2 marks · MCQ
Report issue

Finite-State Machine Design

Question 44, GATE 2003: A synchronous sequential circuit has one input and two output bits. Let zₖ,nₖ count zeros and ones in the first k input bits. Initially output is 00. When zₖ−nₖ first reaches 2, output becomes 10 forever. When nₖ−zₖ first reaches 2, output becomes 01 forever. What is the minimum number of states? A. 5; B. 6; C. 7; D. 8.
Tap to enlarge
Your answer
Answer & solution

Answer: A (no official key was published)

1. Before absorption retain only d=zₖ−nₖ. On input 0 increment d and on input 1 decrement it. Values −1,0,+1 are nonabsorbing and still output 00; reaching +2 or −2 selects different permanent outputs. Distinguish 0 from +1 by suffix 0, 0 from −1 by suffix 1, and −1 from +1 by suffix 0, proving the three transient states cannot merge.

2. Before a threshold is reached, it suffices to track d=(zeros seen)−(ones seen) in {−1,0,1}. Reaching +2 or −2 enters a separate absorbing state with output 10 or 01. Thus five states suffice. They are all distinguishable: the absorbing states have different outputs, and appropriate one-bit continuations separate each pair of the three pre-threshold states. Hence five states are necessary, option A.

Original paper, page 6