Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Boolos et al. Computability and Logic, 5ed, CUP, 2007.pdf
Скачиваний:
593
Добавлен:
10.08.2013
Размер:
2.33 Mб
Скачать

PROBLEMS

61

Figure 5-17. Minimization.

emptied and a single rock place in box 2, preparatory to the computation of f (x, 1). If this value is 0, the program halts, with the correct value, h(x) = 1, in box 2. Otherwise, another rock is placed in box 2, and the procedure continues until such time (if any) as we have a number y of rocks in box 2 that is enough to make f (x, y) = 0.

The extensive class of functions obtainable from the trivial functions considered in the example at the beginning of this section by the kinds of processes considered in the rest of this section will be studied in the next chapter, where they will be given the name recursive functions. At this point we know the following:

5.8 Theorem. All recursive functions are abacus computable (and hence Turing computable).

So as we produce more examples of such functions, we are going to be producing more evidence for Turing’s thesis.

Problems

5.1 Design an abacus machine for computing the difference function . defined by

letting . if < , and 0 otherwise. x y = x y y x =

5.2The signum function sg is defined by letting sg(x) = 1 if x > 0, and = 0 otherwise. Give a direct proof that sg is abacus computable by designing an abacus machine to compute it.

5.3Give an indirect proof that sg is abacus computable by showing that sg is obtainable by composition from functions known to be abacus computable.

5.4Show (directly by designing an appropriate abacus machine, or indirectly) that the function f defined by letting f (x, y) = 1 if x < y, and = 0 otherwise, is abacus computable.

5.5The quotient and the remainder when the positive integer x is divided by the positive integer y are the unique natural numbers q and r such that x = qy + r and 0 r < y. Let the functions quo and rem be defined as follows: rem(x, y) = the remainder on dividing x by y if y = 0, and = x if y = 0; quo(x, y) = the quotient on dividing x by y if y = 0, and = 0 if y = 0. Design an abacus machine for computing the remainder function rem.

5.6Write an abacus-machine flow chart for computing the quotient function quo of the preceding problem.

62

ABACUS COMPUTABILITY

5.7Show that for any k there is a Turing machine that, when started on the leftmost 1 on a tape containing k blocks of 1s separated by single blanks, halts on the leftmost 1 on a tape that is exactly the same as the starting tape, except that everything has been moved one square to the right, without the machine in the course of its operations ever having moved left of the square on which it was started.

5.8Review the operations of a Turing machine simulating some give abacus machine according to the method of this chapter. What is the furthest to the left of the square on which it is started that such a machine can ever go in the course of its operations?

5.9Show that any abacus-computable function is computable by a Turing machine that never moves left of the square on which it is started.

5.10Describe a reasonable way of coding abacus machines by natural numbers.

5.11Given a reasonable way of coding abacus machines by natural numbers, let d(x) = 1 if the one-place function computed by abacus number x is defined and has value 0 for argument x, and d(x) = 0 otherwise. Show that this function is not abacus computable.