GATE Computer ScienceVery hardGATE CS (PYQ pattern)

For the same TM with rules δ(q0,X) = (q0,X,R); δ(q0,0) = (q1,X,R); δ(q0,1) = (q2,X,R); δ(q0,B) = (qa,B,R); δ(q1,0) = (q1,0,R); δ(q1,X) = (q1,X,R); δ(q1,1) = (q3,X,L); δ(q2,1) = (q2,1,R); δ(q2,X) = (q2,X,R); δ(q2,0) = (q3,X,L); δ(q3,0) = (q3,0,L); δ(q3,1) = (q3,1,L); δ(q3,X) = (q3,X,L); δ(q3,B) = (q0,B,R), how many moves does it make to accept the input 0110 (starting in q0 on the leftmost cell)?

  1. A. 17
  2. B. 14
  3. C. 21
  4. D. 12

Correct answer: A. 17

Simulating round by round (cross off 0 and the first 1, return left, then repeat for the remaining pair) and the final scan to the blank takes 17 moves.

More Theory of Computation questions

Exams that ask this topic