Skip to content
Official PYQ · 1995

GATE CS 1995 Q2.23 — Sequential Circuits

Explain with AI

A finite state machine with the following state table has a single input xx and a single out zz.

present statenext state, zx=1x=0AD,0B,0BB,1C,1CB,0D,1DB,1C,0\begin{array}{|c|ll|}\hline \textbf{present state} & \qquad \textbf{next state, z} \\ & \text{x=1} & \text{x=0} \\ \hline \text{A} & \text{D,0} & \text{B,0} \\ \hline \text{B} & \text{B,1} & \text{C,1} \\ \hline \text{C} & \text{B,0} & \text{D,1} \\ \hline \text{D} & \text{B,1} & \text{C,0} \\ \hline \end{array}

If the initial state is unknown, then the shortest input sequence to reach the final state CC is:

Choose one option
View worked solution

Answer: B

To find the shortest input sequence that guarantees reaching the state CC from an unknown initial state, we must find a sequence of inputs that maps the set of all possible initial states, S0={A,B,C,D}S_0 = \{A, B, C, D\}, to the singleton set {C}\{C\}.

Let's trace the state transitions for the input sequences starting with length 1:

  • If the input is 00:
    • A→0BA \xrightarrow{0} B
    • B→0CB \xrightarrow{0} C
    • C→0DC \xrightarrow{0} D
    • D→0CD \xrightarrow{0} C
    The set of possible states becomes {B,C,D}\{B, C, D\} (not guaranteed to be CC).
  • If the input is 11:
    • A→1DA \xrightarrow{1} D
    • B→1BB \xrightarrow{1} B
    • C→1BC \xrightarrow{1} B
    • D→1BD \xrightarrow{1} B
    The set of possible states becomes {B,D}\{B, D\} (not guaranteed to be CC).

Since no single-input sequence guarantees reaching state CC, we test the 2-input sequences starting from the state sets obtained above:

Testing Option B: 1010 (Input 11 followed by 00)

  1. Applying input 11 to the initial set {A,B,C,D}\{A, B, C, D\} results in the state set {B,D}\{B, D\}.
  2. Now, applying input 00 to the set {B,D}\{B, D\}:
    • B→0CB \xrightarrow{0} C
    • D→0CD \xrightarrow{0} C
    The resulting state is guaranteed to be {C}\{C\}.

Thus, the sequence 1010 successfully forces the machine into state CC regardless of the initial state.

Testing Option A: 0101 (Input 00 followed by 11)

  1. Applying input 00 to the initial set {A,B,C,D}\{A, B, C, D\} results in the state set {B,C,D}\{B, C, D\}.
  2. Applying input 11 to the set {B,C,D}\{B, C, D\}:
    • B→1BB \xrightarrow{1} B
    • C→1BC \xrightarrow{1} B
    • D→1BD \xrightarrow{1} B
    The resulting state is {B}\{B\}, not CC.

Therefore, the shortest input sequence to reach the final state CC is 1010.

Free practice · Your answers on this page are not saved.

Published
Report a correction
Keep exploringMore Sequential Circuits questions