Presentation is loading. Please wait.

Presentation is loading. Please wait.

Multi-tape TM’s Often it’s useful to have several tapes when carrying out a computations. For example, consider a two tape I/O TM for adding numbers (we.

Similar presentations


Presentation on theme: "Multi-tape TM’s Often it’s useful to have several tapes when carrying out a computations. For example, consider a two tape I/O TM for adding numbers (we."— Presentation transcript:

1 Multi-tape TM’s Often it’s useful to have several tapes when carrying out a computations. For example, consider a two tape I/O TM for adding numbers (we show only how it acts on a typical input)

2 Multi Tape TM Addition Example
$ 1 Input string

3 Multi Tape TM Addition Example
$ 1

4 Multi Tape TM Addition Example
$ 1

5 Multi Tape TM Addition Example
$ 1

6 Multi Tape TM Addition Example
$ 1

7 Multi Tape TM Addition Example
$ 1

8 Multi Tape TM Addition Example
$ 1

9 Multi Tape TM Addition Example
$ 1

10 Multi Tape TM Addition Example
$ 1

11 Multi Tape TM Addition Example
$ 1

12 Multi Tape TM Addition Example
$ 1

13 Multi Tape TM Addition Example
$ 1

14 Multi Tape TM Addition Example
$ 1

15 Multi Tape TM Addition Example
$ 1

16 Multi Tape TM Addition Example
$ 1

17 Multi Tape TM Addition Example
$ 1

18 Multi Tape TM Addition Example
$ 1

19 Multi Tape TM Addition Example
$ 1

20 Multi Tape TM Addition Example
$ 1

21 Multi Tape TM Addition Example
$

22 Multi Tape TM Addition Example
1

23 Multi Tape TM Addition Example
1

24 Multi Tape TM Addition Example
1

25 Multi Tape TM Addition Example
1

26 Multi Tape TM Addition Example
1 HALT! Output string

27 Multitape TM’s Formal Notation
NOTE: Sipser’s multitape machines cannot pause on one of the tapes as above example. This isn’t a problem since pausing 1-tape machines can simulate pausing k-tape machines, and non-pausing 1-tape machines can simulate 1-tape pausing machines by adding dummy R-L moves for each pause. Formally, the d-function of a k-tape machine:

28 Multitape TM’s Conventions
Input always put on the first tape If I/O machine, output also on first tape Can consider machines as “string-vector” generators. E.g., a 4 tape machine could be considered as outputting in (S*)4

29 Equivalence of k-tape vs. 1-tape
The argument that k-tape TM’s are universal, is fairly convincing. After all, the computers we use daily split their memory into several locations: RAM, Hard-Disc, Floppy, CD-ROM. It is plausible that each memory unit could be simulated by a separate tape. The following theorem implies that the computer could still function fully (though probably with a loss of efficiency) if all the memory was merged onto a single tape:

30 Equivalence of k-tape vs. 1-tape
THM: Every k-tape TM can be simulated by a 1-tape TM, and vice versa. Proof. It’s clear that every 1-tape TM can be simulated by a k-tape TM. Simply ignore tapes no. 2 through k. On the other hand, to show that any k-tape TM can be simulated by a 1-tape TM, we’ll show two parts: Any k-tape TM can be simulated by a 2k-track TM. Any k-track TM can be simulated by a 1-tape TM.

31 k-track TM’s A k-track machine contains a tape whose cells are broken into k vertical sub-cells. As opposed to k-tape machines, there is only one reading head1, but it may read all k tracks and base its actions on these values. EG. A 2-tape machine: vs. a 2-track machine: 1Equivalently, we may think of k-heads which are forced to move in lock-step, so can only see one column of the tapes at a time. $ 1 $ 1

32 k-track TM’s A k-track machine contains a tape whose cells are broken into k vertical sub-cells. As opposed to k-tape machines, there is only one reading head1, but it may read all k tracks and base its actions on these values. EG. A 2-tape machine: vs. a 2-track machine: 1Equivalently, we may think of k-heads which are forced to move in lock-step, so can only see one column of the tapes at a time. $ 1 $ 1

33 2k-tracks Simulating k-tapes
We can simulate any k-tape TM by a k-track TM as follows: Each tape of the k-tape TM is represented by one track. Each track representing a tape, is underneath a track which consists of all blanks, except for a single X which tells us which cells of the k-tape TM are active: X $ 1 $ 1

34 2k-tracks Simulating k-tapes
For each move of k-tape TM, the 2k-track TM sweeps to right and then to left. During right-sweep, 2k-track TM notes the current state of the k-tape machine as well as the symbols read by each head, keeping this information in its finite control. Head back when passed all X’s. During the left-sweep, every X encountered causes corresponding track active cell to change in accordance to the memorized configuration of the k-tape machine. EG:

35 2k-tracks Simulating k-tapes
Corresponding simulation sequence: Notable: $ 1 X $ 1 k-tape TM transition $ 1 3 2

36 2k-tracks Simulating k-tapes
Corresponding simulation sequence: Notable: $ 1 X $ 1 k-tape TM transition $ 1 3 2

37 2k-tracks Simulating k-tapes
Corresponding simulation sequence: Notable: $ 1 X $ 1 k-tape TM transition $ 1 3 2

38 2k-tracks Simulating k-tapes
Corresponding simulation sequence: Notable: $ 1 X $ 1 k-tape TM transition $ 1 3 2

39 2k-tracks Simulating k-tapes
Corresponding simulation sequence: Notable: $ 1 X $ 1 k-tape TM transition $ 1 3 2

40 2k-tracks Simulating k-tapes
Corresponding simulation sequence: Notable: 2nd head reads  $ 1 X $ 1 k-tape TM transition $ 1 3 2

41 2k-tracks Simulating k-tapes
Corresponding simulation sequence: Notable: $ 1 X $ 1 k-tape TM transition $ 1 3 2

42 2k-tracks Simulating k-tapes
Corresponding simulation sequence: Notable: 1st head reads 1 passed all X’s! $ 1 X $ 1 k-tape TM transition $ 1 3 2

43 2k-tracks Simulating k-tapes
Corresponding simulation sequence: Notable: nd phase, on 1st tape: 13,R $ 1 $ 1 3 X k-tape TM transition $ 1 3 2

44 2k-tracks Simulating k-tapes
Corresponding simulation sequence: Notable: nd phase, on 1st tape: 13,R $ 1 X $ 1 3 k-tape TM transition $ 1 3 2

45 2k-tracks Simulating k-tapes
Corresponding simulation sequence: Notable: $ 1 X $ 1 3 k-tape TM transition $ 1 3 2

46 2k-tracks Simulating k-tapes
Corresponding simulation sequence: Notable: on 2nd tape: 2,L $ 1 X $ 1 3 k-tape TM transition $ 1 3 2

47 2k-tracks Simulating k-tapes
Corresponding simulation sequence: Notable: on 2nd tape: 2,L $ 1 X $ 1 3 2 k-tape TM transition $ 1 3 2

48 2k-tracks Simulating k-tapes
Corresponding simulation sequence: Notable: on 2nd tape: 2,L $ 1 X $ 1 3 2 k-tape TM transition $ 1 3 2

49 2k-tracks Simulating k-tapes
Corresponding simulation sequence: Notable: $ 1 X $ 1 3 2 k-tape TM transition $ 1 3 2

50 2k-tracks Simulating k-tapes
Corresponding simulation sequence: Notable: $ 1 X $ 1 3 2 k-tape TM transition $ 1 3 2

51 2k-tracks Simulating k-tapes
Corresponding simulation sequence: Notable: ready for next k-tape TM transition $ 1 X $ 1 3 2 k-tape TM transition $ 1 3 2

52 1 tape simulating k-tracks
Finally, convert the 2k-track machine to a single tape machine. In a sense, we are already done, as there is only one head. Q: How can the information about a column of tracks be recorded by a single cell? 1 X

53 1 tape simulating k-tracks
A: Just expand the tape alphabet G! In this case, the expanded tape alphabet would consist of 4-tuples, and the 4-tuple (,1,X,) would represent the column on the right. Thus a k-track TM is already a 1-tape TM if we look at it the right way. No further modifications are necessary. This complete the simulation of k-tape TM’s by 1-tape TM’s.  1 X


Download ppt "Multi-tape TM’s Often it’s useful to have several tapes when carrying out a computations. For example, consider a two tape I/O TM for adding numbers (we."

Similar presentations


Ads by Google