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

34

TURING COMPUTABILITY

Problems

3.1Consider a tape containing a block of n strokes, followed by a space, followed by a block of m strokes, followed by a space, followed by a block of k strokes, and otherwise blank. Design a Turing machine that when started on the leftmost stroke will eventually halt, having neither printed nor erased anything . . .

(a). . . on the leftmost stroke of the second block.

(b). . . on the leftmost stroke of the third block.

3.2Continuing the preceding problem, design a Turing machine that when started on the leftmost stroke will eventually halt, having neither printed nor erased anything . . .

(a). . . on the rightmost stroke of the second block.

(b). . . on the rightmost stroke of the third block.

3.3Design a Turing machine that, starting with the tape as in the preceding problems, will eventually halt on the leftmost stroke on the tape, which is now to contain a block of n strokes, followed by a blank, followed by a block of m + 1 strokes, followed by a blank, followed by a block of k strokes.

3.4Design a Turing machine that, starting with the tape as in the preceding problems, will eventually halt on the leftmost stroke on the tape, which is now to contain a block of n strokes, followed by a blank, followed by a block of m 1 strokes, followed by a blank, followed by a block of k strokes.

3.5Design a Turing machine to compute the function min(x, y) = the smaller of x and y.

3.6Design a Turing machine to compute the function max(x, y) = the larger of

xand y.