The Busy Beaver and the Boundary of Provability
A single function measures our knowledge of mathematics, and indicates its limits
“‘Tis the note of the Jubjub! Keep count, I entreat;
You will find I have told it you twice.
‘Tis the song of the Jubjub! The proof is complete,
If only I’ve stated it thrice.”The Beaver had counted with scrupulous care,
Attending to every word:
But it fairly lost heart, and outgrabe in despair,
When the third repetition occurred.
— Lewis Carroll, The Hunting of the Snark, Fit the Fifth
I have to admit, despite my interest in complexity theory (it was at one point my first choice for a PhD subject), I didn’t quite understand the Busy Beaver function. Not that I didn’t understand the definition, but I didn’t understand why anyone would care.
In writing a recent article on unsolved math problems, I started thinking a bit more about the Busy Beaver function and just exactly how profound a question it is. I hope to impart some of my interest in this article, because I think our fun little woodland critter has built a rather elegant bridge between decidability and provability in a way that a lot of people reference but rarely make explicit.
Accessibility
I only assume that you know roughly what ZFC is, what Gödel’s incompleteness theorems are, and what a Turing machine is.
Busy Beaver
Definition (Busy Beaver Function $\text{BB}(n, k)$)
Let \(\text{BB} \colon \N \times \N \to \N\) be the function where \(\text{BB}(n, k)\) is the greatest number of steps that any halting \(n\)-state, \(k\)-symbol Turing machine runs, when started on a blank tape.
Because we typically work on two-symbol machines, we write
\[\text{BB}(n) := \text{BB}(n, 2)\]For a Turing machine \(M\), we write \(\lvert Q_M \rvert\) for the number of states that \(M\) has and \(s(M)\) for the number of steps it runs when started on a blank tape, so we can define \(\text{BB}(n)\) equivalently as
\[\text{BB}(n) := \max \setbuild{s(M)}{M \text{ halts and } \lvert Q_M \rvert = n}\]where \(M\) ranges over two-symbol machines.
This function was introduced in 1962 by Tibor Radó (1895 - 1965), who proved that it grows faster than any computable function: that is, if \(f(n)\) is a computable function, then \(\text{BB}(n) > f(n)\) for all sufficiently large \(n\). As an immediate corollary, no Turing machine can compute \(\text{BB}(n)\) for every \(n\). In other words, if you were to smoothly interpolate \(\text{BB}(n)\), it would eventually grow faster than anything we can write down.
Only five values of the Busy Beaver function are known:
- \[\text{BB}(1) = 1\]
- \[\text{BB}(2) = 6\]
- \[\text{BB}(3) = 21\]
- \[\text{BB}(4) = 107\]
- \[\text{BB}(5) = 47{,}176{,}870\]
so the function escalates quite quickly. The fifth Busy Beaver number was proven in 2024 by a Discord group dedicated to studying the function.
Adam Yedidia and Scott Aaronson showed in 2016 that ZFC cannot prove what the value of \(\text{BB}(7918)\) is (assuming that a certain large-cardinal axiom is consistent). Aaronson described the significance of the result:
… we know that it’s possible with our laws of physics to build a self-replicating machine: say, DNA or RNA and their associated paraphernalia. We also know that tiny molecules like H2O and CO2 are not self-replicating. But we don’t know how small the smallest self-replicating molecule can be—and that’s an issue that influences whether we should expect to find ourselves alone in the universe or find it teeming with life.
By December 1, 2026, this had been successively lowered all the way down to \(\text{BB}(187)\), with that latest machine given by FireflySentinel (Alex Gu).
Flavors of Decidability
Definition (Turing-Corecognizable)
A statement is called Turing-corecognizable (equivalently universal, corecursively enumerable, or co-semi-decidable), denoted \(\Pi_1\), if it can be restated in the form “all numbers have a specific, checkable property”.
When we say “checkable”, we mean that an algorithm (Turing machine) could do it. No non-constructive or undecidable chicanery allowed!
Example (Goldbach Conjecture)
All even integers \(n > 2\) can be written as the sum of two primes.
Example (Fermat’s Last Theorem)
No positive integers \(a, b, c\) and \(n \geq 3\) satisfy
\[a^n + b^n = c^n\]Example (The Riemann Hypothesis)
Every complex number \(s \neq 1\) is exactly one of
- A negative even integer,
- A zero of the Riemann zeta function with real part \(1/2\), or
- Not a zero of the Riemann zeta function, that is, \(\zeta(s) \neq 0\)
As stated, this quantifies over complex numbers, and \(\zeta(s) = 0\) isn’t something a machine can check. But Lagarias showed that it’s equivalent to a statement about integers: for all \(n \geq 1\),
\[\sigma(n) \leq H_n + e^{H_n} \log H_n\]where \(\sigma(n)\) is the sum of the divisors of \(n\) and \(H_n = 1 + \frac{1}{2} + \cdots + \frac{1}{n}\) is the \(n\)th harmonic number.
The negation of a universal statement (with \(\forall\)) is an existential statement (with \(\exists\)): all we need to do is provide a single number with a checkable property. These also have a name:
Definition (Turing-Recognizable)
A statement is called Turing-recognizable (equivalently existential, recursively enumerable, or semi-decidable), denoted \(\Sigma_1\), if it can be restated in the form “there exists a number with a specific, checkable property”.
Example (Odd Perfect Number)
There exists an odd perfect number.
Importantly, if the existence of a counterexample to a conjecture is independent of ZFC, then the conjecture would have to be true: if a counterexample existed then an algorithm would be able to verify it, so the only way for the statement to be independent is if it’s true. We can construct several statements:
Example (Goldbach Counterexample)
There exists an even \(n > 2\) that is not the sum of two primes.
Example (Counterexample to Fermat’s Last Theorem)
There exist positive integers \(a, b, c\) and \(n \geq 3\) such that
\[a^n + b^n = c^n\]Example (Counterexample to the Riemann Hypothesis)
There exists a complex number \(s_0\) such that \(s_0\) is not a negative even integer, the real part of \(s_0\) is not \(1/2\), and \(\zeta(s_0) = 0\). Equivalently, there exists an \(n \geq 1\) with \(\sigma(n) > H_n + e^{H_n} \log H_n\).
So FLT and RH could never have been proven independent of ZFC, since such a proof would also prove them true, and the same goes for Goldbach (which is still open at the time of writing). This is a general fact about \(\Pi_1\) statements: if a \(\Pi_1\) statement is independent of ZFC, then it’s true. This brings us to one more statement:
Example (ZFC is Contradictory)
There exists a proof in ZFC that \(0 = 1\).
Finally, the problems (sets of numbers) that are both \(\Pi_1\) and \(\Sigma_1\) are exactly the decidable ones, denoted \(\Delta_1\).
Statements As Machines
There is actually a cottage industry of people (led by the aforementioned Discord group, of course) making Turing machines that recognize counterexamples (or solutions) to huge open problems, which they call “Cryptids”, and apparently have a Lovecraft-themed mascot:
The Busy Beaver Wiki’s Lovecraftian beaver. Lauren (a friend of Discord user Fern), 2025, CC BY, via the Busy Beaver Wiki
For example, Turing machines with the following numbers of states have been constructed to halt if and only if:
- Goldbach’s conjecture is false (\(19\))
- Legendre’s conjecture is false (\(21\))
- An odd perfect number exists (\(24\))
- Fermat’s Last Theorem is false (\(90\))
- The Riemann hypothesis is false (\(95\))
- ZF (equivalently, ZFC) is contradictory (\(187\))
Importantly, there’s no meaningful floor to aim for. Theoretically, every statement resolvable in ZFC can be trivially encoded into a one-state Turing machine that halts immediately, or a one-state machine that runs forever; we just don’t know which one until we’ve solved it. The purpose of these machines is that their halting (or failure to halt) actually tells us something, so the \(90\)-state machine that encodes FLT doesn’t even have a theoretical use beyond a proof of concept.
Shrinking the number of states is of mild theoretical interest for two reasons. First, small Turing machines that halt if ZFC is contradictory tell us where the “Gödelian gremlin” (to use Aaronson’s term) appears: how small a Turing machine can get before it exhibits behavior that ZFC cannot prove. A \(7918\)-state machine is a brain teaser, but a \(187\)-state machine feels like something you can practically hold in your hand.
Second, if we were to theoretically encode an unsolved conjecture into a machine with five or fewer states, where the Busy Beaver numbers are known, we immediately unlock a fascinating proof technique.
In Search of Proofs
This proof technique follows from an interesting fact about ZFC:
Theorem (Provability is Recognizable)
Provability in ZFC is recognizable.
(For example, consider a machine that just loops over all text, sorted first by length and then by alphabetical order, and jams each string into Lean or Rocq or another proof verifier. That these theorem checkers work is what makes provability recognizable.)
So in particular, for any proposition \(P\), we can construct two Turing machines:
- \(M_P^+\), which enumerates proofs in ZFC until it finds a proof of \(P\), then halts;
- \(M_P^-\), which enumerates proofs in ZFC until it finds a proof of \(\neg P\), then halts.
Determining the provability of \(P\) is equivalent to figuring out how these two machines behave:
| \(M_P^+\) Doesn’t Halt | \(M_P^+\) Halts | |
|---|---|---|
| \(M_P^-\) Doesn’t Halt | \(P\) is independent of ZFC | ZFC proves \(P\) |
| \(M_P^-\) Halts | ZFC proves \(\neg P\) | ZFC is contradictory |
As FLT and RH are known to be true, the \(90\)-state FLT machine and \(95\)-state RH machine run forever, as well as any other machine that would halt only on finding a counterexample. We would be able to resolve an enormous number of problems (but not all of them!) if we had an oracle for the halting problem; but in a sense, finding the \(n\)th Busy Beaver number gives us the next best thing: an oracle for the halting problem for all Turing machines with at most \(n\) states.
Define the following:
- Let \(M_P\) be the Turing machine that simulates \(M_P^+\) and \(M_P^-\) simultaneously. If \(M_P^+\) halts, print TRUE and exit; if \(M_P^-\) halts, print FALSE and exit.
- Let \(S := \text{BB}\left( \lvert Q_{M_P} \rvert \right)\) be the maximum number of steps the machine can run before halting, if it does halt.
Then we have two possibilities when running \(M_P\):
- \(M_P\) halts within \(S\) steps, and we learn the truth value of \(P\).
- \(M_P\) runs for more than \(S\) steps and thus never halts, and we learn that \(P\) is independent of ZFC.
If we were to discover, for example, that an existing unsolved conjecture could be encoded into a Turing machine with five or fewer states, then we could run it for \(\text{BB}(5)\) steps.
But obviously, if we know \(\text{BB}(5)\), then we must have already decided that the machine that encodes the conjecture either halts or runs forever.
In this way, the largest Busy Beaver number we know measures how much of ZFC we’ve “exhausted”: assuming ZFC is consistent, there exists a greatest number — call it \(N_{\mathrm{ZFC}}\) — for which ZFC can prove the value of \(\text{BB}(N_{\mathrm{ZFC}})\). We know \(5 \leq N_{\mathrm{ZFC}} < 187\), and this horizon is likely to substantially shrink; although they’re undeniably talented, the enthusiasts who calculated \(\text{BB}(5)\) and are regularly chipping away at the upper bound don’t have the benefit of research grants or anything like frontier-level compute, so there’s potentially even more within reach right now.
After we know \(\text{BB}(N_{\mathrm{ZFC}})\), we have essentially already resolved every problem that ZFC can prove is equivalent to some Turing machine with at most \(N_{\mathrm{ZFC}}\) states halting.
Problems like these push at the edges of mathematical knowledge. There are certainly statements that cannot be encoded as Turing machines. Perhaps we’ll move on from ZFC long before we ever find out what \(N_{\mathrm{ZFC}}\) is; perhaps mathematics or theoretical computer science will evolve in strange new ways, and eventually focus primarily on pushing the boundaries of decidability through attacking things like the Busy Beaver numbers.
A Canada goose confronting a beaver on its dam in Bridger-Teton National Forest. U.S. Forest Service, 2022, public domain, via Wikimedia Commons
