3
$\begingroup$

How Turing machine can loop forever when input length is always finite? I think this is a basic doubt but unable to understand how TM go into infinite loop? I think it can make transition forever on empty string. What are the other cases? Can it make without any empty alphabet ?

$\endgroup$
3
$\begingroup$

A simple example is a Turing Machine with one state $q$, alphabet $\Sigma = \{a\}$, tape alphabet $\Gamma = \Sigma \cup \{\sqcup\}$ and the two transitions $q\times a \to q \times a \times \mathcal{R}$ and $q \times \sqcup \to q \times \sqcup \times \mathcal{R}$. It doesn't even change the tape.

$\endgroup$
5
$\begingroup$

It might help to think of Turing machines as a programming language. It's easy to see how a program in your favourite language might loop (its input is finite, too!) so you can translate that to a Turing machine.

$\endgroup$
4
$\begingroup$

Assuming the tape contains a string over $\{0,1\}$, so it represents a binary number.

Repeat: go to right end, add $1$.

$\endgroup$
3
$\begingroup$

Is is a property of the transition function. Transition function might take the turing machine into an infinite loop on a particular input even when the input length is finite. Consider the transition function below with states Q0 and Q1 Q0 is the halt state If Q1 reads ‘L’, then stay in Q1 and go left one cell. If Q1 reads ‘R’, then stay in Q1 and go right one cell. If Q1 reads ‘H’, then change to Q0 and remain at this cell.

On the input RRRLLLL the machine goes into a loop but that doesn't mean language accepted by the machine is empty. It does halts on inputs such as RRRRH etc.

$\endgroup$
  • $\begingroup$ Thanks for your answer, can you provide such function. Would be helpful. $\endgroup$ – Mr. Sigma. Dec 30 '16 at 6:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.