All Topics  
Universal Turing machine

 
Universal Turing Machine

   Email Print
   Bookmark   Link






 

Universal Turing machine



 
 
Alan Turing
Alan Turing

Alan Mathison Turing, Order of the British Empire, Fellow of the Royal Society was a British mathematician, logician and Cryptanalysis....
's universal computing machine (alternately universal machine, machine U, U) is the name given by him (1936-1937) to his model of an all-purpose "a-machine" (computing machine) that could "run" any arbitrary (but well-formed) sequence of instructions called "quintuples". This model is considered by some (for example, Davis (2000)) to be the origin of the "stored program computer" -- used by John von Neumann
John von Neumann

John von Neumann was a Hungarian American mathematician who made major contributions to a vast range of fields, including set theory, functional analysis, quantum mechanics, ergodic theory, continuous geometry, economics and game theory, computer science, numerical analysis, hydrodynamics , and statistics, as well as many other mathematical...
 (1946) for his "Electronic Computing Instrument" that now bears von Neumann's name: the von Neumann architecture
Von Neumann architecture

The von Neumann architecture is a design model for a stored-program digital computer that uses a central processing unit and a single separate computer storage structure to hold both instructions and data ....
.

This machine as a model of computation is now called the "Universal Turing machine".

y Turing machine computes a certain fixed partial
Partial function

In mathematics, a partial function is a binary relation that associates each element of a Set , sometimes called its domain , with at most one element of another set, called its codomain....
 computable function
Computable function

Computable functions are the basic objects of study in recursion theory. The set of computable functions is equivalent to the set of Turing-computable functions and partial recursive functions....
 from the input strings over its alphabet.






Discussion
Ask a question about 'Universal Turing machine'
Start a new discussion about 'Universal Turing machine'
Answer questions from other users
Full Discussion Forum



Recent Posts









Encyclopedia


Alan Turing
Alan Turing

Alan Mathison Turing, Order of the British Empire, Fellow of the Royal Society was a British mathematician, logician and Cryptanalysis....
's universal computing machine (alternately universal machine, machine U, U) is the name given by him (1936-1937) to his model of an all-purpose "a-machine" (computing machine) that could "run" any arbitrary (but well-formed) sequence of instructions called "quintuples". This model is considered by some (for example, Davis (2000)) to be the origin of the "stored program computer" -- used by John von Neumann
John von Neumann

John von Neumann was a Hungarian American mathematician who made major contributions to a vast range of fields, including set theory, functional analysis, quantum mechanics, ergodic theory, continuous geometry, economics and game theory, computer science, numerical analysis, hydrodynamics , and statistics, as well as many other mathematical...
 (1946) for his "Electronic Computing Instrument" that now bears von Neumann's name: the von Neumann architecture
Von Neumann architecture

The von Neumann architecture is a design model for a stored-program digital computer that uses a central processing unit and a single separate computer storage structure to hold both instructions and data ....
.

This machine as a model of computation is now called the "Universal Turing machine".

Introduction

Turing U Machine 1
Every Turing machine computes a certain fixed partial
Partial function

In mathematics, a partial function is a binary relation that associates each element of a Set , sometimes called its domain , with at most one element of another set, called its codomain....
 computable function
Computable function

Computable functions are the basic objects of study in recursion theory. The set of computable functions is equivalent to the set of Turing-computable functions and partial recursive functions....
 from the input strings over its alphabet. In that sense it behaves like a computer with a fixed program. However, we can encode the action table of any Turing machine in a string. Thus we can construct a Turing machine that expects on its tape a string describing an action table followed by a string describing the input tape, and computes the tape that the encoded Turing machine would have computed. Turing described such a construction in some detail in his 1936 paper.

In 1947, Turing said:
It can be shown that a single special machine of that type can be made to do the work of all. It could in fact be made to work as a model of any other machine. The special machine may be called the universal machine.


Stored-program computer

Davis (2000) makes a persuasive argument that Turing's conception of what is now known as "the stored-program computer", of placing the "action table" -- the instructions for the machine -- in the same "memory" as the input data, strongly influenced John von Neumann
John von Neumann

John von Neumann was a Hungarian American mathematician who made major contributions to a vast range of fields, including set theory, functional analysis, quantum mechanics, ergodic theory, continuous geometry, economics and game theory, computer science, numerical analysis, hydrodynamics , and statistics, as well as many other mathematical...
's conception of the first discrete-symbol (as opposed to analog) computer -- the EDVAC
EDVAC

EDVAC was one of the earliest electronics computers. Unlike its predecessor the ENIAC, it was binary numeral system rather than decimal, and was a Von Neumann architecture machine....
. Davis quotes Time magazine to this effect, that "everyone who taps at a keyboard... is working on an incarnation of a Turing machine," and that "John von Neumann [built] on the work of Alan Turing" (Davis (2000) p. 193 quoting Time magazine (29 March 1999)).

Davis makes a case that Turing's Automatic Computing Engine (ACE) computer "anticipated" the notions of microprogamming (microcode
Microcode

Microcode is a layer of lowest-level instructions involved in the implementation of machine code instructions in many computers and other processors; it resides in a special high-speed memory and translates machine instructions into sequences of detailed circuit-level operations....
) and RISC processors (cf p. 188)). Knuth
Donald Knuth

Donald Ervin Knuth is a renowned computer science and Emeritus of the Art of Computer Programming at Stanford University.Author of the seminal multi-volume work The Art of Computer Programming , Knuth has been called the "father" of the run-time analysis, contributing to the development of, and systematizing formal mathematical techn...
 (1973, 1968) cites Turing's work on the ACE computer as designing "hardware to facilitate subroutine linkeage" (p. 225); Davis (2000) also references this work as Turing's use of a hardware "stack" (cf footnote 18 page 237).

As the Turing Machine was encouraging the construction of computers, the UTM was encouraging the development of the fledgling computer science
Computer science

Computer science is the study of the theoretical foundations of information and computation, and of practical techniques for their implementation and application in computer systems....
s. An early, if not the very first, assembler was proposed "by a young hot-shot programmer" for the EDVAC (Davis 2000, p. 192). Von Neumann's "first serious program ... [was] to simply sort data efficiently" (Davis 2000, p. 184). Knuth observes that the subroutine return embedded in the program itself rather than in special registers is attributable to von Neumann and Goldstine (in particular: Burks, Goldstine, von Neumann (1946), Preliminary discussion of the logical design of an electronic computing instrument, reprinted in Bell and Newell 1971). Knuth furthermore states that
"The first interpretive routine may be said to be the "Universal Turing Machine" ... Interpretive routines in the conventional sense were mentioned by John Mauchly in his lectures at the Moore School in 1946 ... Turing took part in this development also; interpretive systems for the Pilot ACE computer were written under his direction" (Knuth p. 226).


Davis (2000) briefly mentions operating systems and compilers as outcomes of the notion of program-as-data (p. 185).

Some, however, might raise issues with this assessment. At the time (mid-1940's to mid-1950's) a relatively small cadre of researchers were intimately involved with the architecture of the new "digital computers". Wang (1954), a young researcher at this time, made the following observation:
Turing's theory of computable functions antedated but has not much influenced the extensive actual construction of digital computers. These two aspects of theory and practice have been developed almost entirely independently of each other. The main reason is undoubtedly that logicians are interested in questions radically different from those with which the applied mathematicians and electrical engineers are primarily concerned. It cannot, however, fail to strike one as rather strange that often the same concepts are expressed by very different terms in the two developments." (Wang (1954, 1957), p. 63)


Wang hoped that his paper would "connect the two approaches." Indeed, Minsky (1967) confirms this: "that the first formulation of Turing-machine theory in computer-like models appears in Wang (1957)" (Minsky p. 200). Minsky goes on to demonstrate Turing equivalence
Turing equivalence

Turing equivalence may refer to:* Turing completeness, having computational power equivalent to a universal Turing machine* Turing degree equivalence , having the same level of unsolvability...
 of a counter machine
Counter machine

A computational model used in formal logic and theoretical computer science, the counter machine is the most primitive sub-class of the generic register machine models....
.

With respect to the reduction of computers to simple Turing equivalent models (and vice versa), Wang 's (1957) title of "the first" is open to debate. While both Minsky's paper of 1961 and Wang's paper of 1957 are cited by Shepherdson and Sturgis (1963), they also cite and summarize in some detail the work of European mathematicians Kaphenst (1959), Ershov (1959), and Péter (1958). The names of mathematicians Hermes (1954, 1955, 1961) and Kaphenst (1959) appear in the bibliographies of both Sheperdson-Sturgis (1963) and Elgot-Robinson (1961). Two other names of importance are Canadian researchers Melzak (1961) and Lambek (1961). For much more see Turing machine equivalents
Turing machine equivalents

The following article is a referral from the article Turing machine. Many of the machines described here have articles that offer much more information....
; references can be found at Register machine
Register machine

In mathematical logic and theoretical computer science a register machine is a generic class of abstract machines used in a manner similar to a Turing machine....
. =Mathematical theory

With this encoding of action tables as strings it becomes possible in principle for Turing machines to answer questions about the behaviour of other Turing machines. Most of these questions, however, are undecidable
Undecidable

Undecidable has more than one meaning:In mathematical logic:* A decision problem is called undecidable if no algorithm can decide it, such as for Alan Turing's halting problem; see also under Decidable and Undecidable problem....
, meaning that the function in question cannot be calculated mechanically. For instance, the problem of determining whether any particular Turing machine will halt on a particular input, or on all inputs, known as the Halting problem
Halting problem

In computability theory , the halting problem is a decision problem which can be stated as follows: given a description of a computer program and a finite input, decide whether the program finishes running or will run forever, given that input....
, was shown to be, in general, undecidable in Turing's original paper. Rice's theorem
Rice's theorem

In computability theory, Rice's theorem states that, for any non-trivial property of partial functions, there is no general and effective method to decision problem whether an algorithm computes a partial function with that property....
 shows that any non-trivial question about the behaviour or output of a Turing machine is undecidable.

A universal Turing machine can calculate any recursive function
Recursive function

Recursive function may refer to:* Recursion : a procedure or subroutine, implemented in a programming language, whose implementation references itself...
, decide any recursive language
Recursive language

A recursive language in mathematics, logic and computer science is a type of formal language which is also called decidable or Turing-decidable....
, and accept any recursively enumerable language
Recursively enumerable language

In mathematics, logic and computer science, a recursively enumerable language is a type of formal language which is also called partially decidable or Turing-recognizable....
. According to the Church-Turing thesis, the problems solvable by a universal Turing machine are exactly those problems solvable by an algorithm or an effective method of computation, for any reasonable definition of those terms. For these reasons, a universal Turing machine serves as a standard against which to compare computational systems, and a system that can simulate a universal Turing machine is called Turing complete.

An abstract version of the universal Turing machine is the universal function, a computable function which can be used to calculate any other computable function. The utm theorem
Utm theorem

In computability theory the utm theorem or universal turing machine theorem is a basic result about G?del numberings of the set of computable functions....
 proves the existence of such a function.

When Alan Turing came up with the idea of a universal machine he had in mind the simplest computing model powerful enough to calculate all possible functions which can be calculated. Claude Shannon first explicitly posed the question of finding the smallest possible universal Turing machine when in 1956 he showed that two symbols were sufficient, so long as enough states were used. Shannon himself proved that it was always possible to exchange states by symbols.

After some time, the smallest known universal Turing machine was due to Marvin Minsky
Marvin Minsky

Marvin Lee Minsky is an United States Cognitive Science in the field of artificial intelligence , co-founder of Massachusetts Institute of Technology's AI laboratory, and author of several texts on AI and philosophy....
 who in 1962 discovered a 7-state 4-symbol universal Turing machine using 2-tag systems. Applying Shannon's result to Minsky's UTM upon conversion to a 2-symbol machine Minsky machine would require 43 states.

Other smaller universal Turing machines have since been found. If we denote by (m,n) the class of UTMs with m states and n symbols the following tuples were found by Yurii Rogozhin in 1996: (24, 2), (10, 3), (7, 4), (5, 5), (4, 6), (3, 10), and (2, 18). In 1985, Stephen Wolfram
Stephen Wolfram

Stephen Wolfram is a British physicist, mathematician and businessman known for his work in theoretical particle physics, cosmology, cellular automaton, complexity theory, and computer algebra....
 conjectured a 2-state 5-symbol universal Turing machine. This conjecture was proved by Matthew Cook
Matthew Cook

Matthew Cook is a mathematician and computer scientist who proved Stephen Wolfram's conjecture that the Rule 110 cellular automaton is Turing-complete....
 working as a research assistant to Stephen Wolfram. The model, also known as Rule 110 Elementary Cellular Automaton had, at the time, the smallest product (2,5)=10 of any known universal Turing machine. According to Wolfram other smaller UTMs should exist and he proposed a 2-state 3-symbol Turing Machine
Wolfram's 2-state 3-symbol Turing machine

In his A New Kind of Science, Stephen Wolfram found a universal 2-state 5-color Turing machine, and conjectured that a particular 2-state 3-color Turing machine might be universal Turing machine as well....
 as a candidate. On 24 Oct 2007, Wolfram announced the Turing equivalence of the system had been proven by Alex Smith
Alex Smith (The Simplest Universal Computer Proof contest winner)

Alexander Ian Smith , an undergraduate studying electronic and computer engineering at the University of Birmingham, UK, is known for winning the Stephen Wolfram's research prize in October 2007 for a proof that a particular Wolfram's 2-state 3-symbol Turing machine is the simplest Universal Turing machine possible....
 -- an undergraduate studying electronic and computer engineering at the University of Birmingham
University of Birmingham

The University of Birmingham is a United Kingdom 'Red brick universities' university located in the city of Birmingham, England. Founded in Edgbaston in 1900 as a successor to Mason Science College, and with origins dating back to the 1825 Birmingham Medical School, it was the first of the so-called Red brick universities to receive a Royal...
 -- responding to a contest established by Wolfram. However, on 2007-10-29 Vaughan Pratt of Stanford University
Stanford University

Leland Stanford Junior University, commonly referred to as Stanford University or Stanford, is a private university research university located in Stanford, California, California, United States....
 announced that he discovered a flaw in the proof. Wolfram Research disputes Pratt's interpretation.

Example of universal-machine coding

For those who would undertake the challenge of designing a UTM exactly as Turing specified see the article in Copeland (2004) written by Davies (pp. 103ff). Davies corrects the errors in the original and shows what a sample run would look like. He claims to have successfully run a (somewhat simplified) simulation.


The following example is taken from Turing (1936). For more about this example see the page Turing machine examples
Turing machine examples

The following are examples to supplement the article Turing machine....
.

Turing used seven symbols to encode each 5-tuple; as described in the article Turing machine
Turing machine

Turing machines are basic abstract symbol-manipulating devices which, despite their simplicity, can be adapted to simulate the logic of any computer algorithm....
, his 5-tuples are only of types N1, N2, and N3. The number of each "m-configuration" (instruction, state) is represented by "D" followed by a unary string of A's, i.e. "q3" = DAAA. In a similar manner he encodes the symbols blank as "D", the symbol "0" is "DC", the symbol "1" as DCC, etc. The symbols "R", "L", and "N" remain as is.

After encoding each 5-tuple is then "assembled" into a string in order as shown in the following table:

Current m-configuration Tape symbol Print-operation Tape-motion Final m-configuration  Current m-configuration code Tape symbol code Print-operation code Tape-motion code Final m-configuration code 5-tuple assembled code
| | | | | | | | | | |
q1 | blank | P0 | R | q2 | | DA | D | DC | R | DAA | DADDCRDAA
q2 | blank | E | R | q3 | | DAA | D | D | R | DAAA | DAADDRDAAA
q3 | blank | P1 | R | q4 | | DAAA | D | DCC | R | DAAAA | DAAADDCCRDAAAA
q4 | blank | E | R | q1 | | DAAAA | D | D | R | DA | DAAAADDRDA


Finally, the codes for all four 5-tuples are strung together into a code started by ";" and separated by ";" i.e.:

;DADDCRDAA;DAADDRDAAA;DAAADDCCRDAAAA;DAAAADDRDA


This code he placed on alternate squares -- the "F-squares" -- leaving the "E-squares" (those liable to erasure) empty. The final assembly of the code on the tape for the U-machine consists of placing two special symbols ("e") one after the other, then the code separated out on alternate squares, and lastly the double-colon symbol "'" (blanks shown here with "." for clarity):

ee.;.D.A.D.D.C.R.D.A.A.;.D.A.A.D.D.R.D.A.A.A.;.D.A.A.A.D.D.C.C.R.D.A.A.A.A.;.D.A.A.A.A.D.D.R.D.A.'......


The U-machine's action-table (state-transition table) is responsible for decoding the symbols. Turing's action table keeps track of its place with markers "u", "v", "x", "y", "z" by placing them in "E-squares" to the right of "the marked symbol" -- for example, to mark the current instruction z is placed to the right of ";" x is keeping the place with respect to the current "m-configuration" DAA. The U-machine's action table will shuttle these symbols around (erasing them and placing them in different locations) as the computation progresses:

ee.; .D.A.D.D.C.R.D.A.A. ; zD.A.AxD.D.R.D.A.A.A.;.D.A.A.A.D.D.C.C.R.D.A.A.A.A.;.D.A.A.A.A.D.D.R.D.A.'......


Turing's action-table for his U-machine is very involved.

A number of other commentators (notably Penrose 1990) provide examples of ways to encode instructions for the Universal machine. As does Penrose, most commentators use only binary symbols i.e. only symbols . Penrose goes further and writes out his entire U-machine code (pages 71-73 -- he asserts that it truly is a U-machine code), an enormous number that spans almost 2 full pages of 1's and 0's. For readers interested in simpler encodings for the Post-Turing machine
Post-Turing machine

A Post?Turing machine is a "program formulation" of an especially simple type of Turing machine, comprising a variant of Emil Post's Turing completeness model of computation described below....
 the discussion of Davis in (Steen, 1980, p.251ff) may be useful.