All Topics  
Turing completeness

 

   Email Print
   Bookmark   Link






 

Turing completeness



 
 
In computability theory, several closely-related terms are used to describe the "computational power" of a computational system (such as an abstract machine
Abstract machine

An abstract machine, also called an abstract computer, is a theoretical model of a computer hardware or software system used in Automata theory....
 or programming language
Programming language

A programming language is a machine-readable artificial language designed to express computations that can be performed by a machine, particularly a computer....
):

Turing completeness
A computational system that can compute every Turing-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....
 is called Turing-complete (or Turing-powerful). Alternatively, such a system is one that can simulate a universal Turing machine
Universal Turing machine

Alan Turing's universal computing machine is the name given by him to his model of an all-purpose "a-machine" that could "run" any arbitrary sequence of instructions called "quintuples"....
.
Turing equivalence
A Turing-complete system is called Turing-equivalent if every function it can compute is also Turing-computable; i.e., it computes precisely the same class of functions as do 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....
s.






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



Encyclopedia


In computability theory, several closely-related terms are used to describe the "computational power" of a computational system (such as an abstract machine
Abstract machine

An abstract machine, also called an abstract computer, is a theoretical model of a computer hardware or software system used in Automata theory....
 or programming language
Programming language

A programming language is a machine-readable artificial language designed to express computations that can be performed by a machine, particularly a computer....
):

Turing completeness
A computational system that can compute every Turing-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....
 is called Turing-complete (or Turing-powerful). Alternatively, such a system is one that can simulate a universal Turing machine
Universal Turing machine

Alan Turing's universal computing machine is the name given by him to his model of an all-purpose "a-machine" that could "run" any arbitrary sequence of instructions called "quintuples"....
.
Turing equivalence
A Turing-complete system is called Turing-equivalent if every function it can compute is also Turing-computable; i.e., it computes precisely the same class of functions as do 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....
s. Alternatively, a Turing-equivalent system is one that can simulate, and be simulated by, a universal Turing machine. (All known Turing-complete systems are Turing-equivalent, which adds support to the Church-Turing thesis.)
(Computational) universality
A system is called universal with respect to a class of systems if it can compute every function computable by systems in that class (or can simulate each of those systems). Typically, the term universality is tacitly used with respect to a Turing-complete class of systems. The term weakly universal is sometimes used to distinguish a system (e.g. a cellular automaton
Cellular automaton

A cellular automaton is a discrete mathematics model studied in Computability theory , mathematics, theoretical biology and microstructure modeling....
) whose universality is achieved only by modifying the standard definition of 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....
 so as to include unbounded input.


Overview

Turing completeness, named after Alan Turing
Alan Turing

Alan Mathison Turing, Order of the British Empire, Fellow of the Royal Society was a British mathematician, logician and Cryptanalysis....
, is significant in that every plausible design for a computing device so far advanced can be emulated by a universal Turing machine
Universal Turing machine

Alan Turing's universal computing machine is the name given by him to his model of an all-purpose "a-machine" that could "run" any arbitrary sequence of instructions called "quintuples"....
 — an observation that has become known as the Church-Turing thesis. Thus, a machine that can act as a universal Turing machine can, in principle, perform any calculation that any other programmable computer
Computer

A computer is a machine that manipulates Data according to a list of Code .The first devices that resemble modern computers date to the mid-20th century , although the computer concept and various machines similar to computers existed earlier....
 is capable of. However, this has nothing to do with the effort required to write a program
Computer program

Computer programs are Instruction for a computer. A computer requires programs to function. Moreover, a computer program does not run unless its instructions are executed by a Central processing unit; however, a program may communicate an Algorithm#Formalization of algorithms to people without running....
 for the machine, the time it may take for the machine to perform the calculation, or any abilities the machine may possess that are unrelated to computation.

While truly Turing-complete machines are very likely physically impossible, as they require unlimited storage, Turing completeness is often loosely attributed to physical machines or programming languages that would be universal if they had unlimited storage. All modern computers are Turing-complete in this loose sense, or more precisely linear bounded automaton
Linear bounded automaton

A linear bounded automaton is a restricted form of a non-deterministic Turing machine. It possesses a tape made up of cells that can contain symbols from a finite set alphabet, a head that can read from or write to one cell on the tape at a time and can be moved, and a finite number of states....
-complete.

Charles Babbage
Charles Babbage

Charles Babbage, Royal Society was an England mathematician, philosopher, inventor and mechanical engineer who originated the concept of a programmable computer....
's analytical engine
Analytical engine

The analytical engine, an important step in the history of computers, was the design of a mechanical general-purpose computer by the British mathematician Charles Babbage....
 (1830s) would have been the first Turing-complete machine if it had been built at the time it was designed, but the first actual implementation of a Turing-complete machine appeared in 1941: the program-controlled Z3 of Konrad Zuse
Konrad Zuse

Konrad Zuse was a Germany Civil engineering and computer pioneer. His greatest achievement was the world's first functional program-controlled Turing-complete computer, the Z3 , in 1941 ....
. The universality of the Z3 was presented by Raúl Rojas
Raúl Rojas

Ra?l Rojas is a professor of informatics and mathematics at the Free University of Berlin and a renowned specialist in artificial neural networks....
 in 1998. Prior to Rojas' 1998 paper, the first machine known to be Turing-complete was ENIAC
ENIAC

ENIAC, short for Electronic Numerical Integrator And Computer, was a general-purpose electronic computer. It was a Turing complete, digital computer capable of being reprogrammed to solve a full range of computing problems....
 (1946).

The gap from the 1830s to the 1940s was not a period of continuous "mechanical computer" development. A mathematical demonstration of the computational resolution of problems remains with the first formal programming languages (1930s), and a wide range of solutions were demonstrated in the 1930s and 1940s, justifying the "investment" on the computing machines of the 1940s.

A hypothesis called digital physics
Digital physics

In physics and cosmology, digital physics is a collection of theoretical perspectives that start by assuming that the universe is, at heart, describable by information, and is therefore Computability theory ....
 states that the universe
Universe

The universe is defined as everything that physically exists: the entirety of space and time, all forms of matter, energy and momentum, and the physical laws and physical constants that govern them....
 is computable on a universal Turing machine, which would imply that no computer more powerful than a universal Turing machine can be physically built (see philosophical implications in the Church-Turing thesis).

See the article on computability theory for a long list of systems that are Turing-complete, as well as several systems that are less powerful, and several theoretical systems that are even more powerful than a universal Turing machine.

Related work

One important result from computability theory is that it is impossible in general to determine whether a program written in a Turing-complete language will continue executing forever or will stop within a finite period of time (see 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....
). One method of commonly getting around this is to cause programs to stop executing after a fixed period of time, or to limit the power of flow control instructions. Such systems are strictly not Turing-complete by design.

Another curious theorem from computability theory is that there are problems solvable by Turing-complete languages that cannot be solved by languages with finite looping capabilities (i.e. languages that guarantee any program will halt). This result is derived by, for example, Brainerd and Landweber using the PL and PL- languages.

Examples

The computational systems (algebras, calculi) that are discussed as Turing complete systems are those intended for studying theoretical computer science
Theoretical computer science

Theoretical computer science is the collection of topics of computer science that focuses on the more abstract, logical and mathematical aspects of computing, such as the theory of computation, analysis of algorithms, and semantics of programming languages....
. They are intended to be as simple as possible, so that it would be easier to understand the limits of computation. Here are a few:
  • Automata theory
    Automata theory

    In theoretical computer science, automata theory is the study of abstract machines and problems which they are able to solve. Automata theory is closely related to formal language theory as the automata are often classified by the class of formal languages they are able to recognize....
     the standard for teaching
  • Universal Turing machine
    Universal Turing machine

    Alan Turing's universal computing machine is the name given by him to his model of an all-purpose "a-machine" that could "run" any arbitrary sequence of instructions called "quintuples"....
     the classic
  • Lambda calculus
    Lambda calculus

    In mathematical logic and computer science, lambda calculus, also written as ?-calculus, is a formal system designed to investigate function definition, function application and recursion....
     the original (Alonzo Church
    Alonzo Church

    Alonzo Church was an United States mathematician and list of logicians who made major contributions to mathematical logic and the foundations of theoretical computer science....
    's paper predated Turing's, but Turing is credited for fuller explanation of the implications)
  • Formal grammar
    Formal grammar

    In formal language theory, grammars, also called formal grammars or generative grammars, are a formalism used to describe formal languages – i.e....
     (language generators)
  • Formal language
    Formal language

    A formal language is a set of words, i.e. finite string of letters, or symbols. The inventory from which these letters are taken is called the alphabet over which the language is defined....
     (language recognizers)
  • Rewrite system
  • 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....
    s
Most programming language
Programming language

A programming language is a machine-readable artificial language designed to express computations that can be performed by a machine, particularly a computer....
s, conventional and unconventional, are Turing-complete. This includes:
  • All general-purpose languages in wide use.
    • Procedural programming
      Procedural programming

      Procedural programming can sometimes be used as a synonym for imperative programming , but can also refer to a programming paradigm based upon the concept of the procedure call....
       languages such as Pascal.
    • Object-oriented
      Object-oriented programming language

      An object-oriented programming language is one that allows or encourages, to some degree, object-oriented programming techniques such as Information hiding, Inheritance , module , and Polymorphism ....
       languages such as Java
      Java (programming language)

      Java is a programming language originally developed by James Gosling at Sun Microsystems and released in 1995 as a core component of Sun Microsystems' Java ....
      .
    • Multi-paradigm
      Multi-paradigm programming language

      A multi-paradigm programming language is a programming language that supports more than one programming paradigm. As Lead designer Tim Budd holds it: The idea of a multiparadigm language is to provide a framework in which programmers can work in a variety of styles, freely intermixing constructs from different paradigms. The design goal...
       languages such as Ada, Object Pascal
      Object Pascal

      Object Pascal refers to a branch of Object-oriented programming derivatives of Pascal , mostly known as the primary programming language of CodeGear Delphi....
      , C++ and Common Lisp
      Common Lisp

      Common Lisp, commonly abbreviated CL, is a dialect of the Lisp programming language, published in American National Standards Institute standard document Information Technology - Programming Language - Common Lisp, formerly X3.226-1994 ....
      .
  • Most languages using less common paradigms
    • Functional
      Functional programming

      In computer science, functional programming is a programming paradigm that treats computation as the evaluation of function s and avoids program state and immutable object data....
       languages such as LISP
      Lisp

      A lisp is a speech impediment, historically also known as sigmatism. Stereotypically, people with a lisp are unable to pronounce sibilants , and replace them with Interdental consonants , though there are actually several kinds of lisps....
       and Haskell
      Haskell (programming language)

      Haskell is a standardized, purely functional programming language with non-strict programming language, named after logician Haskell Curry. The goals of the language are described as:...
      .
    • Logic programming
      Logic programming

      Logic programming is, in its broadest sense, the use of mathematical logic for computer programming. In this view of logic programming, which can be traced at least as far back as John McCarthy 's [1958] Advice taker proposal, logic is used as a purely Declarative programming language representation language, and a automated theorem proving o...
       languages such as Prolog
      Prolog

      Prolog is a logic programming language. It is a general purpose language often associated with artificial intelligence and computational linguistics....
      .
    • Declarative
      Declarative programming

      In computer science, declarative programming is a programming paradigm that expresses the logic of a computation without describing its control flow....
       languages such as XSLT
      XSL Transformations

      Extensible Stylesheet Language Transformations is an XML-based language used for the XML transformation language into other XML or "human-readable" documents....
      .
    • Esoteric programming language
      Esoteric programming language

      An esoteric programming language is a programming language designed as a test of the boundaries of computer programming language design, as a proof of concept, or as a joke....
      s, such as brainfuck
      Brainfuck

      The brainfuck language is an esoteric programming language noted for its extreme minimalism. It is a Turing tarpit, designed to challenge and amuse programmers, and is not suitable for practical use....
      .


The specific language features used to achieve Turing-completeness can be quite different; FORTRAN
Fortran

Fortran is a general-purpose programming language, procedural programming language, imperative programming language programming language that is especially suited to numerical analysis and scientific computing....
 systems would use loop constructs or possibly even GOTO
GOTO

GOTO is a statement found in many computer programming languages. It is a combination of the English words wiktionary:go and wiktionary:to....
 statements to achieve repetition; Haskell and Prolog, lacking looping almost entirely, would use recursion
Recursion

Recursion, in mathematics and computer science, is a method of defining Function in which the function being defined is applied within its own definition....
. Turing-completeness is an abstract statement of capability, rather than a prescription of specific language features used to implement that capability.

It is difficult to find examples of non-Turing complete languages, as these languages are usually very limited (see, however, machine that always halts
Machine that always halts

In computability theory, a machine that always halts?also called a decider or a total Turing machine ?is a Turing machine that halts for every input....
). Examples include some of the early versions of the pixel shader languages embedded in Direct3D
Direct3D

Direct3D is part of Microsoft's DirectX application programming interface. Direct3D is only available for Microsoft's various Microsoft Windows operating systems and is the base for the graphics API on the Xbox and Xbox 360 console systems....
 and OpenGL
OpenGL

OpenGL is a standard specification defining a cross-language cross-platform Application programming interface for writing applications that produce 2D computer graphics and 3D computer graphics....
 extensions, or a series of mathematical formulae in a spreadsheet
Spreadsheet

A spreadsheet is a computer application that simulates a paper worksheet. It displays multiple cells that together make up a grid consisting of rows and columns, each cell containing either alphanumeric text or numeric values....
 with no cycles. While it is possible to perform many interesting operations in such a system, this fails to be Turing-complete as it is impossible to form loops. Another example is the category of regular expressions, which are generated by finite automata
Finite state machine

A finite state machine or finite state automaton or simply a state machine, is a model of behavior composed of a finite number of state s, transitions between those states, and actions....
. A more powerful but still not Turing-complete extension of finite automata
Finite state machine

A finite state machine or finite state automaton or simply a state machine, is a model of behavior composed of a finite number of state s, transitions between those states, and actions....
 is the category of pushdown automata
Pushdown automaton

In automata theory, a pushdown automaton is a finite state machine that can make use of a Stack containing data....
 and context-free grammars, which are commonly used to generate parse trees in an initial stage of program compilation
Compiler

A compiler is a computer program that transforms source code written in a programming language into another computer language . The most common reason for wanting to transform source code is to create an executable program....
.

There are some languages where all functions are total, and must terminate, such as Charity and Epigram. Charity uses a type system and control constructs based on category theory
Category theory

In mathematics, category theory deals in an abstract way with mathematical structures and relationships between them: it abstracts from set s and function s to objects linked in diagrams by morphisms or arrows....
, whereas Epigram uses dependent type
Dependent type

In computer science and logic, a dependent type is a type which depends on a value. Dependent types play a central role in intuitionistic type theory and in the design of experimental functional programming languages like Dependent ML and Epigram ....
s.

Languages based on total functions that can work on streams that are in potentia, but not formally, infinite are currently being investigated by researchers such as David Turner
David Turner (computer scientist)

Professor David Turner is a United Kingdom computer scientist.He has a D.Phil. from the University of Oxford. He has held professorships at Queen Mary, University of London, University of Texas at Austin and the University of Kent, where he now retains the post of Emeritus Professor....
. This would enable turing-incomplete languages to be used even for tasks such as Systems programming.

Turing-completeness in SQL
SQL

SQL is a database computer language designed for the retrieval and management of data in relational database management systems , database schema creation and modification, and database object access control management....
 is implemented through proprietary extensions, illustrating one of the reasons why relatively powerful non-Turing-complete languages are rare: the more powerful the language is initially, the more complex are the tasks to which it is applied and the sooner its lack of completeness becomes perceived as a drawback, encouraging its extension until it is Turing-complete.

The untyped lambda calculus
Lambda calculus

In mathematical logic and computer science, lambda calculus, also written as ?-calculus, is a formal system designed to investigate function definition, function application and recursion....
 is Turing-complete, but many typed lambda calculi, including System F
System F

System F, also known as the polymorphic lambda calculus or the second-order lambda calculus, is a typed lambda calculus. It was discovered independently by the logician Jean-Yves Girard and the computer scientist John C....
, are not. The value of typed systems is based in their ability to represent most "typical" computer programs while detecting more errors.

Rule 110 and Conway's Game of Life
Conway's Game of Life

The Game of Life, also known simply as Life, is a cellular automaton devised by the United Kingdom mathematician John Horton Conway in 1970....
, both cellular automata
Cellular automaton

A cellular automaton is a discrete mathematics model studied in Computability theory , mathematics, theoretical biology and microstructure modeling....
, are Turing-complete.

See also

  • Smn theorem
  • Church-Turing thesis
  • Computability theory
    Computability theory (computer science)

    In computer science, computability theory is the branch of the theory of computation that studies which problems are computationally solvable using different Model of computation....
  • Algorithmic information theory
    Algorithmic information theory

    Algorithmic information theory is a subfield of information theory and computer science that concerns itself with the relationship between theory of computation and Information#Measuring information....
  • Chomsky hierarchy
    Chomsky hierarchy

    Within the field of computer science, specifically in the area of formal languages, the Chomsky hierarchy is a containment hierarchy of classes of formal grammars....
  • Machines that always halt
  • 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....
    's A New Kind of Science
    • Principle of Computational Equivalence
  • Turing tarpit
    Turing tarpit

    Turing tarpit is a general term for a programming language designed to be Turing-complete while in some sense simplifying to the greatest extent possible both the syntax and the semantics of the language....


External links