# Chapter 3: The Church-Turing Thesis

## Chapter 3.2, Variants of Turing Machines

• There are many variations of the Turing Machine, and surprisingly, they are all equivalent!
• Many other models of computation (e.g. Lambda Calculus, Java, etc.) have also been developed. The algorithms that these models can describe is the same set of algorithms that a Turing Machine can describe.
• Thus, the definition of a Turing Machine is very robust.

### Variants

• A Turing Machine whose read/write head can move right, move left, or remain stationary.
• A Turing Machine whose tape extends infinitely to both the left and to the right.
• A Turing Machine with two or more input tapes.
• A nondeterministic Turing Machine.

### Multitape Turing Machines

Theorem 3.13: Every multitape Turing Machine has an equivalent single-tape Turing Machine.

#### General Idea

• The transition function for a k-tape machine could be δ: Q × Γk → Q × Γk × {L, R}k.
• Separate the contents of each input tape with a character not in Σ such as #.
• Place the initial contents of tape 1 between the first two # symbols, place the initial contents of tape 2 between the second and third # symbols, etc.
• Introduce new symbols for each Σ that indicate that the read/write head for a given tape is located on this symbol.
• See Figure 3.14 for a concrete example.

#### Construction

The single-tape Turing Machine simulates the multi-tape Turing Machine as follows until qaccept or qreject is reached.

• Step 1. Suppose that the k tapes initially contain strings w1, w2, ... wk. Place the string #w1#w2#...#wk# on the single tape. Change the first symbol in each wi to retain the identity of the symbol and indicate that the read/write head for that string is on it.
• Step 2. Scan the tape from left to right, determining the symbol under each simulated read/write head.
• Step 3. Go back to the leftmost #.
• Step 4. Scan the tape from left to right, updating the tape according to the transition function. (Note: Should a virtual read/write head move to the right onto a #, then add a blank to this position, shift the entire tape from this square to the rightmost square, by one square and then resume.)
• Step 5. Go to step 3.

### Active Learning

• How can a Turing Machine whose read/write head can only move left or move right simulate a Turing Machine whose read/write head can move left, move right, or remain stationary?
• How can a Turing Machine that has a fixed left end to its tape simulate a Turing Machine that is infinite in both directions?