Section 5.1

Universal Turing Machines

[6/50%]
Show
LaTeX
Example 5.1

Show that the set L={x∈{0,1}∗∣x is a legal code }L=\left\{ x \in \left\{ 0,1\right\}^{*} \mid x\text{ is a legal code }\right\} is primitive recursive.

?
Example 5.4

Show that the following predicates are primitive recursive:

?
(a)

legal⁡(u,y)=[u\operatorname {legal}(u, y)=\left[u\right. is a legal code of a configuration of My]\left.M_{y}\right].

(b)

final⁡(u,y)=[legal⁡(u,y)\operatorname {final}(u, y)=[\operatorname {legal}(u, y) and uu is a final configuration ]].

(c)

next⁡(u,v,y)=[\operatorname {next}(u, v, y)=\left[\right. if final⁡(u,y)\operatorname {final}(u, y) then u=vu=v else u⊢Myv]\left.u \vdash_{M_{y}} v\right].

Example 5.5

Show that the following functions are primitive recursive:

?
(a)

init⁡k(x1,…,xk,y)=\operatorname {init}^{k}\left(x_{1}, \ldots , x_{k}, y\right)= the initial configuration of MyM_{y} on inputs (x1,…x_{1}, \ldots, xk)\left.x_{k}\right), encoded as described above.

(b)

output⁡(u,y)=\operatorname {output}(u, y)= the output in uu if uu is a final configuration of MyM_{y}, and =0=0 otherwise.

Problem 5.1.1

Show that the following functions are primitive recursive:

?
(a)

state⁡(i,ℓ,x)=[x\operatorname {state}(i, \ell , x)=[x is a legal code of a DTM M]M] and [substr⁡{0,1}(x,i\left[\operatorname {substr}_{\left\{ 0,1\right\} }(x, i\right., ℓ+2\ell +2) is equal to 10ℓ110^{\ell } 1 and represents a state qℓq_{\ell } in MM ].

(b)

chstate⁡(x,i,j)=\operatorname {chstate}(x, i, j)= the code of a DTM which is obtained from MxM_{x} by changing each state qiq_{i} to qjq_{j}, if xx is a legal code of a DTM MxM_{x}; and it is =0=0, otherwise.

(c)

∞loop⁡(i,x)=[x\infty \operatorname {loop}(i, x)=[x is a legal DTM code ]] and [Mx\left[M_{x}\right. is undefined at state qiq_{i} on any symbol in Γ]\left.\Gamma \right].

Problem 5.1.2

Complete the proof of Example 5.4(c).

?
Problem 5.1.3

Show the detail of how the universal DTM UU simulates a DTM MyM_{y}. In particular, show the instructions that search for the instruction code that matches the current state in tape 3 and the current symbol in tape 2. Then, show how to change state, change tape symbol and move left or right according to the instruction code.

?