This site is supported by donations to The OEIS Foundation.

# Busy Beaver numbers

Jump to: navigation, search

This article needs more work.

Please help by expanding it!

In the following, we consider a halting (on a blank tape, i.e. all 0s) Turing machine ${\displaystyle \scriptstyle H\,\in \,H_{(n,2)}\,}$ with states ${\displaystyle \scriptstyle q\,}$ and ${\displaystyle \scriptstyle q+\,}$ elements of set ${\displaystyle \scriptstyle Q_{n}\,}$ of ${\displaystyle \scriptstyle n\,}$ distinct states (excluding the halting state,) tape symbols ${\displaystyle \scriptstyle s\,}$ and ${\displaystyle \scriptstyle s+\,}$ elements of set ${\displaystyle \scriptstyle S_{2}\,}$ = {0, 1}, shift direction ${\displaystyle \scriptstyle d+\,}$ element of ${\displaystyle \scriptstyle D_{2}\,}$ = {LEFT (-1,) RIGHT (+1)} (NONE (0) is not considered here,) ${\displaystyle \scriptstyle +\,}$ suffix meaning next and ${\displaystyle \scriptstyle q+\,=\,f(q,s),\,s+\,=\,g(q,s),\,d+\,=\,h(q,s),\,}$ represented by the 5-tuple ${\displaystyle \scriptstyle (q,\,s,\,q+,\,s+,\,d+)\,}$.

## Two definitions for busy beavers

Busy beavers are halting (on a blank tape, i.e. all 0s) Turing machines ${\displaystyle \scriptstyle H\,}$ which compete in either of two ways

• maximize the number of steps (or shifts since direction NONE is excluded,)
• maximize the number of tape marks (non-blank symbols 0 on the tape) once halting.

Define ${\displaystyle \scriptstyle s(H)\,}$ as the number of steps (or shifts since direction NONE is excluded) taken by a halting Turing machine ${\displaystyle \scriptstyle H\,}$ once halted, and by ${\displaystyle \scriptstyle \sigma (H)\,}$ the number of tape marks (non-blank symbols 0) left on the tape by ${\displaystyle \scriptstyle H\,}$ once halted.

Define ${\displaystyle \scriptstyle S(n,k)\,}$ as the number of steps taken by a halting Turing machine ${\displaystyle \scriptstyle H\,}$ with ${\displaystyle \scriptstyle n\,}$ states and ${\displaystyle \scriptstyle k\,}$ symbols which took the maximum number of steps

${\displaystyle S(n,k)=\max\{s(H):H{\rm {~is~a~halting^{*}~Turing~machine~with~}}n{\rm {~states~and~}}k{\rm {~symbols}}\}\,}$

* (on a blank tape, i.e. all 0s)

Define ${\displaystyle \scriptstyle \Sigma (n,k)\,}$ as the number of tape marks (non-blank symbols 0) left on the tape by a halting Turing machine ${\displaystyle \scriptstyle H\,}$ with ${\displaystyle \scriptstyle n\,}$ states and ${\displaystyle \scriptstyle k\,}$ symbols which leaves the most tape marks (non-blank symbols) on the tape once halted

${\displaystyle \Sigma (n,k)=\max\{\sigma (H):H{\rm {~is~a~halting^{*}~Turing~machine~with~}}n{\rm {~states~and~}}k{\rm {~symbols}}\}\,}$

* (on a blank tape, i.e. all 0s)

## Rado's sigma function

The busy beaver function, Rado's sigma function Sigma(n)[1], ${\displaystyle \scriptstyle \Sigma :\,n\,\to \,n\,}$, (A028444) is defined such that ${\displaystyle \scriptstyle \Sigma (n)\,\equiv \,\Sigma (n,2)\,}$ is the maximum attainable score (the maximum number of 1s finally on the tape) among all ${\displaystyle \scriptstyle n\,}$-state, 2-symbol halting Turing machines (TM) ${\displaystyle \scriptstyle H\,\in \,H_{(n,2)}\,}$ of the above-described type, when started on a blank tape (all 0s.)

Radó showed that ${\displaystyle \scriptstyle \Sigma \,}$ is a well-defined function; that is, for every ${\displaystyle \scriptstyle n\,}$, the ${\displaystyle \scriptstyle n\,}$-state, 2-symbol busy beaver game does indeed have a maximum attainable score. To do this, he used the basic principle that a nonempty finite set of nonnegative integers must have a largest element. Rado's sigma function grows faster than any computable function (i.e., for any computable function ${\displaystyle \scriptstyle f\,}$, there is an integer ${\displaystyle \scriptstyle N\,}$ such that, ${\displaystyle \scriptstyle \forall n\,>\,N\,}$, we have ${\displaystyle \scriptstyle \Sigma (n)\,\equiv \,\Sigma (n,2)\,>\,f(n)\,}$) and is therefore a noncomputable function.

There are finitely many (halting or not) Turing machines ${\displaystyle \scriptstyle T\,\in \,T_{(n,2)}\,}$ with ${\displaystyle \scriptstyle n\,}$ states and 2 symbols, specifically there are ${\displaystyle \scriptstyle [2k(n+1)]^{nk}|_{(k\,=\,2)}\,=\,[4(n+1)]^{2n}\,}$ (halting or not) Turing machines, if we don't consider the state after halting.) In addition it is trivial to see that some of these are halting machines; i.e., there exists at least one ${\displaystyle \scriptstyle n\,}$-state, 2-symbol halting Turing machine ${\displaystyle \scriptstyle H\,\in \,H_{(n,2)}\,}$, for every ${\displaystyle \scriptstyle n\,}$. Now define

• ${\displaystyle \scriptstyle H_{n}\,\equiv \,H_{(n,2)}\,}$ is the finite, nonempty set of halting ${\displaystyle \scriptstyle n\,}$-state 2-symbol Turing machines ${\displaystyle \scriptstyle H\,}$ of the type described above (two-way infinite tape, transition function defined by 5-tuples, etc.)
• ${\displaystyle \scriptstyle \sigma (H)\,}$, for each halting Turing machine ${\displaystyle \scriptstyle H\,\in \,H_{(n,2)}\,}$, is the score of machine ${\displaystyle \scriptstyle H\,}$ — the number of 1s finally on the tape after machine ${\displaystyle \scriptstyle H\,}$ is run to completion with an initially blank tape (all 0s.)
• ${\displaystyle \scriptstyle \Sigma (n)\,\equiv \,\Sigma (n,2)\,=\,\max\{\sigma (H)\,|\,H\,\in \,H_{(n,2)}\}\,}$ (i.e., the maximum score among all ${\displaystyle \scriptstyle n\,}$-state 2-symbol halting Turing machines ${\displaystyle \scriptstyle H\,}$ started with a blank tape.)

Since ${\displaystyle \scriptstyle \sigma (H)\,}$ is a nonnegative integer for any ${\displaystyle \scriptstyle H\,\in \,H_{(n,2)}\,}$, and since ${\displaystyle \scriptstyle H_{(n,2)}\,}$ is a nonempty finite set, ${\displaystyle \scriptstyle \Sigma (n)\,}$ is a well-defined nonnegative integer for every nonnegative integer ${\displaystyle \scriptstyle n\,}$.

This infinite sequence ${\displaystyle \scriptstyle \Sigma \,}$ is the busy beaver function, and any ${\displaystyle \scriptstyle n\,}$-state 2-symbol halting Turing machine ${\displaystyle \scriptstyle H\,\in \,H_{(n,2)}\,}$ for which ${\displaystyle \scriptstyle \sigma (H)\,=\,\Sigma (n)\,}$ (i.e., which attains the maximum score) is called a busy beaver. Note that for each ${\displaystyle \scriptstyle n\,}$, there exists at least two ${\displaystyle \scriptstyle n\,}$-state busy beavers (because, given any ${\displaystyle \scriptstyle n\,}$-state busy beaver, another is obtained by merely changing the shift direction in a halting transition.)

## Maximum shifts function

In addition to the ${\displaystyle \scriptstyle \Sigma \,}$ function, Radó [1962] introduced another extreme function for the BB-class Turing machines, the maximum shifts function, ${\displaystyle \scriptstyle S(n)\,}$, defined as

• ${\displaystyle \scriptstyle s(H)\,=\,\,}$ the number of shifts (thus steps, since direction NONE (0) is excluded) ${\displaystyle \scriptstyle H\,}$ makes before halting, for any ${\displaystyle \scriptstyle H\,\in \,H_{(n,2)}\,}$,
• ${\displaystyle \scriptstyle S(n)\,=\,\max\{s(H)\,|\,H\,\in \,H_{(n,2)}\}\,=\,\,}$ the largest number of shifts (thus steps, since direction NONE (0) is excluded) made by any halting ${\displaystyle \scriptstyle n\,}$-state 2-symbol halting Turing machine ${\displaystyle \scriptstyle H\,}$ (not necessarily the same Turing machine producing a maximum number of tape marks, i.e. 1s, and needs not even produce many tape marks.) (Cf. A060843)

Because these Turing machines are required to have a shift in each and every transition or "step" (including any transition to a Halt state), the max-shifts function is at the same time a max-steps function.

Radó showed that ${\displaystyle \scriptstyle S\,}$ is noncomputable for the same reason that ${\displaystyle \scriptstyle \Sigma \,}$ is noncomputable — it grows faster than any computable function. He proved this simply by noting that ${\displaystyle \scriptstyle \forall n,\,S(n)\,\geq \,\Sigma (n)\,}$, because a shift is required to write a 1 on the tape; consequently, ${\displaystyle \scriptstyle S\,}$ grows at least as fast as ${\displaystyle \scriptstyle \Sigma \,}$, which had already been proved to grow faster than any computable function.

The following connection between ${\displaystyle \scriptstyle \Sigma \,}$ and ${\displaystyle \scriptstyle S\,}$ was used by Lin & Radó [2] to prove that ${\displaystyle \scriptstyle \Sigma (3)\,=\,6\,}$. For a given ${\displaystyle \scriptstyle n\,}$, if ${\displaystyle \scriptstyle S(n)\,}$ is known then all ${\displaystyle \scriptstyle n\,}$-state Turing machines can (in principle) be run for up to ${\displaystyle \scriptstyle S(n)\,}$ steps, at which point any machine that hasn't yet halted will never halt. At that point, by observing which machines have halted with the most 1s on the tape (i.e., the busy beavers), one obtains from their tapes the value of ${\displaystyle \scriptstyle \Sigma (n)\,}$. The approach used by Lin & Radó for the case of ${\displaystyle \scriptstyle n\,=\,3\,}$ was to conjecture that ${\displaystyle \scriptstyle S(3)\,=\,21\,}$, then to simulate all the essentially different 3-state machines for up to 21 steps. By analyzing the behavior of the machines that had not halted within 21 steps, they succeeded in showing that none of those machines would ever halt, thus proving the conjecture that ${\displaystyle \scriptstyle S(3)\,=\,21\,}$, and determining that ${\displaystyle \scriptstyle \Sigma (3)\,=\,6\,}$ by the procedure just described.

Inequalities relating ${\displaystyle \scriptstyle \Sigma \,}$ and ${\displaystyle \scriptstyle S\,}$ include the following, [3]

${\displaystyle S(n,k)\geq \Sigma (n,k),\quad k\,\geq \,2,\,n\,\geq \,1,\,}$
${\displaystyle S(n,2)\leq (2n-1)~\Sigma (3n+3,2),\quad n\,\geq \,1,\,}$
${\displaystyle S(n,2)<\Sigma (3n+6,2),\quad n\,\geq \,1,\,}$

and an asymptotically improved bound[4]: there exists a constant ${\displaystyle \scriptstyle c\,}$, such that

${\displaystyle S(n,2)\leq \Sigma {\Bigg (}n+{\Bigg \lceil }{\frac {8n}{\log _{2}n}}{\Bigg \rceil }+c,2{\Bigg )},\quad n\,\geq \,2.\,}$

## Sequences

Busy Beaver sequence, or Rado's sigma function: maximum number of 1s that an ${\displaystyle \scriptstyle n\,}$-state, 2-symbol, ${\displaystyle \scriptstyle d+\,}$ in {LEFT, RIGHT}, 5-tuple (${\displaystyle \scriptstyle q,\,s,\,q+,\,s+,\,d+\,}$) halting Turing machine can print on an initially blank tape (all 0s) before halting. (Cf. A028444${\displaystyle \scriptstyle (n),\,n\,\geq \,0\,}$)

{0, 1, 4, 6, 13, ≥ 4098, ≥ 1.29*10865, ...}

Busy Beaver problem: ${\displaystyle \scriptstyle a(n)\,}$ is the maximal number of steps that an ${\displaystyle \scriptstyle n\,}$-state, 2-symbol, ${\displaystyle \scriptstyle d+\,}$ in {LEFT, RIGHT}, 5-tuple (${\displaystyle \scriptstyle q,\,s,\,q+,\,s+,\,d+\,}$) halting Turing machine can make on an initially blank tape (all 0s) before halting. (Cf. A060843${\displaystyle \scriptstyle (n),\,n\,\geq \,1\,}$)

{1, 6, 21, 107, ≥ 47176870, ≥ 3*101730, ...}

Number of ${\displaystyle \scriptstyle n\,}$-state, 2-symbol, ${\displaystyle \scriptstyle d+\,}$ in {LEFT, RIGHT}, 5-tuple (${\displaystyle \scriptstyle q,\,s,\,q+,\,s+,\,d+\,}$) (halting or not) Turing machines. (Cf. A052200)

{1, 64, 20736, 16777216, 25600000000, 63403380965376, 232218265089212416, 1180591620717411303424, 7958661109946400884391936, 68719476736000000000000000000, ...}

## Notes

1. Radó [1962].
2. Computer Studies of Turing Machine Problems, 1965.
3. Ben-Amram, et al., [1996].
4. Ben-Amram, Petersen [2002].