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)
Multi Tape TM Addition Example $ 1 Input string
Multi Tape TM Addition Example $ 1
Multi Tape TM Addition Example $ 1
Multi Tape TM Addition Example $ 1
Multi Tape TM Addition Example $ 1
Multi Tape TM Addition Example $ 1
Multi Tape TM Addition Example $ 1
Multi Tape TM Addition Example $ 1
Multi Tape TM Addition Example $ 1
Multi Tape TM Addition Example $ 1
Multi Tape TM Addition Example $ 1
Multi Tape TM Addition Example $ 1
Multi Tape TM Addition Example $ 1
Multi Tape TM Addition Example $ 1
Multi Tape TM Addition Example $ 1
Multi Tape TM Addition Example $ 1
Multi Tape TM Addition Example $ 1
Multi Tape TM Addition Example $ 1
Multi Tape TM Addition Example $ 1
Multi Tape TM Addition Example $
Multi Tape TM Addition Example 1
Multi Tape TM Addition Example 1
Multi Tape TM Addition Example 1
Multi Tape TM Addition Example 1
Multi Tape TM Addition Example 1 HALT! Output string
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:
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
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:
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.
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
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
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
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:
2k-tracks Simulating k-tapes Corresponding simulation sequence: Notable: $ 1 X $ 1 k-tape TM transition $ 1 3 2
2k-tracks Simulating k-tapes Corresponding simulation sequence: Notable: $ 1 X $ 1 k-tape TM transition $ 1 3 2
2k-tracks Simulating k-tapes Corresponding simulation sequence: Notable: $ 1 X $ 1 k-tape TM transition $ 1 3 2
2k-tracks Simulating k-tapes Corresponding simulation sequence: Notable: $ 1 X $ 1 k-tape TM transition $ 1 3 2
2k-tracks Simulating k-tapes Corresponding simulation sequence: Notable: $ 1 X $ 1 k-tape TM transition $ 1 3 2
2k-tracks Simulating k-tapes Corresponding simulation sequence: Notable: 2nd head reads $ 1 X $ 1 k-tape TM transition $ 1 3 2
2k-tracks Simulating k-tapes Corresponding simulation sequence: Notable: $ 1 X $ 1 k-tape TM transition $ 1 3 2
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
2k-tracks Simulating k-tapes Corresponding simulation sequence: Notable: 2nd phase, on 1st tape: 13,R $ 1 $ 1 3 X k-tape TM transition $ 1 3 2
2k-tracks Simulating k-tapes Corresponding simulation sequence: Notable: 2nd phase, on 1st tape: 13,R $ 1 X $ 1 3 k-tape TM transition $ 1 3 2
2k-tracks Simulating k-tapes Corresponding simulation sequence: Notable: $ 1 X $ 1 3 k-tape TM transition $ 1 3 2
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
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
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
2k-tracks Simulating k-tapes Corresponding simulation sequence: Notable: $ 1 X $ 1 3 2 k-tape TM transition $ 1 3 2
2k-tracks Simulating k-tapes Corresponding simulation sequence: Notable: $ 1 X $ 1 3 2 k-tape TM transition $ 1 3 2
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
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
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