Skip to content
Field Atlas

Atlas / Mathematics / The Foundations Thread

Field · Emerged 1931 – 1936

Computability Theory

What can be computed at all, by any mechanical procedure?

5 chapters4 min read5 turning points1 open problem

Branched from
Metamathematics
Branched into
Computational Complexity
Figures
Alonzo Church, Alan Turing, John von Neumann, Henry Gordon Rice, Martin Davis, Julia Robinson, Yuri Matiyasevich

In brief

Computability theory asks which problems can be solved by an algorithm, a step-by-step procedure that a machine could follow, given unlimited time and memory. In 1936 Alan Turing and Alonzo Church gave precise definitions of "algorithm" and used them to prove that some problems have no algorithmic solution at all. The most famous is the halting problem: no program can decide, for every program and input, whether it will eventually stop.

Turing's abstract machine also contained the idea of a universal machine, one that can run any other machine's program. That is the concept of the stored-program computer, and every phone and laptop is one.

Key ideas

Turing machineEnters 1936

An idealised computer: a tape of symbols, a read–write head, and a finite table of rules. Anything a modern computer can compute, a Turing machine can too, given enough time and tape.

Church–Turing thesisEnters 1936

The claim that every effectively calculable function is computable by a Turing machine. It is not a theorem, since "effectively calculable" is informal, but every proposed model of computation has turned out equivalent.

Halting problemEnters 1936

No algorithm can decide, for every program and input, whether the program halts. The proof is a diagonal argument like Cantor's and Gödel's.

Universal machineEnters 1936 – 1945

A single machine that, given a description of any other machine as input, can simulate it. Software is possible because hardware can be universal.

Undecidable problemEnters 1950 – 1970

A yes-or-no question for which no algorithm always gives the right answer. They turn up far from logic, as in Hilbert's tenth problem about whole-number equations.

Draws on other domains

Chapter I

What Is an Algorithm?

Hilbert's Entscheidungsproblem asked for a mechanical method to decide whether any mathematical statement follows from given axioms. To prove no such method exists, you first have to say exactly what a "mechanical method" is. No one had.

In 1936 two answers arrived within weeks. Alonzo Church at Princeton defined computation with his lambda calculus. Alan Turing, a 23-year-old at Cambridge, imagined a clerk working with pencil and paper and stripped the process down to its essentials: a tape of symbols, a head that reads and writes one symbol at a time, and a finite table of rules. The two definitions turned out equivalent, as did every later proposal. The Church–Turing thesis holds that together they capture everything computable.

Chapter II

Machines That Cannot Decide

With a definition, impossibility could be proved. Turing showed that no machine can decide, for every machine and input, whether it will eventually halt. Suppose one did. Build a machine that runs it on itself and does the opposite, and a contradiction follows. It is Cantor's diagonal argument again, the same trick Gödel had used in metamathematics. The Entscheidungsproblem is unsolvable.

Undecidability spread. In 1953 Rice proved that every non-trivial question about a program's behaviour is undecidable. In 1970, after twenty years of work by Julia Robinson, Martin Davis and Hilary Putnam, the young Yuri Matiyasevich proved that no algorithm can decide whether a polynomial equation has whole-number solutions. That was Hilbert's tenth problem, and a question from elementary number theory.

Chapter III

The Universal Machine

Turing's paper held a second idea. A machine's rule table can itself be written on a tape, so one universal machine can read any other machine's description and simulate it. Hardware need not change for each task, only software. In 1945 John von Neumann's report on the EDVAC described an electronic computer that stored its program in memory alongside its data. The report bore only his name, to the lasting anger of ENIAC's builders, J. Presper Eckert and John Mauchly. Turing designed his own stored-program computer that same year. Every computer since has been a universal machine.

Chapter IV

A Closer Look: The Halting Problem in Five Lines

Suppose someone claims to have written a program halts(P, x) that always answers correctly, in finite time, whether program P run on input x eventually stops. Use it to build a troublemaker:

troublemaker(P):
    if halts(P, P):      # would P stop when fed its own code?
        loop forever
    else:
        stop

Now run troublemaker on its own code. If halts(troublemaker, troublemaker) says "it stops", the program loops forever. If it says "it runs forever", the program stops. Either way halts gave the wrong answer about this one input. So no program halts can be correct on every input.

This is Cantor's diagonal argument again. Picture a table with a row for every program and a column for every input, showing whether that program halts on that input. troublemaker is built to disagree with the diagonal, so it cannot be any row of the table, and yet it is a perfectly good program if halts exists. The contradiction lies in assuming halts exists.

The consequences are practical. A compiler cannot warn about every infinite loop. A verifier cannot check every property of every program (Rice's theorem). An antivirus cannot recognise every virus. Tools in all three areas work around the limit with approximations: they answer "yes", "no" or "don't know", and the undecidable part lives in the "don't know".

It also explains the Busy Beaver function. If BB(n)BB(n) could be computed, then to decide whether an nn-state machine halts you could run it for BB(n)BB(n) steps and see. That would solve the halting problem, so BBBB cannot be computable. The same argument shows no computable function can stay above it, and a sharper version shows it eventually outgrows every one.

Chapter V

The Edge of the Computable

Some functions outgrow computation itself. The Busy Beaver number BB(n)BB(n) is the longest any halting nn-state Turing machine can run, and it eventually exceeds every computable function. In 2024 an online collaboration determined BB(5)=47,176,870BB(5) = 47{,}176{,}870, with a machine-checked proof. BB(6)BB(6) is out of reach. Some 6-state machines mimic unsolved problems in number theory, and at some finite size the values are provably beyond the axioms of mathematics. Knowing what can be computed raised the next question, what can be computed efficiently, which is the subject of computational complexity.

Applications

Where it is used

  • Computing

    Every computer is a universal machine

    A laptop can run a word processor, a game or a climate model without rewiring, because it is a physical approximation of Turing's universal machine: the program is just more data.

  • Security

    Why no antivirus can be perfect

    Fred Cohen showed in 1987 that deciding whether an arbitrary program is a virus is undecidable, a consequence of the halting problem. Security tools must rely on approximations, and determined attackers can always find gaps.

    › Sources (1)
    • Cohen, F. (1987). Computer viruses: theory and experiments. Computers & Security 6(1): 22–35.
  • Quantum physics↗ Physics · Solid-State Physics

    An undecidable question in physics

    In 2015 Cubitt, Perez-Garcia and Wolf proved that whether a quantum material has a "spectral gap", a basic physical property, is undecidable in general. The halting problem reappears inside a question about matter.

    › Sources (1)
    • Cubitt, T. S., Perez-Garcia, D. & Wolf, M. M. (2015). Undecidability of the spectral gap. Nature 528: 207–211.

Open problems

Where the map runs out

Open

What is BB(6)?

Open as of 2026; known to be astronomically large.

For six states the Busy Beaver value is unknown, and known lower bounds are unimaginably large. Some 6-state machines behave like unsolved problems in number theory, iterating Collatz-like rules, so deciding whether they halt may be as hard as famous open conjectures.

Why it is hard

Each small machine has to be proved to halt or to run forever, and a few resist every known technique because their behaviour encodes open mathematical questions. For larger nn, the values are provably independent of ZFC: at some finite size the question leaves mathematics' reach entirely.

What resolving it unlocks

Each new value marks exactly how far current mathematics can see into the space of programs.

› Sources (1)
  • Aaronson, S. (2020). The Busy Beaver frontier. ACM SIGACT News 51(3): 32–54.

Further reading

  1. Hodges, A. (1983). Alan Turing: The Enigma. Burnett Books.

    The definitive biography, covering the mathematics, the codebreaking and his persecution.

  2. Petzold, C. (2008). The Annotated Turing. Wiley.

    Turing's 1936 paper read line by line, with the background explained.

  3. Sipser, M. (2012). Introduction to the Theory of Computation (3rd ed.). Cengage.

    The standard undergraduate textbook, admired for its clarity.