Church-Turing thesis

[2/50%]
Show
LaTeX

We present RAM's in more detail. A RAM is defined by a list of instructions, numbered from 1 to nn. An instruction is of one of the types shown in Figure 4.17. (Note: We only list the instructions in the form of using direct addressing. As discussed in the text, they can also use constants or indirect addressing.) Initially, all registers of a RAM contain

InstructionMeaning
READ⁡(Ri)\operatorname {READ}\left(R_{i}\right)read the next input integer intoRiR_{i}
write(Ri)\left(R_{i}\right)writec(Ri)c\left(R_{i}\right) on the output tape
COPY⁡(Ri,Rj)\operatorname {COPY}\left(R_{i}, R_{j}\right)writec(Ri)c\left(R_{i}\right) toRjR_{j}
ADD(Ri,Rj,Rk)\mathrm{ADD}\left(R_{i}, R_{j}, R_{k}\right)writec(Ri)+c(Rj)c\left(R_{i}\right)+c\left(R_{j}\right) toRkR_{k}
SUB⁡(Ri,Rj,Rk)\operatorname {SUB}\left(R_{i}, R_{j}, R_{k}\right)writec(Ri)−c(Rj)c\left(R_{i}\right)-c\left(R_{j}\right) toRkR_{k}
mult⁡(Ri,Rj,Rk)\operatorname {mult}\left(R_{i}, R_{j}, R_{k}\right)writec(Ri)⋅c(Rj)c\left(R_{i}\right) \cdot c\left(R_{j}\right) toRkR_{k}
DIV⁡(Ri,Rj,Rk)\operatorname {DIV}\left(R_{i}, R_{j}, R_{k}\right)write⌊c(Ri)/c(Rj)⌋\left\lfloor c\left(R_{i}\right) / c\left(R_{j}\right)\right\rfloor toRkR_{k} (write 0 ifc(Rj)=0c\left(R_{j}\right)=0)
goto(jj)go to the instructionjj
IF-THEN(Ri,j)\left(R_{i}, j\right)ifc(Ri)≥0c\left(R_{i}\right) \geq 0 then go to the instructionjj
: Figure 4.17: Instructions of a RAM.

value 0, the output tape is "empty" (indicated by a special symbol, e.g., B), and the input tape contains a finite number of nonnegative integers (n1,…,nk)\left(n_{1}, \ldots , n_{k}\right), stored in cells 1 to kk, and cell k+1k+1 is empty. The RAM begins with instruction 1 and, after finishing each instruction ii, it goes to instruction i+1i+1 if instruction ii is one of the first seven types, or it goes to the instruction jj as defined in instruction ii if instruction ii is one of the last two types. The RAM halts when it reaches an instruction k>nk>n.

For any RAM MM, we let L(M)={(n1,…,nk)∣M halts on input (n1,…,nk)}L(M)=\left\{ \left(n_{1}, \ldots , n_{k}\right) \mid M\text{ halts on input }\left(n_{1}, \ldots , n_{k}\right)\right\}. We say MM computes a function f:⋃k=1∞Nk→⋃k=1∞Nkf: \bigcup_{k=1}^{\infty } \mathbf{N}^{k} \rightarrow \bigcup_{k=1}^{\infty } \mathrm{N}^{k} if, on input (n1,…,nk),M\left(n_{1}, \ldots , n_{k}\right), M halts with outputs (m1,…,mℓ)=f(n1,…,nk)\left(m_{1}, \ldots , m_{\ell }\right)= f\left(n_{1}, \ldots , n_{k}\right).

?
(a)

Design a RAM that computes the function sort of Exercise 5(e) of Section 4.3.

(b)

Show the details of a multi-tape DTM that simulates the instruction ADD⁡(5,R3,R21∗)\operatorname {ADD}\left(5, R_{3}, R_{21}^{*}\right) of a RAM.

(c)

Show that every Turing-computable partial function f:Nk→Nf: \mathbf{N}^{k} \rightarrow \mathbf{N}, as defined in Section 4.2, is computable by a RAM.

Explain why the following is not a description of a legitimate Turing machine. Mbad =M_{\text{bad }}= "On input ⟨p⟩\langle p\rangle, a polynomial over variables x1,…,xkx_{1}, \ldots , x_{k} :

  1. Try all possible settings of x1,…,xkx_{1}, \ldots , x_{k} to integer values. 2. Evaluate pp on all of these settings. 3. If any of these settings evaluates to 0, accept; otherwise, reject."
?

References

[DuKo01] Du D., Ko K. Problem Solving in Automata, Languages, and Complexity. John Wiley & Sons, 2001.
[Sip13] Sipser M. Introduction to the Theory of Computation. 3rd ed., Cengage Learning, 2013.