Turing machine
From Simple English Wikipedia, the free encyclopedia
Turing machine is a term from computer science. A Turing machine is a system of rules, states and transitions rather than a real machine. It was first described by Alan Turing. There are two purposes of a Turing machine. Either it can be used to decide a formal language or it computes mathematical functions. Turing machines are one of the most important formal models in theoretical computer science.
Contents |
[edit] Common basics
A Turing machine consists of the following components (simplified):
- A finite set of states (with one state marked as start state, while running a Turing machine always has a current state)
- An infinite tape with storage cells and a read/write-device that can move on the tape
- A definition of a so-called transition function
Furthermore a working-alphabet (set of characters) has to be defined.
When a Turing machine is started a word (out of the working-alphabet) must be present on the infinite tape of the machine. The read/write-device on the first character now reads the first character and depending on the current state of Turing machine the read/write-device overwrites the character with a new one or moves one cell to the left or to the right. Furthermore the current state of the machine can be switched.
[edit] Turing machines that decide languages
A Turing machine is said to decide a language if it is always able to determine whether a given word is contained in a certain language or not. Therefore the machine usually has two special states marked as Accept and Reject. After a while one of the two states will be reached (depending on the input word) and the machine is halted. If only one of the two states will ever be reached, the Turing machine is said to semi-decide a language.
[edit] Turing machines that compute functions
If a Turing machine is used for the computation of functions it only has one end state. When the machine comes to that state it is halted and the result of the function (depending on the input) can be found on the tape.
[edit] Impact of Turing machines
Turing machines were not invented to be build in reality, but they are very important for theoretical computer science as they are one of the simplest models for computers. The Church-Turing-Thesis states that all computers are only as powerful as Turing machines. This can be used to proof if a problem is solvable by a computer or not.
[edit] Variations
- A Turing machine can consist of multiple infinite tapes (and multiple read/write-devices). However it is proven that such machines are only as powerful as single-tape machines. Multi-tape machines are useful when dealing with more complex problems.
- If a Turing machine has a nondeterministic transition function there can be multiple transitions from one state to many others when reading a character. Again this does not enhance the power of Turing machines. However nondeterministic Turing machines (as they are called then) may possibly decrease the computation time by a strong amount. This question is covered in the P versus NP-discussion and is not solved yet. Most scientists assume however that nondeterministic machines can work much faster on certain problems.