Turing Machines can be used to compute functions.
For example f(x)=x-1
.
0011
is on the tape. Turing Machine computes for some time and finishes in accept state. On the tape, we see: _00_10_
. Where _
is a blank symbol. Is it correct? Meaning 0011 == _00_10_
.
For exaple in Python: [] + [1] + [] + [2] + [] == [1,2]
is True.
When Turing Machine is used for recognizing language everything is clear. It is not important what is on the tape. Only final state: accept or reject.
0011
and output is_00_10_
$\endgroup$