Turing machines are
closed under composition. First assume we’
re working with
turing machines which map
Nk to
N, and also assume that we’
re working with alphabet
S={0,1,_}. Now to encode the composition
h:n↦f(g1(n),…,gk(n)) we can do the following. WLOG assume that each
gi uses only the subset
kN+i⊆Z of the tape (this does not impact
turing machine power). Now to run
h, do the following. Accept an input number in binary format. Now ‘smear’ each input digit into eight copies along the substrates
kN+i we’ve allotted for the composees
gi. Now run
g1, then
g2, up through
gk. By restricting each
gi to the substrate
kN+i we guarantee that no composee
gi will interfere with another. The result will be a tape empty on the left side and containing
k interlaced numbers on the right side. Read off the first number, copying it to the left side of the tape. Read off the second number, copying it, placing it next to the first number separated by a blank character. Repeat
k times, and then
zero out the right side of the tape. Move these numbers back to the right side of the tape, and
zero out the left side. Now we have
k numbers—the results of the
gis—on the tape; these form the input for
f. Run
f.