261 views
0 0 votes

"Given a Turing machine $M$ and an input $w$, does $M$, during its computation on $w$, ever revisit the starting tape cell (the cell under the head at the beginning)?"

  1. The problem is decidable: there is an algorithm that always halts and correctly answers yes/no for every pair $(M, w)$.
     
  2. The problem is undecidable: no algorithm can decide it for all pairs ( $M, w$ ).
     
  3. The problem is semi-decidable (recursively enumerable) but not decidable: there is a procedure that halts and accepts exactly the yes-instances, but no procedure that decides both yes and no.
     
  4. The problem is decidable exactly for Turing machines that are total (i.e., that halt on every input); in the general case it is undecidable.

1 Answer

0 0 votes

The correct answer is

$$

\boxed{\text{C. Semi-decidable but not decidable}}

$$

There is a procedure that halts and accepts exactly the YES-instances, but no procedure that decides both YES and NO.


Detailed Proof and Explanation

To determine the decidability status of this problem, we need to prove two things:

  1. It is undecidable (ruling out A).
  2. It is semi-decidable (which confirms C and rules out B and D).

Part 1: Proof of Undecidability (via Reduction)

We can prove that this problem is undecidable by reducing the Halting Problem

$$

HALT_{TM}

=

\left\{

\langle M,w\rangle

\mid

M \text{ halts on input } w

\right\}

$$

to it.

Recall that

$$

HALT_{TM}

$$

is a known undecidable problem.

The Reduction Construction

Suppose we have a decider

$$

\mathcal{D}

$$

for the "revisit starting cell" problem.

We can construct a Turing machine

$$

M'

$$

that simulates $M$ on $w$ in such a way that $M'$ revisits cell $0$ if and only if $M$ halts on $w$.

Construction of $M'$

  1. Shift the tape right:

On input $x$, $M'$ immediately writes a special boundary marker, say $\$$, at cell $1$, moves the head to cell $2$, and shifts the input $x$ to the right.

       2. Confine the simulation:

$M'$ simulates the computation of $M$ on $w$ strictly on the tape cells to the right of cell $1$, i.e., cells

$$

2,3,4,\ldots

$$

The construction ensures that the simulation never causes $M'$ to revisit cell $0$.

       3. Trigger a revisit on halting:

If the simulation of $M$ on $w$ halts, $M'$ enters a special state and moves the tape head left until it reaches the starting cell $0$.

Analysis of $M'$'s behavior

If $M$ halts on $w$, then

$$

M \text{ halts on } w

\implies

M' \text{ eventually reaches cell } 0.

$$

Therefore, $M'$ revisits its starting cell.

On the other hand, if $M$ does not halt on $w$, then

$$

M \text{ does not halt on } w

\implies

M' \text{ never enters the special state}.

$$

Hence, $M'$ never revisits cell $0$.

Therefore,

$$

\langle M,w\rangle \in HALT_{TM}

\iff

\langle M'\rangle \in RSC

$$

where $RSC$ denotes the problem

$$

RSC

=

\left\{

\langle M\rangle

\mid

M \text{ revisits its starting tape cell}

\right\}.

$$

Thus, if we had a decider $\mathcal{D}$ for $RSC$, we could decide $HALT_{TM}$, which is impossible.

Hence,

$$

\boxed{RSC\text{ is undecidable}.}

$$


Part 2: Proof of Semi-Decidability

A language is semi-decidable (recursively enumerable) if there exists a Turing machine that halts and accepts whenever the answer is YES, although it may run forever on NO-instances.

We can easily construct a recognizer $R$ for $RSC$.

Recognizer $R$

Given an input

$$

\langle M,w\rangle,

$$

$R$ performs the following steps:

1. Simulate the computation of $M$ on $w$ step-by-step.

2. Keep track of the current position of $M$'s tape head.

3. If the head moves away from cell $0$ and later returns to cell $0$, then $R$ halts and accepts.

4. If the head never returns to cell $0$, the simulation continues forever.

For a YES-instance, there exists some finite time $t$ such that

$$

\text{HeadPosition}(t)=0

$$

after the head has previously left cell $0$.

Since $R$ simulates the computation step-by-step, it will eventually reach that step $t$ and detect the revisit.

Therefore,

$$

\langle M,w\rangle \in RSC

\implies

R \text{ eventually accepts}.

$$

For a NO-instance, the head never revisits cell $0$, so $R$ may run forever.

Thus,

$$

RSC \text{ is semi-decidable}.

$$

Combining both results,

$$

\boxed{

RSC\text{ is semi-decidable but not decidable}

}

$$

Therefore, the correct answer is

$$

\boxed{\text{C}}

$$

• edited by
Answer:
Position:
Show:

Related questions

0 0 votes
1 1 answer
208
208 views
GO Classes asked Oct 30, 2025
208 views
Given a Turing machine $M$, a tape symbol $a$ from the tape alphabet $\Gamma$, and a nonempty input string $w \in \Sigma^{+}$, does $M$ ever write the symbol $a$ on its t...
2 2 votes
1 1 answer
242
242 views
GO Classes asked Oct 30, 2025
242 views
What language is accepted by the Turing machine whose transition graph is in the figure below?  $L\left(a b^*\right) \cup L\left(b^{+} a(a+b)^*\right)$ $L\left(a b^*\righ...
1 1 vote
1 1 answer
285
285 views
GO Classes asked Oct 30, 2025
285 views
Which of the following statements most accurately describes the output function of the Mealy machine shown in the figure, for any input string of length $k$ ?  The machin...
2 2 votes
1 1 answer
285
285 views
GO Classes asked Oct 30, 2025
285 views
Consider the following two problems about Turing machines:Problem (a): Given a Turing Machine $M$, does $L(M)$ contain any string of length five? Problem (b): Given a Tur...