GATE / CS ARCHIVE

GATE CSE 2009 / QUESTION 27

Shortest input to a specified FSM output

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

GATE 2009, Q27 2 marks · MCQ
Report issue

Finite-State Machine Design

Question 27, GATE 2009: A two-bit state AB starts 00. For input 0, states 00, 01, 10, 11 transition respectively to 00, 10, 01, 10 with outputs 1, 0, 0, 0. For input 1 they transition to 01, 00, 01, 00 with outputs 0, 1, 1, 1. Minimum input length that arrives in 01 while emitting 1? A 3; B 4; C 5; D 6.
Tap to enlarge
Your answer
Answer & solution

Answer: A (no official key was published)

The only transition ending in state 01 with output 1 is from state 10 on input 1. From 00, reaching 10 requires at least two inputs:00 --1/0-->01 --0/0-->10. Appending 1 reaches 01 and emits 1. Thus input 101 achieves the target in 3 steps, and the predecessor argument rules out shorter inputs. Answer A.

Work backward from the desired transition: among rows ending in 01, output 1 occurs only from 10 on input 1. From initial 00, a single input reaches only 00 or 01, never 10, so at least two inputs are needed before the final 1. Input 1 reaches 01 with output 0, then 0 reaches 10 with output 0, then 1 reaches 01 with output 1. This witness 101 has length 3 and matches the lower bound.

Original paper, page 6