A Turing machine is a non-existent, hypothetical machine ‘invented’ by Alan Turing. This machine can be used to simulate any computer algorithm.
A simple Turing machine consists of:
- An infinite one-dimensional tape divided into cells, where each cell contains a specific symbol from a finite symbol set.
- A head, which reads the cell at a position on the tape, and moves left or right after writing to that cell.
- A state register, which stores the current state the Turing machine is in, from a finite set of states including the halting state.
- A finite set of instructions, which determine the action of the machine.
The instructions relayed to a Turing Machine can be represented using a state transition diagram, which can be thought of as the algorithm for the machine.
A simple state transition diagram which converts 0s to 1s and 1s to 0s
Formal Definitions
A TM is described by:
- A finite set of states,
- An input alphabet
- A tape alphabet (Γ, typically; contains Σ).
- A transition function (δ, typically).
- A start state (q0, in Q, typically).
- A blank symbol (B typically).
- A set of halting states (F ⊆ Q, typically).