Skip to content
Official PYQ · 2003

GATE CS 2003 Q53 — Undecidability

Explain with AI

A single tape Turing Machine MM has two states q0q0 and q1q1, of which q0q0 is the starting state. The tape alphabet of MM is {0,1,B}\{0, 1, B\} and its input alphabet is {0,1}\{0, 1\}. The symbol BB is the blank symbol used to indicate end of an input string. The transition function of MM is described in the following table.

01Bq0q1,1,Rq1,1,RHaltq1q1,1,Rq0,1,Lq0,B,L\begin{array}{|l|l|l|l|}\hline \text{} & \text{$0$} & \text{$1$} & \text{$B$} \\ \hline \text{$q0$} & \text{$q1, 1, R$} & \text{$q1, 1, R$} & \text{$Halt$} \\ \hline \text{$q1$} & \text{$q1, 1, R$} & \text{$q0, 1, L$} & \text{$q0, B, L$} \\ \hline \end{array}

The table is interpreted as illustrated below.

The entry (q1,1,R)(q1, 1, R) in row q0q0 and column 11 signifies that if MM is in state q0q0 and reads 11 on the current page square, then it writes 11 on the same tape square, moves its tape head one position to the right and transitions to state q1q1.

Which of the following statements is true about MM?

Choose one option
View worked solution

Answer: A

To determine the behavior of the Turing Machine MM, let us trace its execution on simple non-empty input strings:

Case 1: Input string is "0" (Tape: 0‾ B\underline{0}\ B with head at 00 in state q0q_0)

  1. (q0,0)→(q_0, 0) \to writes 11, moves RR, transitions to q1q_1. Tape: 1 B‾1\ \underline{B}, state q1q_1.
  2. (q1,B)→(q_1, B) \to writes BB, moves LL, transitions to q0q_0. Tape: 1‾ B\underline{1}\ B, state q0q_0.
  3. (q0,1)→(q_0, 1) \to writes 11, moves RR, transitions to q1q_1. Tape: 1 B‾1\ \underline{B}, state q1q_1.

Steps 2 and 3 repeat indefinitely. Thus, MM does not halt on "0".

Case 2: Input string is "1" (Tape: 1‾ B\underline{1}\ B with head at 11 in state q0q_0)

  1. (q0,1)→(q_0, 1) \to writes 11, moves RR, transitions to q1q_1. Tape: 1 B‾1\ \underline{B}, state q1q_1.
  2. (q1,B)→(q_1, B) \to writes BB, moves LL, transitions to q0q_0. Tape: 1‾ B\underline{1}\ B, state q0q_0.

This also results in an infinite loop.

General Analysis:

  • If MM encounters a 11 in state q1q_1, it writes 11, moves left, and transitions to q0q_0. In state q0q_0, it reads that same 11, writes 11, moves right, and transitions back to q1q_1. This creates an immediate infinite loop between these two adjacent cells.
  • If MM reaches the end of the input string (blank symbol BB) in state q1q_1, it writes BB, moves left, and transitions to q0q_0 (where it reads 11). From q0q_0 reading 11, it moves right to BB in state q1q_1, creating an infinite loop at the boundary.

Thus, MM never halts on any non-empty string, meaning it does not halt on any string in (0+1)+(0+1)^+. Note that MM halts on the empty string ϵ\epsilon (since δ(q0,B)=Halt\delta(q_0, B) = \text{Halt}), which belongs to (00+1)∗(00+1)^*, making option B false.

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

Published
Report a correction
Keep exploringMore Undecidability questions