Multi-tape Turing Machine



Multi-tape Turing Machines have multiple tapes where each tape is accessed with a separate head. Each head can move independently of the other heads. Initially the input is on tape 1 and others are blank. At first, the first tape is occupied by the input and the other tapes are kept blank. Next, the machine reads consecutive symbols under its heads and the TM prints a symbol on each tape and moves its heads.

Multi-tape Turing Machine

A Multi-tape Turing machine can be formally described as a 6-tuple (Q, X, B, δ, q0, F) where −

  • Q is a finite set of states
  • X is the tape alphabet
  • B is the blank symbol
  • δ is a relation on states and symbols where

    δ: Q × Xk → Q × (X × {Left_shift, Right_shift, No_shift })k

    where there is k number of tapes

  • q0 is the initial state
  • F is the set of final states

Example

Multiplying two numbers (each represented as a unary string of ones) to get a third would be difficult to do with a simple Turing machine, but is fairly straightforward with a three tape machine.

Tapes before starting to compute Tapes before starting the second addition

N-tape Turing Machine2

Start by checking to see whether either number is zero −

  • (0,(B,B ,B ),(B,B ,B ),(S, S, S), Halt) Both are zero
  • (0,(B, 1, B),(B, 1,B ),(S, S, S), Halt) First is zero
  • (0,(1,B ,B ),(1,B ,B ),(S, S, S), Halt) Second is zero
  • (0,(1, 1, B),(1, 1B, ),(S, S, S), 1) Both are nonzero

Add the number on the second tape to the third tape −

  • (1,(1, 1,B ),(1, 1, 1),(S, R, R), 1) Copy
  • (1,(1,B ,B ),(1,B ,B ),(S, L, S), 2) Done copying

Move the tape head of the second tape back to the left end of the number; move the tape head of the first number one cell to the right −

  • (2,(1, 1,B ),(1, 1,B ),(S, L, S), 2) Move to the left end
  • (2,(1,B ,B ),(1,B ,B ),(R, R, S), 3) Both types to the right one cell

Check the first tape head to see if all the additions have been performed −

  • (3,(B, 1,B ),(B, 1,B ),(S, S, L), Halt) Done
  • (3,(1, 1,B ),(1, 1,B ),(S, S, S), 1) Do another add
N-tape Turing Machine3

Every multi-tape TM has an equivalent single tape TM

If M has k tapes, M0 simulates the effect of k tapes by storing the same information on its single tape.

Uses a new symbol # as a delimiter to separate the contents of the different tapes (marks the left/the right end of the relevant portions of the tape).

M0 must also keep track of the locations of the heads on each tape.

Write a tape symbol with a dot above it to mark where the head on that tape would be. Dotted symbols are simply new symbols added to the tape alphabet.

If the movement of one T’s tape heads causes M0’s tape head to bump into either or #, then that side of the type must be moved to make room for a new type cell.

Note − Every Multi-tape Turing machine has an equivalent single-tape Turing machine.

Advertisements