Turing Machines
- A Turing machine has two parts: a tape and a scanner.
- The tape is a one-dimensional strip subdivided into an infinite
number of squares. Each square can be in one of three states: 0, 1,
or blank.
- The tape plays a number of roles. Initially, it is the Turing
machine's input. While the Turing machine is working, the tape is its
memory and scratchpad. When the Turing machine finishes, the tape is
its output.
- The scanner is the "brain" of the Turing machine. It is the part
which follows the steps of the computation. It is assumed that the
scanner has a little arrow that points to the square on the tape that
the scanner is currently thinking about.
- A computation is allowed to have only a finite number of steps.
At each step, the scanner reads in the square it is pointing at and
then takes an action based on what it reads.
- An action consists of three parts:
- First, the scanner writes
either 0, 1, or blank into the current square.
- Second, the scanner
moves ("shifts") either one square to the right, one square to the left,
or doesn't move at all.
- Third, the scanner jumps to some other specified
step.
- The Turing machine starts in state 1. If it ever jumps to state 0,
it is finished and it stops.
Next slide