GATE Computer ScienceVery hardGATE CSE

A Mealy machine starts in S0. Transitions (state, input → next state / output): (S0,0 → S0/0), (S0,1 → S1/1), (S1,0 → S2/1), (S1,1 → S1/0), (S2,0 → S0/1), (S2,1 → S2/1). For the input 1101011011100110 how many 1s appear in the output string?

  1. A. 14
  2. B. 11
  3. C. 12
  4. D. 16

Correct answer: C. 12

Tracing the 16 steps gives output 1011110111110101, which contains 12 ones.

More Theory of Computation questions

Exams that ask this topic