Turing Machines

1. Algorithms

No precise definition of an algorithm. Common features include:

2. Turing Machines

center Small invert screen

The machine starts with state with the tape head pointing to the first symbol of the finite input string. The machine computes in steps, each depending on the current state and the symbol being scanned by the tape head . An action at each step is to:

2.1 Formal Definition

A turing machine is specified by a quadruple where:

A turing machine configuration consists of:

The initial configuration is given by where is the input string and is the initial state.

Define the functions: and as:

These functions split of the first and last symbols of a string.

NOTE: in this case, denotes a character followed by a string , and denotes a string followed by a character .

Given , define by:

Or, in english:

  • If the machine is in state , reads symbol from the tape, and the transition function says to move left, then the machine moves to state , writes symbol to the tape, and moves left.
  • If the machine is in state , reads symbol from the tape, and the transition function says to move right, then the machine moves to state , writes symbol to the tape, and moves right.

We say that a configuration is in normal form if it has no computation step. This is exactly the case when is undefined for .

The computation of a turing machine is an infinite sequence of configurations such that:

The computation halts iff:

2.2 Graphical Representation

Consider the turing machine where , , and is defined by:

Let's define a graph representing a turing machine as:

Now, for the example above, our graph is:

center small invert screen

3. Mapping to Register Machines

To prove that any turing machine may be mapped to register machines:

  1. Fix a numerical encoding of 's states, tape symbols, tape contents and configurations.
  2. Implement 's transition function as a register machine program.
  3. Implement a register machine program that repeatedly applies .

3.1 Encoding

3.2 Transition Function

We can turn the finite specification of into an RM gadget:

SMALL invert screen

If , , and are the initial values of registers , and :

3.3 Turing Register Machine

Now, we can create a register machine which implements the computation of a turing machine . The registers are:

Starting with containing the input string, and all other registers zeroed, the program halts iff halts, and in that case, , , and contain the final configuration.

center invert screen small

4. Tape Encoding of Lists of Numbers

A tape over codes a list of numbers as:

5. Turing Computable Functions

is turing computable iff there is a turing machine such that starting from its initial state with tapehead on the leftmost on a tape coding , halts iff and in that case, the final tape codes a list whose first element is where .

A partial function is turing computable iff it is register machine computable. We can implement a turing machine with a register machine, so being turing computable implies is register machine computable. For the converse, one has to implement the computation of a register machine in terms of a turing machine operating on a tape coding register machine configurations. To do this, one has to show how to carry out the action of each type of RM instruction on the tape. It should be reasonably clear that this is possible in principle, even if the details are omitted.

Back to Home