The History of the Turing Machine and the Theory of Computation

Matt George
Matt George

Fractional CTO · Founder of Injuria.ai

The History of the Turing Machine and the Theory of Computation

The theory of computation is the branch of computer science and mathematics that investigates which problems can be solved by a computer, how efficiently they can be solved, and to what extent. At its heart lies a simple, abstract device known as the Turing machine. Conceived not as a physical blueprint but as a mathematical thought experiment, the Turing machine provided the first rigorous, universally accepted definition of what it means to compute. Its creation was not aimed at building practical hardware but at answering a profound question in the foundations of mathematics, a question that had stumped the world's leading thinkers.

The story of the Turing machine is the story of how a purely abstract concept gave birth to the digital age. It begins in a period of mathematical crisis, where the very certainty of logic was in question. Alan Turing’s work provided a definitive answer to a key problem, but in doing so, he also laid the complete theoretical groundwork for the modern stored-program computer. His universal machine is the direct intellectual ancestor of every smartphone, laptop, and server in existence.

From this single concept, an entire field bloomed. Researchers moved from asking what is computable to what is feasible to compute, giving rise to complexity theory and the famous P versus NP problem. This theoretical framework now underpins everything from compiler design and network protocols to cryptography and artificial intelligence. Understanding this history is to understand the logical bedrock upon which all of modern information technology is built.

The Crisis of Foundations (1900 to 1931)

At the turn of the 20th century, mathematics was undergoing a period of intense self-examination. The discovery of paradoxes in set theory, such as Russell's paradox[1], had shaken the discipline's foundations. In response, the German mathematician David Hilbert[2] launched an ambitious program to place all of mathematics on a firm, logical footing. At the 1900 International Congress of Mathematicians in Paris, he outlined 23 major unsolved problems. Hilbert's program sought to formalize mathematics as a complete and consistent set of axioms, from which all mathematical truths could, in principle, be derived through mechanical symbol manipulation.

A key component of this vision was the Entscheidungsproblem, or the "decision problem." Posed formally by Hilbert and Wilhelm Ackermann in 1928, it asked for the existence of a definite method, an "effective procedure," that could be applied to any logical statement and decide, in a finite number of steps, whether that statement was universally valid. Such an algorithm would, in effect, be a universal truth machine, capable of solving any mathematical problem by rote calculation. The search for this procedure was a central goal of the formalist school.

The first major blow to Hilbert's program came in 1931 from the Austrian logician Kurt Gödel[3]. His two incompleteness theorems[4] delivered a stunning result. Gödel proved that for any consistent formal axiomatic system powerful enough to describe the arithmetic of the natural numbers (like Peano arithmetic), there are true statements about the natural numbers that cannot be proven from the axioms, and that such a system cannot prove its own consistency. This demonstrated that Hilbert's dream of a complete and provably consistent formalization of all mathematics was impossible. Gödel had shown that truth and provability were not the same thing. However, his work did not directly address the Entscheidungsproblem. It was still conceivable that an algorithm could exist to decide the provability of all statements, even if some true statements remained unprovable.

The Birth of the Universal Machine (1936 to 1937)

The definitive, negative answer to the Entscheidungsproblem came in 1936 from a 24-year-old British mathematician at Cambridge University, Alan M. Turing. To solve the problem, Turing first had to create a formal, mathematical definition of what an "effective procedure" or "algorithm" actually was. Previous mathematicians had an intuitive understanding, but no one had captured it in a way that was suitable for rigorous proof. Turing's genius was to model the actions of a human "computer" performing a calculation.

The Turing Machine Model

In his seminal paper, "On Computable Numbers, with an Application to the Entscheidungsproblem[5]," published in the Proceedings of the London Mathematical Society, Turing introduced his abstract machine. As described in The Annotated Turing[6], the machine consisted of a few simple components:

  1. An infinite tape, divided into discrete cells. Each cell could contain one symbol from a finite alphabet (e.g., '0', '1', or a blank symbol).
  2. A read/write head, which could read the symbol in one cell at a time, write a new symbol in its place, and move one cell to the left or right.
  3. A state register, which stored the machine's current state. The machine had a finite number of possible states.
  4. A transition function (or "table of behavior"), which served as the machine's program. For any given current state and symbol being read, the table would specify the new symbol to write, the direction to move the head (left or right), and the next state to transition to.

This simple model captured the essence of mechanical computation: following a finite set of unambiguous rules to manipulate symbols. A computation would start in a defined initial state with an input on the tape. The machine would then follow its transition rules step by step. The computation would halt if it reached a designated halting state. The contents of the tape at that point would be the result.

The Universal Turing Machine

The most powerful idea in Turing's paper was the concept of a Universal Turing Machine (UTM). Turing realized that the transition table of any specific Turing machine could itself be encoded as a string of symbols on the tape. He then described a special machine, the UTM, which could read the description of any other Turing machine from the tape, along with that machine's input, and then perfectly simulate its operation. The UTM would execute the other machine's program.

This was a profound breakthrough. It established that a single machine could, in principle, perform any task that any other computing machine could perform. The difference between a machine that calculates mortgage payments and one that simulates weather patterns is not a difference in hardware, but a difference in the software, the instructions fed to it. This is the core principle of the stored-program computer, which would later be implemented in physical form by pioneers like John von Neumann[7] (who was directly familiar with Turing's work). It is a common misconception that Turing built a physical machine; his great contribution was this foundational mathematical theory of Turing Computability[8].

Solving the Entscheidungsproblem

With a formal definition of computation in hand, Turing could finally tackle the Entscheidungsproblem. He did this by defining the halting problem: is there a general algorithm that can determine, for any given Turing machine and its input, whether the machine will eventually halt or run forever? Turing proved, by a method of contradiction, that no such algorithm can exist. He imagined a hypothetical machine 'H' that could solve the halting problem. He then constructed a new machine 'D' that used 'H' as a subroutine. 'D' would take a machine's description as input, run 'H' to see if that machine would halt when fed its own description, and then deliberately do the opposite: if 'H' predicted a halt, 'D' would loop forever; if 'H' predicted a loop, 'D' would halt.

What happens when machine 'D' is given its own description as input? According to its own logic, if it halts, it must loop forever. If it loops forever, it must halt. This logical paradox proved that the initial assumption, the existence of the halting-solver machine 'H', must be false. The halting problem is therefore undecidable.

Because the Entscheidungsproblem could be reduced to the halting problem (if you could solve the Entscheidungsproblem, you could solve the halting problem), Turing's proof showed that the Entscheidungsproblem is also undecidable. There is no universal mechanical procedure for determining mathematical truth. Hilbert's dream was definitively over.

Equivalent Models and the Church-Turing Thesis (1930s to 1940s)

Turing was not working in a vacuum. At Princeton University, the American logician Alonzo Church[9] was also investigating the foundations of computation, but using a completely different formalism: the lambda calculus. Developed in the early 1930s with his students Stephen Kleene[10] and J.B. Rosser, the lambda calculus is a system for expressing computation based on function abstraction and application. It uses variable binding and substitution to represent algorithms.

In the spring of 1936, just before Turing's paper was published, Church published a paper that also gave a negative answer to the Entscheidungsproblem, using the properties of the lambda calculus. He had previously proposed what came to be known as "Church's Thesis," which asserted that the intuitive notion of an "effectively calculable function" was precisely captured by the functions definable in his lambda calculus.

When Turing's paper arrived at Princeton (where Turing would soon go to complete his Ph.D. under Church), it caused a stir. Here was a completely different model of computation, based on a mechanical device, that seemed to capture the same class of functions. It was quickly proven by Turing in an appendix to his paper that the two models, Turing machines and lambda calculus, were equivalent in computational power. Any function that could be computed by a Turing machine could be expressed in lambda calculus, and vice versa. Another logician, Emil Post[11], independently developed a model very similar to Turing's in 1936.

This remarkable convergence of different, independently conceived formalisms led to the strengthening of Church's original thesis into the Church-Turing thesis[12]. The thesis states that any function that is intuitively considered computable can be computed by a Turing machine. It posits that the Turing machine model fully captures the limits of what is possible with mechanical computation. The thesis is not a mathematical theorem that can be proven; it is a hypothesis about the nature of computation in the physical world. To date, no one has conceived of a realistic model of computation that can solve a problem that a Turing machine cannot, though theoretical models exist. This thesis remains the fundamental principle of the theory of computation, as detailed in texts like Models of Computation[13].

From Computability to Complexity (1950s to 1970s)

Once the theory of computability established what problems could be solved by algorithms, the focus of theoretical computer science began to shift. The new question was not just what is computable, but what is feasibly computable. A problem that would take a computer longer than the age of the universe to solve is, for all practical purposes, unsolvable. This gave rise to computational complexity theory.

The Chomsky Hierarchy

A crucial step in this direction came from an unlikely field: linguistics. In the 1950s, linguist Noam Chomsky[14] was developing a mathematical theory of grammar. In 1956, he introduced the Chomsky hierarchy[15], which classified formal languages into four types based on the complexity of their grammatical rules. He showed that each type of language corresponded to a specific type of computational automaton required to recognize it.

  • Type-3 (Regular Languages): Recognizable by the simplest automata, Finite Automata[16]. Used in pattern matching like regular expressions.
  • Type-2 (Context-Free Languages): Recognizable by Pushdown Automata[17]. This forms the basis for the syntax of most programming languages and is fundamental to compiler parsing.
  • Type-1 (Context-Sensitive Languages): Recognizable by Linear-Bounded Automata, a type of Turing machine that can only use the portion of the tape occupied by the input.
  • Type-0 (Recursively Enumerable Languages): Recognizable by a standard Turing machine. This class includes all problems that are computable.

The Chomsky hierarchy provided a powerful framework, detailed in books like Automata, Computability and Complexity, for linking the structure of languages (both human and computer) to the computational power needed to process them. It became a cornerstone of compiler design and formal language theory.

P versus NP

The 1960s and 1970s saw the formalization of complexity classes based on the resources (time and space) required by a Turing machine to solve a problem. In 1965, Juris Hartmanis and Richard E. Stearns published "On the Computational Complexity of Algorithms," which defined complexity classes like DTIME(f(n)) for problems solvable in deterministic time proportional to f(n). This work earned them the 1993 Turing Award.

This research culminated in the definition of the most famous problem in all of computer science: P versus NP. The class P (Polynomial time) consists of decision problems that can be solved by a deterministic Turing machine in a number of steps that is a polynomial function of the input size. These are generally considered to be the "tractable" or "efficiently solvable" problems.

The class NP (Nondeterministic Polynomial time) is a bit more subtle. It consists of decision problems for which a proposed solution can be verified in polynomial time. For example, finding the prime factors of a very large number is hard (no known polynomial-time algorithm exists), but verifying that a given set of factors is correct is easy (just multiply them). A key insight is that NP can also be defined as the set of problems solvable in polynomial time on a nondeterministic Turing machine, a theoretical model that can explore all possible computation paths simultaneously.

Clearly, P is a subset of NP. The big question is: does P equal NP? If it did, it would mean that every problem for which a solution can be quickly verified can also be quickly solved. In 1971, Stephen Cook at the University of Toronto published his paper "The Complexity of Theorem-Proving Procedures[18]," which proved that a specific problem, the Boolean satisfiability problem (SAT), had a special property: if SAT could be solved in polynomial time, then every other problem in NP could also be solved in polynomial time. SAT was the first problem to be proven NP-complete. Leonid Levin[19] discovered the concept of NP-completeness independently in 1971, the same year as Stephen Cook. His paper on the topic was not published until 1973 due to delays in the Soviet system. A year after Cook's paper, Richard Karp[20] published a landmark paper showing that 21 other well-known, important problems (like the traveling salesman problem and the clique problem) were also NP-complete. This demonstrated that the P vs. NP question was not just a theoretical curiosity but a problem of immense practical significance.

The Modern Era and Future Horizons (1980s to Present)

The theory of computation is not a historical relic; it is a living field that continues to shape technology. The P versus NP problem remains unsolved and is one of the seven Millennium Prize Problems[21], each with a million-dollar prize from the Clay Mathematics Institute. Most computer scientists believe that P does not equal NP, meaning there are classes of problems for which efficient solutions will likely never be found.

This presumed difficulty is not just a limitation; it is a resource. The entire field of modern public-key cryptography, which secures e-commerce and digital communications, is built on the assumption that certain problems are computationally intractable. For example, the RSA algorithm[22] relies on the difficulty of factoring large integers, a problem in NP but not known to be in P. If P=NP were proven true, and a practical polynomial-time algorithm for factoring were found, most of modern cryptography would be broken overnight.

The study of NP-hard problems has led to the development of sophisticated techniques for dealing with them in practice. This includes designing approximation algorithms that run in polynomial time and guarantee a solution that is within a certain factor of the optimal one, and randomized algorithms that use randomness to find a likely solution quickly. These techniques are essential in logistics, circuit design, protein folding, and countless other optimization domains, as outlined in works like Dana Scott's Outline of a Mathematical Theory of Computation[23].

Looking forward, researchers are exploring models of computation that may transcend the classical Turing machine. Quantum computing is the most prominent example. A quantum computer, which uses principles like superposition and entanglement, is not a universal problem solver that can tackle undecidable problems. However, for specific problems, it offers a dramatic speedup. In 1994, Peter Shor developed a quantum algorithm that can factor integers in polynomial time. If a large-scale, fault-tolerant quantum computer is ever built, it would render RSA and other similar cryptosystems obsolete. This has spurred research into post-quantum cryptography, developing new cryptographic systems resistant to attacks from both classical and quantum computers.

Other, more speculative, avenues include hypercomputation, which explores theoretical models (like Zeno machines or oracle machines) that could solve undecidable problems like the halting problem. While physically unrealizable based on current knowledge, they serve as valuable thought experiments for probing the absolute limits of what is knowable. The simple, elegant model of computation proposed by Alan Turing in 1936 not only answered a foundational question in mathematics but also defined the boundaries and possibilities of the entire digital world. Its legacy continues to guide the exploration of computation's final frontiers.

Sources (23)
  1. Russell's paradox - Stanford Encyclopedia of Philosophy
  2. David Hilbert - MacTutor History of Mathematics
  3. Kurt Gödel - Stanford Encyclopedia of Philosophy
  4. Gödel's incompleteness theorem - Britannica
  5. On Computable Numbers, with an Application to the Entscheidungsproblem
  6. The Annotated Turing by Charles Petzold
  7. John von Neumann - Britannica
  8. Turing Computability by Robert I. Soare
  9. Alonzo Church - Britannica
  10. Stephen Kleene - MacTutor History of Mathematics
  11. Emil Post - MacTutor History of Mathematics
  12. The Church-Turing Thesis - Stanford Encyclopedia of Philosophy
  13. Models of Computation by Maribel Fernandez
  14. Noam Chomsky - Official Bio
  15. Chomsky Hierarchy in Theory of Computation - GeeksforGeeks
  16. Finite-state machine - Wikipedia
  17. Pushdown automaton - Wikipedia
  18. The Complexity of Theorem-Proving Procedures - ACM Digital Library
  19. Leonid Levin - Wikipedia
  20. Richard M. Karp - National Academy of Sciences
  21. Millennium Prize Problems - Clay Mathematics Institute
  22. RFC 3447: Public-Key Cryptography Standards (PKCS #1): RSA Cryptography
  23. Outline of a Mathematical Theory of Computation by Dana S. Scott