Turing Machines

advertisement
Yavor Ivanov Stoev
F.N. 43824
Group 3
http://plato.stanford.edu/entries/turing-machine/
Turing Machines
Described by Alan Turing in 1937, Turing machines are computational devices that aim to determine
whether or not a given task is computable (i. e. there is finite number of steps that solve the task).
1. A Definition of Turing Machines
A Turing machine is a state machine. It consists of a tape that has one end (i.e left) and infinite length. It
also has read-write head that can scan and move along the cells of the tape. Each cell can contain one
symbol belonging to a finite alphabet (for most purposes only 0 or 1). The action of a Turing machine is
determined completely by (1) the current state of the machine (2) the symbol in the tape-cell currently
being scanned by the head and (3) the table of transition rules, which serve as the “program” for the
machine.
Each transition rule is a 4-tuple:
< Statecurrent, SymbolA, Statenext, ActionX >
which can be read as saying “if the machine is in state Statecurrent and the current cell contains SymbolA
then move into state Statenext taking ActionX (move along the tape, or write a symbol in the current cell)”.
If a function is not Turing-computable it is because Turing machines lack the computational machinery to
carry it out, not because of a lack of spatio-temporal resources.
2. Describing Turing Machines
We can describe a Turing machine, therefore, by specifying only the 4-tuples that make up its program.
Here are the tuples describing a simple machine.
<s0, 1, s0, » >
< s0, 0, s1, 1 >
< s1, 1, s1, « >
< s1, 0, s2, » >
Here, » corresponds to “move the head one cell to the right”, and «, to the left. If we represent the natural
number n as n successive 1’s (surrounded by 0’s) on the tape of the simple machine above, we find out that
this machine computes the successor function of n. To identify the completion of the task we adopt the
convention that the machine should start and end with its head over the leftmost 1 of the leftmost block of
1’s (in standard configuration).
3. Varieties of Turing Machines
There are many equivalent to the original definition Turing machines using:
Two-way infinite tapes, Two-dimensional tapes, Arbitrary movement of the head, Arbitrary numbers of
read-write heads, Arbitrary finite alphabet (not only 0s and 1s), 5-tuple formulation (write&move). Others
that are not so self-explanatory are:

Non-deterministic Turing machines
Yavor Ivanov Stoev
F.N. 43824
Group 3
http://plato.stanford.edu/entries/turing-machine/
In this reformulation, all transitions are taken (there are states which do not specify exact transition
rules), and all the resulting computations are continued in parallel (not halting). If any of the
children machines terminates successfully (some ending states are designated as accepting
states), then the entire computation terminates and inherits that machine's resulting tape.

A more complex machine
In addition to performing numerical functions using unary representation for numbers, we can perform
tasks such as copying blocks of symbols, erasing blocks of symbols and so on.
4. What can be computed?
Computable Numbers – Integer and rational numbers are computable (we can represent them as blocks of
1’s), but we can also achieve arbitrary approximation of some famous transcendental numbers like , and
.
Computable Functions – predicates like IF, AND and OR can easily be interpreted in TM, and
corresponding boolean result obtained.
Universal Turing Machines - When started on a tape containing the encoding of another Turing machine,
call it T, followed by the input to T, a UTM produces the same result as T would when started on that input.
Essentially a UTM can simulate the behavior of any Turing machine (including itself.)
5. What Cannot Be Computed
A crucial observation about Turing machine is that there are only countably many machines (a set is
countable if it is finite, or may be placed in one-to-one correspondence with the integers.) It follows
immediately that there are uncountably many real numbers that are not computable, since the reals are not
countable.
5.1 The Halting Problem
It would be very useful to be able to examine the description of a Turing machine and determine whether it
halts on a given input. This problem is called the Halting problem and is, regrettably, uncomputable. That
is, no Turing machine exists which computes the function h(t,n) which is defined to be TRUE if machine t
halts on input n and FALSE otherwise.
6. Alternative Formulations of Computability
6.1 Abacus Machines
Abacus machines abstract the more familiar architecture of the modern digital computer. In its simplest
form a computer with such architecture has a number of addressable registers each of which can hold a
single datum, and a processor which can read and write to these registers.
The machine can perform two basic operations, namely: add one to the content of a named register (which
we will symbolize as n+, where n is the name of the register) and (attempt to) subtract one from a named
register. They are equivalent to TMs.
7. Restricted Turing Machines
Yavor Ivanov Stoev
F.N. 43824
Group 3
http://plato.stanford.edu/entries/turing-machine/
We can use read-only head. The resulting machines are called finite state machines. They are provably less
powerful than Turing machines, since they cannot use the tape to remember the state of the computation.
Finite state machines, for example, cannot determine whether an input string consists of some As followed
by the same number of Bs.
Glossary of terms
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
Computational devices – devices, whose main purpose is to make computations
State machine – machine which at any moment can be in any one of the states belonging to a
finite collection of states.
Transition rules – the rules governing a Turing machine
Spatio-temporal – related to space and time
Successor (add-one) function – the function f(n) = n+1, for every integer n.
Non-deterministic – producing indefinite answer
Unary – related to a single entity
Standard configuration – the configuration in which a Turing machine’s read-write head is over
the leftmost 1 of the leftmost block of 1’s
Transcendental (number) – a real number, which is not a root of any polynomial with real
coefficients or rational function
Predicate - a function whose result represents the truth or falsehood of some condition
Boolean – having the value TRUE or the value FALSE
Encoding – a way of representing the table of transition rules of a particular Turing Machine on
another Turing Machine’s tape
Countable – be in one-to-one relationship with the natural numbers
The Reals – the real numbers
Addressable Registers – sections in the computer memory which can be used to store data.
Children Machines – Turing Machines that are spawned by a Non-deterministic Turing Machine
that is their parent.
Computational Machinery – mechanism providing solution ( by computations) to a particular
task
Download