TM that cannot write on the portion of the tape containing the input string recognizes only regular language

regular-languageturing-machines

Sipser's Theory of Computation, 3rd edition, page 189, problem 3.11 asks us to prove this. There is some doubt in my mind as to what exactly is the restriction on the Turing machine. The answer at Show that single-tape TMs that cannot write on the portion of the tape containing the input string recognizes only regular languages. refers to the machine as "read-only," but the wording of the problems seems to imply that there is some portion of the tape other than the input portion.

It seems to me that the machine could simply copy its input to another portion of the tape and read and write that portion just the same way that it would read and write the "input portion." It seems that such a machine would in fact recognize languages that are not regular.

So what is this problem really asking for? And how is the answer demonstrated?

Best Answer

In the statement of the problem, you are allowed to use tape after the input string as rewritable memory. Although if you're not convinced about the weaker case where the Turing machine is entirely read-only, I'd suggest thinking about that first.

From the perspective of all the computation happening in the writable memory, when it sends the head into the read-only part of memory, it feels like sending a probe off into an unknown void. The writable memory stays static until the probe returns with the information it captured.

The issue is that when sending the head into the read-only section of the tape, all of the information about what your want to probe about the input must be stored in the finite state of the Turing machine when it gets sent into the read-only section. And all of the information you get back must be stored in the finite state of the Turing machine when it returns.

So there's really only finitely many possible queries you can make of the input string, one for each state you could enter the read-only section in. The result of the query is read off from the state you leave the read-only section in. The list of answers to each of these queries fully encapsulates all the information this particular Turing machine can capture about the input.

There are a few fiddly details about handing the fact that the head starts in the read-only section, or what to do if the machine accepts or rejects while the head is in the read-only section. These appear to be covered in the answer to the question you linked.