Chapter 13: Q28E (page 898)
By finding the composite of the Turing machines you constructed in Exercises \({\bf{18}}\) and \({\bf{23}}\), construct a Turing machine that computes the function \(f\left( n \right) = 3\left( {n + 2} \right) = {\bf{ }}3{\bf{ }}n + 6\).
Short Answer
The constructed Turing machine that computes the function \(f\left( n \right) = 3\left( {n + 2} \right) = {\bf{ }}3{\bf{ }}n + 6\) is
\(\begin{array}{l}T = \left( {S,I,f,{s_0}} \right),S = \left\{ {{s_0},{s_1},{s_2}} \right\},I = \{ 0,1,B\} ,\\\left( {{s_0},0,{s_0},0,L} \right),\left( {{s_0},0,{s_0},1,L} \right),\left( {{s_0},B,{s_1},1,L} \right),\left( {{s_1},B,s_0^{}',1,L} \right)\\\left( {s_0^{}',1,s_0^{}',1,R} \right),\left( {s_0^{}',B,s_1^{}',B,L} \right),\left( {s_1^{}',1,s_2^{}',0,L} \right),\left( {s_2^{}',0,s_2^{}',0,L} \right)\\\left( {s_2^{}',1,s_3^{}',0,R} \right),\left( {s_2^{}',B,s_6^{}',B,R} \right),\left( {s_3^{}',0,s_3^{}',0,R} \right),\left( {s_3^{}',1,s_3^{}',1,R} \right)\\\left( {s_3^{}',B,s_4^{}',1,L} \right),\left( {s_4^{}',B,s_1^{}',1,L} \right),\left( {s_5^{}',0,s_2^{}',0,L} \right),\left( {s_5^{}',1,s_5^{}',1,L} \right)\\\left( {s_6^{}',0,s_6^{}',1,R} \right),\left( {s_6^{}',1,s_7^{}',1,R} \right),\left( {s_6^{}',B,s_7^{}',B,R} \right)\end{array}\)