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)?
- A. 17
- B. 14
- C. 21
- 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
- L₁ is context-free, L₂ is regular and L₃ is deterministic context-free (all over the same alphabet Σ, complements taken w.r.t. Σ). Which…
- Which of the following statements about deterministic context-free languages (DCFLs) are correct? I. The complement of a DCFL is a DCFL…
- Which of the following statements about context-free languages are correct? I. The intersection of a CFL with a DCFL is always a CFL. II…
- Which of the following languages over {a, b, c} is NOT context-free?
- Which one of the following languages is regular?
- To show that L = { aⁱbʲ : i > j } is not regular by the pumping lemma with pumping length p, which string and pumping choice give a valid…