Jump to content

Busy beaver: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
m →‎Maximum shifts function S: {{math}} {{mset}}
→‎Exact values and lower bounds: Replace old table with new one with values of other busy beaver functions; change convention from sum(n) to num(n)
 
(51 intermediate revisions by 12 users not shown)
Line 4: Line 4:
{{technical|date=October 2016}}
{{technical|date=October 2016}}
{{Citation style|date=July 2024}}
{{Citation style|date=July 2024}}
}}[[File:Busy Beaver 5 State 2 Color.png|thumb|300px|The Space-time diagram<ref>{{Cite web |title=The Busy Beaver Challenge: Story # space-time-diagrams |url=https://bbchallenge.org/story#space-time-diagrams |access-date=2024-07-09 |website=bbchallenge.org |language=en}}</ref> shows the first 100,000 timesteps of the best 5-state busy beaver. Orange is "1", white is "0" (image compressed vertically).]]In [[theoretical computer science]], the '''busy beaver game''' aims at finding a terminating [[Computer program|program]] of a given size that (depending on definition) either produces the most output possible, or runs for the longest number of steps.<ref name=":2">{{Cite web |last=Weisstein |first=Eric W |title=Busy Beaver |url=https://mathworld.wolfram.com/BusyBeaver.html |access-date=21 November 2023 |website=Wolfram MathWorld}}</ref> Since an [[endless loop|endlessly looping]] program producing infinite output or running for infinite time is easily conceived, such programs are excluded from the game.<ref name=":2" /> Rather than traditional programming languages, the programs used in the game are n-state [[Turing machine|Turing machines]],<ref name=":2" /> one of the first mathematical models of computation.<ref name=":4">{{Cite web |last=Brubaker |first=Ben |date=2024-07-02 |title=Amateur Mathematicians Find Fifth ‘Busy Beaver’ Turing Machine |url=https://www.quantamagazine.org/amateur-mathematicians-find-fifth-busy-beaver-turing-machine-20240702/ |access-date=2024-07-03 |website=Quanta Magazine |language=en}}</ref>
}}
In [[theoretical computer science]], the '''busy beaver game''' aims at finding a terminating [[Computer program|program]] of a given size that produces the most output possible.<ref name=rado>{{cite journal | last = Radó | first = Tibor | author-link = Tibor Radó | url = https://computation4cognitivescientists.weebly.com/uploads/6/2/8/3/6283774/rado-on_non-computable_functions.pdf | title = On non-computable functions | journal = [[Bell System Technical Journal]] | volume = 41 | issue = 3 |date=May 1962 | pages = 877–884 | doi=10.1002/j.1538-7305.1962.tb00480.x}}</ref> Since an [[endless loop|endlessly looping]] program producing infinite output or running for infinite time is easily conceived, such programs are excluded from the game. This is sometimes also formulated as finding the machine that runs for the longest time, but both games are similarly difficult.<ref>{{Cite web |last=Weisstein |first=Eric W |title=Busy Beaver |url=https://mathworld.wolfram.com/BusyBeaver.html |access-date=21 November 2023 |website=Wolfram MathWorld}}</ref>


Turing machines consist of an infinite tape, and a finite set of states which serve as the program's "source code". Producing the most output is defined as writing the largest number of 1s on the tape, also referred to as achieving the highest score, and running for the longest time is defined as taking the longest number of steps to halt.<ref name="rado" /> The ''n-''state busy beaver game consists of finding the longest-running or highest-scoring Turing machine which has ''n'' states and eventually halts.<ref name=":2" /> Such machines are assumed to start on a blank tape, and the tape is assumed to contain only zeros and ones (a binary turing machine).<ref name=":2" /> A player should conceive of a set of transitions between states aiming for the highest score or longest running time while making sure the machine will halt eventually.
More precisely, the busy beaver game consists of designing a halting [[Turing machine]] with alphabet {0,1} which writes the most 1s on the tape, using only a given set of states. The rules for the 2-state game are as follows:


An '''''n''th busy beaver''', '''BB-''n''''' or simply "busy beaver" is a Turing machine that wins the ''n''-state busy beaver game.<ref name=":1">{{Cite web |last=Pavlus |first=John |date=10 December 2020 |title=How the Slowest Computer Programs Illuminate Math's Fundamental Limits |url=https://quantamagazine.org/the-busy-beaver-game-illuminates-the-fundamental-limits-of-math-20201210/ |access-date=2020-12-11 |website=Quanta Magazine |language=en}}</ref> Depending on definition, it either attains the highest score, or runs for the longest time, among all other possible ''n''-state competing Turing machines. The functions determining the highest score or longest running time of the ''n''-state busy beavers by each definition are '''Σ(n)''' and '''S(n)''' respectively.<ref name="rado">{{cite journal |last=Radó |first=Tibor |author-link=Tibor Radó |date=May 1962 |title=On non-computable functions |url=https://computation4cognitivescientists.weebly.com/uploads/6/2/8/3/6283774/rado-on_non-computable_functions.pdf |journal=[[Bell System Technical Journal]] |volume=41 |issue=3 |pages=877–884 |doi=10.1002/j.1538-7305.1962.tb00480.x}}</ref>
#the machine must have at most two states in addition to the halting state, and
#the tape initially contains 0s only.


Deciding the running time or score of the ''n''th Busy Beaver is [[incomputable]].<ref name="rado" /> In fact, both the functions Σ(n) and S(n) eventually become larger than any computable function.<ref name="rado" /> This has implications in [[computability theory]], the [[halting problem]], and [[Computational complexity theory|complexity theory]].<ref name=":62">{{Cite journal |last=Aaronson |first=Scott |date=2020-09-29 |title=The Busy Beaver Frontier |url=https://doi.org/10.1145/3427361.3427369 |journal=SIGACT News |volume=51 |issue=3 |pages=32–54 |doi=10.1145/3427361.3427369 |issn=0163-5700}} [https://scottaaronson.com/papers/bb.pdf PDF available] from author.</ref> The concept was first introduced by [[Tibor Radó]] in his 1962 paper, "On Non-Computable Functions".<ref name="rado" /> One of the most interesting aspects of the busy beaver game is that, if it were possible to compute the functions Σ(n) and S(n) for all ''n'', then this would resolve all mathematical conjectures which can be encoded as "does this Turing machine halt or not".<ref name=":1" /> For example, a 27-state Turing machine could check [[Goldbach's conjecture]] for each number and halt on a counterexample: if this machine had not halted after running for S(27) steps, then it must run forever, resolving the conjecture.<ref name=":1" /> Many other problems, including the [[Riemann hypothesis]] (744 states) and the consistency of [[Zermelo–Fraenkel set theory|ZF set theory]] (748 states), can be expressed in a similar form, where only an infinite ([[Countable set|countable]]) number of cases need to be checked.<ref name=":1" />
A player should conceive a transition table aiming for the longest output of 1s on the tape while making sure the machine will halt eventually.


==Technical definition==
An '''''n''th busy beaver''', '''BB-''n''''' or simply "busy beaver" is a Turing machine that wins the ''n''-state busy beaver game. That is, it attains the largest number of 1s among all other possible ''n''-state competing Turing machines. The [[#Examples|BB-2 Turing machine]], for instance, achieves four 1s in six steps.

Deciding the number of 1s, or the running time, of the nth Busy Beaver is [[incomputable]]. This has implications in [[computability theory]], the [[halting problem]], and [[Computational complexity theory|complexity theory]]. The concept was first introduced by [[Tibor Radó]] in his 1962 paper, "On Non-Computable Functions".<ref name=rado />

==The game==
The '''''n''-state busy beaver game''' (or '''BB-''n'' game'''), introduced in [[Tibor Radó]]'s 1962 paper, involves a class of [[Turing machine]]s, each member of which is required to meet the following design specifications:
The '''''n''-state busy beaver game''' (or '''BB-''n'' game'''), introduced in [[Tibor Radó]]'s 1962 paper, involves a class of [[Turing machine]]s, each member of which is required to meet the following design specifications:


*The machine has ''n'' "operational" states plus a Halt state, where ''n'' is a positive integer, and one of the ''n'' states is distinguished as the starting state. (Typically, the states are labelled by 1, 2, ..., ''n'', with state 1 as the starting state, or by ''A'', ''B'', ''C'', ..., with state ''A'' as the starting state.)
*The machine has ''n'' "operational" states plus a Halt state, where ''n'' is a positive integer, and one of the ''n'' states is distinguished as the starting state. (Typically, the states are labelled by 1, 2, ..., ''n'', with state 1 as the starting state, or by ''A'', ''B'', ''C'', ..., with state ''A'' as the starting state.)
*The machine uses a single two-way infinite (or unbounded) tape.
*The machine uses a single two-way infinite (or unbounded) tape.
*The tape alphabet is {0, 1}, with 0 serving as the blank symbol.
*The tape alphabet is {0, 1}, with 0 serving as the blank symbol.
*The machine's ''transition function'' takes two inputs:
*The machine's ''transition function'' takes two inputs:
:#the current non-Halt state,
:#the current non-Halt state,
:#the symbol in the current tape cell,
:#the symbol in the current tape cell,
:and produces three outputs:
:and produces three outputs:
Line 31: Line 25:
:#a direction to move (left or right; that is, shift to the tape cell one place to the left or right of the current cell), and
:#a direction to move (left or right; that is, shift to the tape cell one place to the left or right of the current cell), and
:#a state to transition into (which may be the Halt state).
:#a state to transition into (which may be the Halt state).
"Running" the machine consists of starting in the starting state, with the current tape cell being any cell of a blank (all-0) tape, and then iterating the transition function until the Halt state is entered (if ever). If, and only if, the machine eventually halts, then the number of 1s finally remaining on the tape is called the machine's ''score''. The ''n''-state busy beaver (BB-''n'') game is therefore a contest, depending on definition to find such an ''n''-state Turing machine having the largest possible score or running time.
There are thus (4''n'' + 4)<sup>2''n''</sup> ''n''-state Turing machines meeting this definition because the general form of the formula is (''symbols'' × ''directions'' × (''states'' + 1))<sup>(''symbols'' × ''states'')</sup>.

The transition function may be seen as a finite table of 5-tuples, each of the form
:(current state, current symbol, symbol to write, direction of shift, next state).

"Running" the machine consists of starting in the starting state, with the current tape cell being any cell of a blank (all-0) tape, and then iterating the transition function until the Halt state is entered (if ever). [[If, and only if]], the machine eventually halts, then the number of 1s finally remaining on the tape is called the machine's ''score''.

The ''n''-state busy beaver (BB-''n'') game is a contest to find such an ''n''-state Turing machine having the largest possible score — the largest number of 1s on its tape after halting. A machine that attains the largest possible score among all ''n''-state Turing machines is called an ''n''-state busy beaver, and a machine whose score is merely the highest so far attained (perhaps not the largest possible) is called a ''champion'' ''n''-state machine.

Given these rules, for any transition to the Halt state, writing a 1 always produces a higher score than writing a 0. Only one direction while transitioning to Halt need be considered, since the final position of the tape does not impact the score. Therefore, in practice, the number of ''n''-state Turing machines to consider can be reduced to (4''n'' + 1)<sup>2''n''</sup>. The search space can be further reduced by a factor of (''n'' - 1)! by noting that the final score is not changed by permuting all states except Start and Halt.

Radó required that each machine entered in the contest be accompanied by a statement of the exact number of steps it takes to reach the Halt state, thus allowing the score of each entry to be verified (in principle) by running the machine for the stated number of steps. (If entries were to consist only of machine descriptions, then the problem of verifying every potential entry is undecidable, because it is equivalent to the well-known [[halting problem]] — there would be no effective way to decide whether an arbitrary machine eventually halts.)


== Related functions ==
== Related functions ==


===The busy beaver function Σ===
=== function Σ===


The '''busy beaver function''' quantifies the maximum score attainable by a busy beaver on a given measure. This is a [[noncomputable function]]. Also, a busy beaver function can be shown to grow [[asymptotic analysis|asymptotically]] faster than any computable function.<ref>Chaitin (1987)</ref>
The function quantifies the maximum score attainable by a busy beaver on a given measure. This is a [[noncomputable function]]. function can be shown to grow [[asymptotic analysis|asymptotically]] faster than any computable function.<ref>Chaitin (1987)</ref>


The busy beaver function, <math>\Sigma: \mathbb{N} \to \mathbb{N}</math>, is defined so that Σ(''n'') is the maximum attainable score (the maximum number of 1s finally on the tape) among all halting 2-symbol ''n''-state Turing machines of the above-described type, when started on a blank tape.
The function, <math>\Sigma: \mathbb{N} \to \mathbb{N}</math>, is defined so that Σ(''n'') is the maximum attainable score (the maximum number of 1s finally on the tape) among all halting 2-symbol ''n''-state Turing machines of the above-described type, when started on a blank tape.


It is clear that Σ is a well-defined function: for every ''n'', there are at most finitely many ''n''-state Turing machines as above, [[up to]] isomorphism, hence at most finitely many possible running times.
It is clear that Σ is a well-defined function: for every ''n'', there are at most finitely many ''n''-state Turing machines as above, [[up to]] isomorphism, hence at most finitely many possible running times.


This infinite sequence '''Σ''' is the '''busy beaver function''', and any ''n''-state 2-symbol Turing machine ''M'' for which ''σ''(''M'') = Σ(''n'') (i.e., which attains the maximum score) is called a '''busy beaver'''. Note that for each ''n'', there exist at least 4(''n'' - 1)! ''n''-state busy beavers. (Given any ''n''-state busy beaver, another is obtained by merely changing the shift direction in a halting transition, a third by reversing ''all'' shift directions uniformly, and a fourth by reversing the halt direction of the all-swapped busy beaver. Furthermore, a permutation of all states except Start and Halt produces a machine that attains the same score. Theoretically, there could be more than one kind of transition leading to the halting state, but in practice it would be wasteful, because there's only one sequence of state transitions producing the sought-after result.)
This infinite sequence '''Σ''' is the function, and any ''n''-state 2-symbol Turing machine ''M'' for which ''σ''(''M'') = Σ(''n'') (i.e., which attains the maximum score) is called a busy beaver. Note that for each ''n'', there exist at least 4(''n'' 1)! ''n''-state busy beavers. (Given any ''n''-state busy beaver, another is obtained by merely changing the shift direction in a halting transition, a third by reversing ''all'' shift directions uniformly, and a fourth by reversing the halt direction of the all-swapped busy beaver. Furthermore, a permutation of all states except Start and Halt produces a machine that attains the same score. Theoretically, there could be more than one kind of transition leading to the halting state, but in practice it would be wasteful, because there's only one sequence of state transitions producing the sought-after result.)


====Non-computability====
====Non-computability====
Radó's 1962 paper proved that if <math>f: \mathbb{N} \to \mathbb{N}</math> is any [[computable function]], then Σ(''n'') > ''f''(''n'') for all sufficiently large ''n'', and hence that Σ is not a computable function.
Radó's 1962 paper proved that if <math>f: \mathbb{N} \to \mathbb{N}</math> is any [[computable function]], then Σ(''n'') > ''f''(''n'') for all sufficiently large ''n'', and hence that Σ is not a computable function.


Moreover, this implies that it is [[Undecidable problem|undecidable]] by a general [[algorithm]] whether an arbitrary Turing machine is a busy beaver. (Such an algorithm cannot exist, because its existence would allow Σ to be computed, which is a proven impossibility. In particular, such an algorithm could be used to construct another algorithm that would compute Σ as follows: for any given ''n'', each of the finitely many ''n''-state 2-symbol Turing machines would be tested until an ''n''-state busy beaver is found; this busy beaver machine would then be simulated to determine its score, which is by definition Σ(''n'').)
Moreover, this implies that it is [[Undecidable problem|undecidable]] by a general [[algorithm]] whether an arbitrary Turing machine is a busy beaver. (Such an algorithm cannot exist, because its existence would allow Σ to be computed, which is a proven impossibility. In particular, such an algorithm could be used to construct another algorithm that would compute Σ as follows: for any given ''n'', each of the finitely many ''n''-state 2-symbol Turing machines would be tested until an ''n''-state busy beaver is found; this busy beaver machine would then be simulated to determine its score, which is by definition Σ(''n'').)


Even though Σ(''n'') is an uncomputable function, there are some small ''n'' for which it is possible to obtain its values and prove that they are correct. It is not hard to show that Σ(0) = 0, Σ(1) = 1, Σ(2) = 4, and with progressively more difficulty it can be shown that Σ(3) = 6, Σ(4) = 13 and Σ(5) = 4098 {{OEIS|A028444}}. Σ(''n'') has not yet been determined for any instance of ''n'' > 5, although lower bounds have been established (see the [[#Known values for Σ and S|Known values]] section below).
Even though Σ(''n'') is an uncomputable function, there are some small ''n'' for which it is possible to obtain its values and prove that they are correct. It is not hard to show that Σ(0) = 0, Σ(1) = 1, Σ(2) = 4, and with progressively more difficulty it can be shown that Σ(3) = 6, Σ(4) = 13 and Σ(5) = 4098 {{OEIS|A028444}}. Σ(''n'') has not yet been determined for any instance of ''n'' > 5, although lower bounds have been established (see the [[#Known |Known values]] section below).

In 2016, Adam Yedidia and Scott Aaronson obtained the first (explicit) upper bound on the minimum ''n'' for which Σ(''n'') is unprovable in [[ZFC]]. To do so they constructed a 7910-state<ref>{{cite report | arxiv=1605.04343 | author=Adam Yedidia and Scott Aaronson | title=A Relatively Small Turing Machine Whose Behavior Is Independent of Set Theory | institution=MIT | type=Technical Report | date=May 2016 | bibcode=2016arXiv160504343Y }}</ref> Turing machine whose behavior cannot be proven based on the usual axioms of set theory ([[Zermelo–Fraenkel set theory]] with the [[axiom of choice]]), under reasonable consistency hypotheses ([[stationary Ramsey property]]).<ref>{{Cite web|url=https://newscientist.com/article/2087845-this-turing-machine-should-run-forever-unless-maths-is-wrong/|title=This Turing machine should run forever unless maths is wrong|last=Aron|first=Jacob|language=en-US|access-date=2016-09-25}}</ref><ref name=":0">Version from May 3rd contained 7918 states: {{cite news|url=https://scottaaronson.com/blog/?p=2725|title=The 8000th Busy Beaver number eludes ZF set theory|date=2016-05-03|work=Shtetl-Optimized blog|access-date=2016-09-25}}</ref> Stefan O'Rear then reduced it to 1919 states, with the dependency on the stationary Ramsey property eliminated,<ref name=Aaronson3>{{cite news|url=https://scottaaronson.com/blog/?p=2741|title=Three announcements|date=2016-05-03|work=Shtetl-Optimized blog|access-date=2018-04-27}}</ref><ref>{{Cite web | url=https://github.com/sorear/metamath-turing-machines/blob/master/sample_out/zf.tm | title=GitHub - sorear/metamath-turing-machines: Metamath proof enumerators and other things.| website=[[GitHub]]| date=2019-02-13}}</ref> and later to 748 states.<ref>{{Cite web|url=https://scottaaronson.com/papers/bb.pdf|title=The Busy Beaver Frontier}}</ref> In July 2023, Riebel reduced it to 745 states.<ref name="AaronsonJuly2023">{{Cite web | url=https://scottaaronson.blog/?p=7388 | title=Life, blogging, and the Busy Beaver function go on |date=2023-07-05|access-date=2023-08-27}}</ref><ref name="RiebelJuly2023">{{Cite web|url=https://www.ingo-blechschmidt.eu/assets/bachelor-thesis-undecidability-bb748.pdf|title=The Undecidability of BB(748)|access-date=2023-08-27}}</ref>


====Complexity and unprovability of Σ====
====Complexity and unprovability of Σ====
Line 70: Line 51:


===Maximum shifts function ''S''===
===Maximum shifts function ''S''===
In addition to the function Σ, Radó [1962] introduced another extreme function for Turing machines, the '''maximum shifts function''', ''S'', defined as follows:
In addition to the function Σ, Radó [1962] introduced another extreme function for Turing machines, the '''maximum shifts function''', ''S'', defined as follows:


* {{math|''s''(''M'')}} = the number of shifts ''M'' makes before halting, for any {{math|''M'' ∈ ''E''<sub>''n''</sub>}},
* {{math|''s''(''M'')}} = the number of shifts ''M'' makes before halting, for any {{math|''M'' ∈ ''E''<sub>''n''</sub>}},
* {{math|1=''S''(''n'') = max{{mset|''s''(''M'') | ''M'' ∈ ''E''<sub>''n''</sub>}}}} = the largest number of shifts made by any halting ''n''-state 2-symbol Turing machine.
* {{math|1=''S''(''n'') = max{{mset|''s''(''M'') | ''M'' ∈ ''E''<sub>''n''</sub>}}}} = the largest number of shifts made by any halting ''n''-state 2-symbol Turing machine.


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.
Because 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 ''S'' is noncomputable for the same reason that Σ is noncomputable — it grows faster than any computable function. He proved this simply by noting that for each ''n'', ''S''(''n'') ≥ Σ(''n''). Each shift may write a 0 or a 1 on the tape, while Σ counts a subset of the shifts that wrote a 1, namely the ones that hadn't been overwritten by the time the Turing machine halted; consequently, ''S'' grows at least as fast as Σ, which had already been proved to grow faster than any computable function.
Radó showed that ''S'' is noncomputable for the same reason that Σ is noncomputable — it grows faster than any computable function. He proved this simply by noting that for each ''n'', ''S''(''n'') ≥ Σ(''n''). Each shift may write a 0 or a 1 on the tape, while Σ counts a subset of the shifts that wrote a 1, namely the ones that hadn't been overwritten by the time the Turing machine halted; consequently, ''S'' grows at least as fast as Σ, which had already been proved to grow faster than any computable function.


The following connection between Σ and ''S'' was used by Lin & Radó [''Computer Studies of Turing Machine Problems'', 1965] to prove that Σ(3) = 6: For a given ''n'', if ''S''(''n'') is known then all ''n''-state Turing machines can (in principle) be run for up to ''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 Σ(''n''). The approach used by Lin & Radó for the case of ''n'' = 3 was to conjecture that ''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 ''S''(3) = 21, and determining that Σ(3) = 6 by the procedure just described.
The following connection between Σ and ''S'' was used by Lin & Radó [''Computer Studies of Turing Machine Problems'', 1965] to prove that Σ(3) = 6: For a given ''n'', if ''S''(''n'') is known then all ''n''-state Turing machines can (in principle) be run for up to ''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 Σ(''n''). The approach used by Lin & Radó for the case of ''n'' = 3 was to conjecture that ''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 ''S''(3) = 21, and determining that Σ(3) = 6 by the procedure just described.


In 2016, Adam Yedidia and Scott Aaronson obtained the first (explicit) upper bound on the minimum ''n'' for which S(''n'') is unprovable in [[ZFC]]. To do so they constructed a 7910-state<ref>{{cite report |title=A Relatively Small Turing Machine Whose Behavior Is Independent of Set Theory |author=Adam Yedidia and Scott Aaronson |date=May 2016 |arxiv=1605.04343 |bibcode=2016arXiv160504343Y |institution=MIT |type=Technical Report}}</ref> Turing machine whose behavior cannot be proven based on the usual axioms of set theory ([[Zermelo–Fraenkel set theory]] with the [[axiom of choice]]), under reasonable consistency hypotheses ([[Ramsey cardinal|stationary Ramsey property]]).<ref>{{Cite web |last=Aron |first=Jacob |title=This Turing machine should run forever unless maths is wrong |url=https://newscientist.com/article/2087845-this-turing-machine-should-run-forever-unless-maths-is-wrong/ |access-date=2016-09-25 |website=NewScientist |language=en-US}}</ref><ref name=":0">Version from May 3rd contained 7918 states: {{cite news |date=2016-05-03 |title=The 8000th Busy Beaver number eludes ZF set theory |url=https://scottaaronson.com/blog/?p=2725 |access-date=2016-09-25 |work=Shtetl-Optimized blog}}</ref> Stefan O'Rear then reduced it to 1919 states, with the dependency on the stationary Ramsey property eliminated,<ref name="Aaronson3">{{cite news |date=2016-05-03 |title=Three announcements |url=https://scottaaronson.com/blog/?p=2741 |access-date=2018-04-27 |work=Shtetl-Optimized blog}}</ref><ref>{{Cite web |date=2019-02-13 |title=GitHub - sorear/metamath-turing-machines: Metamath proof enumerators and other things. |url=https://github.com/sorear/metamath-turing-machines/blob/master/sample_out/zf.tm |website=[[GitHub]]}}</ref> and later to 748 states.<ref name=":62" /> In July 2023, Riebel reduced it to 745 states.<ref name="AaronsonJuly2023">{{Cite web |date=2023-07-05 |title=Life, blogging, and the Busy Beaver function go on |url=https://scottaaronson.blog/?p=7388 |access-date=2023-08-27}}</ref><ref name="RiebelJuly2023">{{Cite web |title=The Undecidability of BB(748) |url=https://www.ingo-blechschmidt.eu/assets/bachelor-thesis-undecidability-bb748.pdf |access-date=2023-08-27}}</ref>
Inequalities relating Σ and ''S'' include the following (from [Ben-Amram, et al., 1996]), which are valid for all {{math|''n'' ≥ 1}}:

:<math>\begin{align}S(n) &\ge \Sigma(n) \\ S(n) &\le (2n-1)\Sigma(3n+3) \\ S(n) &< \Sigma(3n+6) ; \end{align}</math>

and an [[asymptotic analysis|asymptotically]] improved bound (from [Ben-Amram, Petersen, 2002]): there exists a constant ''c'', such that for all {{math|''n'' ≥ 2}},

:<math>S(n) \le \Sigma\left(n + \left\lceil \frac{8n}{\log_2 n} \right\rceil + c\right). </math>

{{tmath|S (n)}} tends to be close to the square of {{tmath|\Sigma (n)}}, and in fact many machines give {{tmath|S (n)}} less than {{tmath|\Sigma^2 (n)}}.

===Known values for Σ and ''S''===
The 5-state busy beaver produces {{val|4098}} 1s, using '''{{val|47176870}}''' steps. It was discovered by Heiner Marxen and Jürgen Buntrock in 1989, but only proved to be the winning fifth busy beaver — stylized as '''BB(5)''' — in 2024 using a proof in [[Coq (software)|Coq]].<ref>{{Cite web |date=2024-07-02 |title=[July 2nd 2024] We have proved "BB(5) = 47,176,870" |url=https://discuss.bbchallenge.org/t/july-2nd-2024-we-have-proved-bb-5-47-176-870/237 |access-date=2024-07-02 |website=The Busy Beaver Challenge |language=en}}</ref><ref>{{Cite web |title=The Busy Beaver Challenge |url=https://bbchallenge.org/ |access-date=2024-07-02 |website=bbchallenge.org |language=en}}</ref>

At the moment the record 6-state champion produces over 10⇈15<ref name=ligocki_bb6/> (found by Pavel Kropitz in 2022). As noted above, these are 2-symbol Turing machines.

Milton Green, in his 1964 paper "A Lower Bound on Rado's Sigma Function for Binary Turing Machines", constructed a set of Turing machines demonstrating that

:<math>\Sigma(2k) > 3 \uparrow^{k-2} 3 > A(k-2,k-2) \qquad \text{for } k \ge 2,</math>

where ↑ is [[Knuth up-arrow notation]] and ''A'' is [[Ackermann's function]].

Thus
:<math>\Sigma(10) > 3 \uparrow\uparrow\uparrow 3 = 3 \uparrow\uparrow 3^{3^3} = 3^{3^{3^{.^{.^{.^3}}}}}</math>

(with {{math|1=3<sup>3<sup>3</sup></sup> = {{val|7625597484987}}}} terms in the exponential tower), and

:<math>\Sigma(12) > 3 \uparrow\uparrow\uparrow\uparrow 3 = g_1, </math>

where [[Graham's number#Magnitude|the number ''g''<sub>1</sub>]] is the enormous starting value in the sequence that defines [[Graham's number]].

In 1964 Milton Green developed a lower bound for the Busy Beaver function that was published in the proceedings of the 1964 IEEE symposium on switching circuit theory and logical design. Heiner Marxen and Jürgen Buntrock described it as "a non-trivial (not primitive recursive) lower bound". This lower bound can be calculated but is too complex to state as a single expression in terms of ''n''. When ''n''=8 the method gives
: {{math|Σ(8) ≥ 3 × (7 × 3<sup>92</sup> - 1) / 2 ≈ 8.248×10<sup>44</sup>}}.

It can be derived from current lower bounds that:
: <math>\Sigma(2k+1) > 3 \uparrow^{k-2} 31 > A(k-2,k-2) \qquad \text{for } k \ge 2,</math>

In contrast, the best current (as of 2023) lower bound on Σ(6) is 10⇈15, which is greater than the lower bound given by Green's formula, 3<sup>3</sup> = 27 (which is tiny in comparison). In fact, it is much greater than the lower bound: {{math|1=3⇈3 = 3<sup>3<sup>3</sup></sup> = {{val|7625597484987}}}}, which is Green's first lower bound for Σ(8), and also much greater than the second lower bound: 3×(7×3<sup>92</sup>−1)/2.


===Proof for uncomputability of ''S''(''n'') and Σ(''n'')===
===Proof for uncomputability of ''S''(''n'') and Σ(''n'')===
{{Unreferenced|section|date=July 2024}}

Suppose that ''S''(''n'') is a computable function and let ''EvalS'' denote a TM, evaluating ''S''(''n''). Given a tape with ''n'' 1s it will produce ''S''(''n'') 1s on the tape and then halt. Let ''Clean'' denote a Turing machine cleaning the sequence of 1s initially written on the tape. Let ''Double'' denote a Turing machine evaluating function ''n'' + ''n''. Given a tape with ''n'' 1s it will produce 2''n'' 1s on the tape and then halt.
Suppose that ''S''(''n'') is a computable function and let ''EvalS'' denote a TM, evaluating ''S''(''n''). Given a tape with ''n'' 1s it will produce ''S''(''n'') 1s on the tape and then halt. Let ''Clean'' denote a Turing machine cleaning the sequence of 1s initially written on the tape. Let ''Double'' denote a Turing machine evaluating function ''n'' + ''n''. Given a tape with ''n'' 1s it will produce 2''n'' 1s on the tape and then halt.
Let us create the composition ''Double'' | ''EvalS'' | ''Clean'' and let ''n''<sub>0</sub> be the number of states of this machine. Let ''Create_n<sub>0</sub>'' denote a Turing machine creating ''n''<sub>0</sub> 1s on an initially blank tape. This machine may be constructed in a trivial manner to have ''n''<sub>0</sub> states (the state ''i'' writes 1, moves the head right and switches to state ''i'' + 1, except the state ''n''<sub>0</sub>, which halts). Let ''N'' denote the sum ''n''<sub>0</sub> + ''n''<sub>0</sub>.
Let us create the composition ''Double'' | ''EvalS'' | ''Clean'' and let ''n''<sub>0</sub> be the number of states of this machine. Let ''Create_n<sub>0</sub>'' denote a Turing machine creating ''n''<sub>0</sub> 1s on an initially blank tape. This machine may be constructed in a trivial manner to have ''n''<sub>0</sub> states (the state ''i'' writes 1, moves the head right and switches to state ''i'' + 1, except the state ''n''<sub>0</sub>, which halts). Let ''N'' denote the sum ''n''<sub>0</sub> + ''n''<sub>0</sub>.
Line 130: Line 75:
The uncomputability of ''S''(''n'') can also be established by reference to the blank tape halting problem. The blank tape halting problem is the problem of deciding for any Turing machine whether or not it will halt when started on an empty tape. The blank tape halting problem is equivalent to the standard [[halting problem]] and so it is also uncomputable. If ''S''(''n'') was computable, then we could solve the blank tape halting problem simply by running any given Turing machine with ''n'' states for ''S''(''n'') steps; if it has still not halted, it never will. So, since the blank tape halting problem is not computable, it follows that ''S''(''n'') must likewise be uncomputable.
The uncomputability of ''S''(''n'') can also be established by reference to the blank tape halting problem. The blank tape halting problem is the problem of deciding for any Turing machine whether or not it will halt when started on an empty tape. The blank tape halting problem is equivalent to the standard [[halting problem]] and so it is also uncomputable. If ''S''(''n'') was computable, then we could solve the blank tape halting problem simply by running any given Turing machine with ''n'' states for ''S''(''n'') steps; if it has still not halted, it never will. So, since the blank tape halting problem is not computable, it follows that ''S''(''n'') must likewise be uncomputable.


===Generalizations===
======
A number of other uncomputable functions can be defined based on measuring the performance of Turing machines in other ways than time or maximal number of ones.<ref name=":6" /> For example:<ref name=":6" />
For any [[model of computation]] there exist simple analogs of the busy beaver. For example, the generalization to Turing machines with ''n'' states and ''m'' symbols defines the following '''generalized busy beaver functions''':


* The function <math>\text{num}(n)</math> is defined to be the maximum number of ''contiguous'' ones a halting Turing machine can write on a blank tape. In other words, this is the largest [[Unary Number System|unary number]] a Turing machine of ''n'' states can write on a tape.
# Σ(''n'', ''m''): the largest number of non-zeros printable by an ''n''-state, ''m''-symbol machine started on an initially blank tape before halting, and
* The function <math>\text{space}(n)</math> is defined to be the maximal number of tape squares a halting Turing machine can ''read'' (i.e., visit) before halting. This includes the starting square, but not a square that the machine only reaches after the halt transition (if the halt transition is annotated with a move direction), because that square does not influence the machine's behaviour. This is the maximal [[space complexity]] of an ''n''-state Turing machine.
# ''S''(''n'', ''m''): the largest number of steps taken by an ''n''-state, ''m''-symbol machine started on an initially blank tape before halting.


Both of these functions are also uncomputable.<ref name=":6" /> This can be shown for <math>\text{space}(n)</math> by noting that every tape square a Turing machine writes a one to, it must also visit: in other words, <math>\Sigma(n) \leq \text{space}(n)</math>.<ref name=":6" /> The <math>\text{num}(n)</math> function can be shown to be incomputable by proving, for example, that <math>\text{space}(n) < \text{num}(3n + 3)</math>: this can be done by designing an ''(3n+3)''-state Turing machine which simulates the ''n''-state space champion, and then uses it to write at least <math>\text{space}(n)</math> contiguous ones to the tape.<ref name=":6" /> These functions stand in the relation:<ref name=":6" />
For example, the longest-running 3-state 3-symbol machine found so far runs {{val|119112334170342540}} steps before halting<!--[https://cse.unr.edu/~al/BusyBeaver.html]-->.<ref name="michel_comp" /> The longest running 6-state, 2-symbol machine which has the additional property of reversing the tape value at each step produces {{val|6147}} 1s after {{val|47339970}} steps.{{Citation needed|date=February 2022}} So for the Reversal Turing Machine (RTM) class,<ref>{{Cite web|title=Reversal Turing machine|url=https://skelet.ludost.net/bb/RTM.htm|access-date=2022-02-10|website=skelet.ludost.net}}</ref> ''S''<sub>RTM</sub>(6) ≥ {{val|47339970}} and Σ<sub>RTM</sub>(6) ≥ {{val|6147}}.


* <math>\text{num}(n) \leq \Sigma(n) \leq \text{space}(n) \leq S(n)</math>
It is possible to further generalize the busy beaver function by extending to more than one dimension.


===Generalizations===
Likewise we could define an analog to the Σ function for [[register machine]]s as the largest number which can be present in any register on halting, for a given number of instructions.
Analogs of the shift function can be simply defined in any programming language, given that the programs can be described by bit-strings, and a program's number of steps can be counted.<ref name=":5">{{Cite web |last=Aaronson |first=Scott |date=2024-07-02 |title=BusyBeaver(5) is now known to be 47,176,870 |url=https://scottaaronson.blog/?p=8088 |access-date=2024-07-04 |website=Shtetl-Optimized |language=en-US}}</ref> For example, the busy beaver game can also be generalized to two dimensions using turing machines on two-dimensional tapes, or to turing machines that are allowed to stay in the same place as well as move to the left and right.<ref name=":5" /> Alternatively a "busy beaver function" for diverse models of computation can be defined with [[Kolmogorov complexity|Kolgomorov complexity]].<ref name=":5" /> This is done by taking <math>{BB}(n)</math> to be the largest integer <math>m</math> such that <math>K_L(m) \le n</math>, where <math>K_L(m)</math> is the length of the shortest program in <math>L</math> that outputs <math>m</math>: <math>{BB}(n)</math> is thereby the largest integer a program with length <math>n</math> or less can output in <math>L</math>.<ref name=":5" />


The longest running 6-state, 2-symbol machine which has the additional property of reversing the tape value at each step produces {{val|6147}} 1s after {{val|47339970}} steps.{{Citation needed|date=February 2022}} So for the Reversal Turing Machine (RTM) class,<ref>{{Cite web |title=Reversal Turing machine |url=https://skelet.ludost.net/bb/RTM.htm |access-date=2022-02-10 |website=skelet.ludost.net}}</ref> ''S''<sub>RTM</sub>(6) ≥ {{val|47339970}} and Σ<sub>RTM</sub>(6) ≥ {{val|6147}}. Likewise we could define an analog to the Σ function for [[register machine]]s as the largest number which can be present in any register on halting, for a given number of instructions.{{Citation needed|date=June 2024}}
===Exact values and lower bounds===
The following table lists the exact values and some known lower bounds for ''S''(''n'', ''m'') and Σ(''n'', ''m'') for the generalized busy beaver problems. Note: entries listed as "?" are bounded from below by the maximum of all entries to left and above. These machines either haven't been investigated or were subsequently surpassed by a smaller machine.


==== Different numbers of symbols ====
:{| class="wikitable"
A simple generalization is the extension to Turing machines with ''m'' symbols instead of just 2 (0 and 1).<ref name=":5" /> For example a trinary Turing machine with ''m'' = 3 symbols would have the symbols 0, 1, and 2. The generalization to Turing machines with ''n'' states and ''m'' symbols defines the following '''generalized busy beaver functions''':
| {{rh2|align=center}} colspan="7" | Values of S(''n'', ''m'')
# Σ(''n'', ''m''): the largest number of non-zeros printable by an ''n''-state, ''m''-symbol machine started on an initially blank tape before halting,{{Citation needed|date=June 2024}} and
|-
# ''S''(''n'', ''m''): the largest number of steps taken by an ''n''-state, ''m''-symbol machine started on an initially blank tape before halting.<ref name=":5" />
! {{diagonal split header|''m''|''n''}}
! width="120px" | 2-state
! width="120px" | 3-state
! width="120px" | 4-state
! width="120px" | 5-state
! width="120px" | 6-state
|-
! 2-symbol
| align="right" | 6
| align="right" | 21
| align="right" | 107
| align="right" | {{val|47176870}}
| align="right" | > 10⇈15
|-
! 3-symbol
| align="right" | 38
| align="right" | {{nowrap|≥ {{val|119112334170342540}}}}
| align="right" | > {{val|1.0|e=14072}}
| {{dunno}}
| {{dunno}}
|-
! 4-symbol
| align="right" | {{val|3932964}}
| align="right" | > (2↑<sup>15</sup>5)+14
| {{dunno}}
| {{dunno}}
| {{dunno}}
|-
! 5-symbol
| align="right" | > {{val|1.9|e=704}}
| {{dunno}}
| {{dunno}}
| {{dunno}}
| {{dunno}}
|-
! 6-symbol
| align="right" | > 10⇈10⇈10{{sup|10{{sup|115}}}}
| {{dunno}}
| {{dunno}}
| {{dunno}}
| {{dunno}}
|-
| {{rh2|align=center}} colspan="7" | Values of Σ(''n'', ''m'')
|-
! {{diagonal split header|''m''|''n''}}
! width="120px" | 2-state
! width="120px" | 3-state
! width="120px" | 4-state
! width="120px" | 5-state
! width="120px" | 6-state
|-
! 2-symbol
| align="right" | 4
| align="right" | 6
| align="right" | 13
| align="right" | {{val|4098}}
| align="right" | > 10⇈15
|-
! 3-symbol
| align="right" | 9
| align="right" | ≥ {{val|374676383}}
| align="right" | > {{val|1.3|e=7036}}
| {{dunno}}
| {{dunno}}
|-
! 4-symbol
| align="right" | {{val|2050}}
| align="right" | ≥ (2↑<sup>15</sup>5)+14<ref>{{cite web |last1=Ligocki |first1=Shawn |title=BB(3, 4) > Ack(14) |url=https://www.sligocki.com//2024/05/22/bb-3-4-a14.html |website=sligocki |language=en |date=22 May 2024}}</ref>
| {{dunno}}
| {{dunno}}
| {{dunno}}
|-
! 5-symbol
| align="right" | > {{val|1.7|e=352}}
| {{dunno}}
| {{dunno}}
| {{dunno}}
| {{dunno}}
|-
! 6-symbol
| align="right" | > 10⇈10⇈10{{sup|10{{sup|115}}}}
| {{dunno}}
| {{dunno}}
| {{dunno}}
| {{dunno}}
|}


For example, the longest-running 3-state 3-symbol machine found so far runs {{val|119112334170342540}} steps before halting<!--[https://cse.unr.edu/~al/BusyBeaver.html]-->.<ref name="michel_comp" />{{Better source needed|reason=The current source is insufficiently reliable ([[WP:NOTRS]]).|date=July 2024}}
===Nondeterministic Turing machines===


==== Nondeterministic Turing machines ====
{| class="wikitable" align=right
{| class="wikitable" align="right"
|+ Maximal Halting Times and States from ''p''-case, 2-state, 2-color NDTM<ref name=NDTM/>
|+ Maximal Halting Times and States from ''p''-case, 2-state, 2-color NDTM<ref name="NDTM">{{cite web |last1=Wolfram |first1=Stephen |author-link=Stephen Wolfram |date=4 February 2021 |title=Multiway Turing Machines |url=https://wolframphysics.org/bulletins/2021/02/multiway-turing-machines/ |website=www.wolframphysics.org |language=en}}</ref>
! p
! p
! steps
! steps
Line 265: Line 126:
|}
|}


The problem can be extended to [[Nondeterministic Turing machine]]s by looking for the system with the most states across all branches or the branch with the longest number of steps.<ref name=NDTM>{{cite web |last1=Wolfram |first1=Stephen |author-link=Stephen Wolfram |title=Multiway Turing Machines |url=https://wolframphysics.org/bulletins/2021/02/multiway-turing-machines/ |website=www.wolframphysics.org |date=4 February 2021 |language=en}}</ref> The question of whether a given NDTM will halt is still computationally irreducible, and the computation required to find an NDTM busy beaver is significantly greater than the deterministic case, since there are multiple branches that need to be considered. For a 2-state, 2-color system with ''p'' cases or rules, the table to the right gives the maximum number of steps before halting and maximum number of unique states created by the NDTM.
The problem can be extended to [[ Turing machine]]s by looking for the system with the most states across all branches or the branch with the longest number of steps.<ref name=NDTM /> The question of whether a given NDTM will halt is still computationally irreducible, and the computation required to find an NDTM busy beaver is significantly greater than the deterministic case, since there are multiple branches that need to be considered. For a 2-state, 2-color system with ''p'' cases or rules, the table to the right gives the maximum number of steps before halting and maximum number of unique states created by the NDTM.


==Applications==
==Applications==
In addition to posing a rather challenging [[mathematical game]], the busy beaver functions offer an entirely new approach to solving pure mathematics problems. Many [[open problem in mathematics|open problems in mathematics]] could in theory, but not in practice, be solved in a systematic way given the value of ''S''(''n'') for a sufficiently large ''n''.<ref>Chaitin 1987</ref>
In addition to posing a rather challenging [[mathematical game]], the busy beaver functions offer an entirely new approach to solving pure mathematics problems. Many [[open problem in mathematics|open problems in mathematics]] could in theory, but not in practice, be solved in a systematic way given the value of ''S''(''n'') for a sufficiently large ''n''.<ref>Chaitin 1987</ref>


Consider any [[conjecture]] that could be [[mathematical proof|disproven]] via a [[counterexample]] among a [[countable]] number of cases (e.g. [[Goldbach's conjecture]]). Write a computer program that sequentially tests this conjecture for increasing values. In the case of Goldbach's conjecture, we would consider every even number ≥ 4 sequentially and test whether or not it is the sum of two prime numbers. Suppose this program is simulated on an ''n''-state Turing machine. If it finds a counterexample (an even number ≥ 4 that is not the sum of two primes in our example), it halts and indicates that. However, if the conjecture is true, then our program will never halt. (This program halts ''only'' if it finds a counterexample.)
Consider any [[conjecture]] that could be [[mathematical proof|disproven]] via a [[counterexample]] among a [[countable]] number of cases (e.g. [[Goldbach's conjecture]]). Write a computer program that sequentially tests this conjecture for increasing values. In the case of Goldbach's conjecture, we would consider every even number ≥ 4 sequentially and test whether or not it is the sum of two prime numbers. Suppose this program is simulated on an ''n''-state Turing machine. If it finds a counterexample (an even number ≥ 4 that is not the sum of two primes in our example), it halts and indicates that. However, if the conjecture is true, then our program will never halt. (This program halts ''only'' if it finds a counterexample.)


Now, this program is simulated by an ''n''-state Turing machine, so if we know ''S''(''n'') we can decide (in a finite amount of time) whether or not it will ever halt by simply running the machine that many steps. And if, after ''S''(''n'') steps, the machine does not halt, we know that it never will and thus that there are no counterexamples to the given conjecture (i.e., no even numbers that are not the sum of two primes). This would prove the conjecture to be true.
Now, this program is simulated by an ''n''-state Turing machine, so if we know ''S''(''n'') we can decide (in a finite amount of time) whether or not it will ever halt by simply running the machine that many steps. And if, after ''S''(''n'') steps, the machine does not halt, we know that it never will and thus that there are no counterexamples to the given conjecture (i.e., no even numbers that are not the sum of two primes). This would prove the conjecture to be true.


Thus specific values (or upper bounds) for ''S''(''n'') could be used to systematically solve many open problems in mathematics (in theory). However, current results on the busy beaver problem suggest that this will not be practical for two reasons:
However, current results on the busy beaver problem suggest that this will not be practical for two reasons:
* It is extremely hard to prove values for the busy beaver function (and the max shift function). It has only been proven for extremely small machines with fewer than six states, while one would presumably need at least 20-50 states {{citation needed|date=May 2022}} to make a useful machine. Furthermore, every known exact value of ''S''(''n'') was proven by enumerating every ''n''-state Turing machine and proving whether or not each halts. One would have to calculate ''S''(''n'') by some less direct method for it to actually be useful.
* It is extremely hard to prove values for the busy beaver function (and the max shift function). known exact value of ''S''(''n'') was proven by enumerating every ''n''-state Turing machine and proving whether or not each halts. One would have to calculate ''S''(''n'') by some less direct method for it to actually be useful.
* The values of S(n) and the other busy beaver functions get very large, very quickly. While the value of S(5) is only around 47 million, the value of S(6) is more than 10⇈15, which is equal to <math>10^{(10^{(10^{(10^{(\ldots)})})})}</math> with a stack of 15 tens.<ref name=":5" />{{Better citation needed|reason=The current source is insufficiently reliable ([[WP:NOTRS]]).|date=July 2024}} This number has 10⇈14 digits and is unreasonable to use in a computation. The value of S(27), which is the number of steps the current program for the [[Goldbach's conjecture|Goldbach conjecture]] would need to be run to give a conclusive answer, is incomprehensibly huge, and not remotely possible to write down, much less run a machine for, in the observable universe.<ref name=":1" />
* But even if one did find a better way to calculate ''S''(''n''), the values of the busy beaver function (and max shift function) get very large, very fast. {{math|''S''(6) > 10<sup>{{val|fmt=commas|36534}}</sup>}} already requires special pattern-based acceleration to be able to simulate to completion. Likewise, we know that {{tmath|S(10) > \Sigma(10) > 3 \uparrow\uparrow\uparrow 3}} is a gigantic number and {{math|''S''(17) > Σ(17) > ''G'' > ''g''<sub>1</sub>}}, where G is [[Graham's number#Magnitude|Graham's number]] - an enormous number. Thus, even if we knew, say, ''S''(30), it is completely unreasonable to run any machine that number of steps. There is not enough computational capacity in the known part of the universe to have performed even ''S''(6) operations directly.<ref>Lloyd 2001. [https://arxiv.org/abs/quant-ph/0110141 Computational Capacity of the Universe].</ref>
Another property of S(n) is that no arithmetically sound, computably axiomatized [[Axiomatic system|theory]] can prove all of the function's values. Specifically, given a computable and arithmetically sound theory <math>T</math>, there is a number <math>n_T</math> such that for all <math>n \geq n_T</math>, no statement of the form <math>S(n) = k</math> can be proved in <math>T</math>.<ref name=":62" /> This implies that for each theory there is a specific largest value of S(n) that it can prove. This is true because for every such <math>T</math>, a Turing machine with <math>n_T</math> can be designed to enumerate every possible proof in <math>T</math>.<ref name=":62" /> If the theory is inconsistent, then all false statements are provable, and the Turing machine can be given the condition to halt if and only if it finds a proof of, for example, <math>0 = 1</math>.<ref name=":62" /> Any theory that proves the value of <math>S(n_T)</math> proves its own consistency, violating [[Gödel's incompleteness theorems|Godel's second incompleteness theorem]].<ref name=":62" /> This can be used to place various theories on a scale, for example the various [[Large cardinal axiom|large cardinal axioms]] in [[ZFC]]: if each theory <math>T</math> is assigned as its number <math>n_T</math>, theories with larger values of <math>n_T</math> prove the consistency of those below them, placing all such theories on a countably infinite scale.<ref name=":62" />


===Notable instances===
===Notable instances===


* A 745-state binary Turing machine has been constructed that halts [[if and only if]] [[ZFC]] is inconsistent.<ref name="AaronsonJuly2023" /><ref name="RiebelJuly2023" />
A 745-state binary Turing machine has been constructed that halts [[if and only if]] [[ZFC]] is inconsistent.<ref name="AaronsonJuly2023"/><ref name="RiebelJuly2023"/> A 744-state Turing machine has been constructed that halts if, and only if, the [[Riemann hypothesis]] is false.<ref name=Aaronson3/><ref name=":1">{{Cite web|last=Pavlus|first=John|title=How the Slowest Computer Programs Illuminate Math's Fundamental Limits|url=https://quantamagazine.org/the-busy-beaver-game-illuminates-the-fundamental-limits-of-math-20201210/|access-date=2020-12-11|website=Quanta Magazine|date=10 December 2020|language=en}}</ref> A 43-state Turing machine has been constructed that halts if, and only if, [[Goldbach's conjecture]] is false, and a 27-state machine for that conjecture has been proposed but not yet verified.<ref name=Aaronson3/><ref name=":1" />


* A 744-state Turing machine has been constructed that halts if, and only if, the [[Riemann hypothesis]] is false.<ref name="Aaronson3" /><ref name=":1" />
A 15-state Turing machine has been constructed that halts if and only if the following conjecture formulated by [[Paul Erdős]] in 1979 is false: for all ''n'' > 8 there is at least one digit 2 in the base 3 representation of 2<sup>''n''</sup>.<ref>{{cite report | arxiv=2107.12475 | author=Tristan Stérin and Damien Woods | title=On the hardness of knowing busy beaver values BB(15) and BB(5,4)| institution=Maynooth University | type=Technical Report | date=July 2021 }}</ref><ref>{{cite journal | last = Erdõs | first = Paul | author-link = Paul Erdõs | url = https://jstor.org/stable/2689842 | title=Some unconventional problems in number theory. | journal = [[Math. Mag.]] | volume = 52 | issue = 2 |date=1979 | pages = 67–70 | doi=10.1080/0025570X.1979.11976756| jstor = 2689842 }}</ref>


* A 43-state Turing machine has been constructed that halts if, and only if, [[Goldbach's conjecture]] is false, and a 27-state machine for that conjecture has been proposed but not yet verified.<ref name="Aaronson3" /><ref name=":1" />
== Examples ==
{{for|an example of a 3-state busy beaver's state table and its "run"|Turing machine examples#3-state Busy Beaver|Turing machine examples}}


* A 15-state Turing machine has been constructed that halts if and only if the following conjecture formulated by [[Paul Erdős]] in 1979 is false: for all ''n'' > 8 there is at least one digit 2 in the base 3 representation of 2<sup>''n''</sup>.<ref>{{cite report |title=On the hardness of knowing busy beaver values BB(15) and BB(5,4) |author=Tristan Stérin and Damien Woods |date=July 2021 |arxiv=2107.12475 |institution=Maynooth University |type=Technical Report}}</ref><ref>{{cite journal |last=Erdõs |first=Paul |author-link=Paul Erdõs |date=1979 |title=Some unconventional problems in number theory. |url=https://jstor.org/stable/2689842 |journal=[[Math. Mag.]] |volume=52 |issue=2 |pages=67–70 |doi=10.1080/0025570X.1979.11976756 |jstor=2689842}}</ref>
[[File:Busy Beaver 5 State 2 Color.png|thumb|300px|Shows the first 100,000 timesteps of the best 5-state busy beaver. Orange is "1", white is "0" (image compressed vertically).]]

== Known results ==
=== Lower bounds ===

==== Green machines ====
In 1964 Milton Green developed a lower bound for the 1s-counting variant of the Busy Beaver function that was published in the proceedings of the 1964 IEEE symposium on switching circuit theory and logical design. Heiner Marxen and Jürgen Buntrock described it as "a non-trivial (not primitive recursive) lower bound".<ref>{{Cite journal |last=Brady |first=Allen H. |date=March 1998 |title=Heiner Marxen and Jürgen Buntrock. Attacking the busy beaver 5. Bulletin of the European Association for Theoretical Computer Science, no. 40 (Feb.1990), pp. 247–251. - Pascal Michel. Busy beaver competition and Collatz-like problems. Archive for mathematical logic, vol. 32 (1993), pp. 351–367. |url=https://www.cambridge.org/core/journals/journal-of-symbolic-logic/article/abs/heiner-marxen-and-jurgen-buntrock-attacking-the-busy-beaver-5-bulletin-of-the-european-association-for-theoretical-computer-science-no-40-feb1990-pp-247251-pascal-michel-busy-beaver-competition-and-collatzlike-problems-archive-for-mathematical-logic-vol-32-1993-pp-351367/D18FE9FA2B022BD2960AEF1E8AE28178# |journal=The Journal of Symbolic Logic |language=en |volume=63 |issue=1 |pages=331–332 |doi=10.2307/2586607 |issn=0022-4812}} [https://turbotm.de/~heiner/BB/mabu90.html Free HTML version by author]</ref> This lower bound can be calculated but is too complex to state as a single expression in terms of ''n''.<ref name=":7">{{Cite journal |last=Green |first=Milton W. |date=1964-11-11 |title=A lower bound RADO's sigma function for binary turing machines |url=https://doi.org/10.1109/SWCT.1964.3 |journal=Proceedings of the 1964 Proceedings of the Fifth Annual Symposium on Switching Circuit Theory and Logical Design |series=SWCT '64 |location=USA |publisher=IEEE Computer Society |pages=91–94 |doi=10.1109/SWCT.1964.3}}</ref> This was done with a set of Turing machines, each of which demonstrated the lower bound for a certain ''n''.<ref name=":7" /> When ''n''=8 the method gives
: <math>\Sigma(8) \geq 3 \times (7 \times 3^{92} - 1) / 2 \approx 8.248 \times 10^{44}</math>.

In contrast, the best current (as of 2024) lower bound on <math>\Sigma(6)</math> is <math>10 \uparrow\uparrow 15</math>, where each <math>\uparrow</math> is [[Knuth's up-arrow notation]].<ref name=":5" /> This represents <math>10^{(10^{(10^{(10^{(\ldots)})})})}</math>, an exponentiated chain of 15 tens equal to <math>10^{10 \uparrow 14}</math>. The value of <math>\Sigma(8)</math> is probably much larger still than that.

Specifically, the lower bound was shown with a series of recursive Turing machines, each of which was made of a smaller one with two additional states that repeatedly applied the smaller machine to the input tape.<ref name=":7" /> Defining the value of the N-state busy-beaver competitor on a tape containing <math>m</math> ones to be <math>B_N(m)</math> (the ultimate output of each machine being its value on <math>m = 0</math>, because a blank tape has 0 ones), the recursion relations are as follows:<ref name=":7" /> a
: <math>B_N(0) = 1</math>
: <math>B_1(m) = m + 1</math>
: <math>B_N(m) = 1 + B_{N-2}(1 + B_N(m - 1))</math>
: <math>B_N(m) = 1 + B_{N-2}(1 + B_N(m - 1))</math>
This leads to two formulas, for odd and even numbers, for calculating the lower bound given by the Nth machine, <math>G(N)</math>:
: <math>G(N) = B_{N-2}(B_{N-2}(1))</math> for odd N
: <math>G(N) = 1 + B_{N-3}(1 + B_{N-3}(1))</math> for even N
The lower bound BB(N) can also be related to the [[Ackermann function]]. It can be shown that:<ref name=":8">{{Cite journal |last=Ben-Amram |first=A. M. |last2=Petersen |first2=H. |date=2002-02-01 |title=Improved Bounds for Functions Related to Busy Beavers |url=https://doi.org/10.1007/s00224-001-1052-0 |journal=Theory of Computing Systems |language=en |volume=35 |issue=1 |pages=1–11 |doi=10.1007/s00224-001-1052-0 |issn=1433-0490}}</ref>
: <math>A(n,n) > G(4N+3) > A(4, 2N+1)</math>

==== Relationships between Busy beaver functions ====
Trivially, S(n) ≥ Σ(n) because a machine that writes Σ(n) ones must take at least Σ(n) steps to do so.<ref name=":8" /> It is possible to give a number of upper bounds on the time S(n) with the number of ones Σ(n):
* <math>S(n) \leq (n + 1) \times \Sigma(5n) \times 2^{\Sigma(5n)}</math> &nbsp; (Rado<ref name=":8" />)
* <math>S(n) \leq \Sigma(9n)</math> &nbsp; (Buro<ref name=":8" />)
* <math>S(n) \leq (2n - 1) \times \Sigma(3n + 3)</math> &nbsp; (Julstrom and Zwick<ref name=":8" />)
By defining num(n) to be the maximum number of ones an ''n''-state Turing machine is allowed to output contiguously, rather than in any position (the largest [[Unary numeral system|unary number]] it can output), it is possible to show:<ref name=":8" />
: <math>\text{num}(n) < \Sigma(n)</math>
: <math>S(n) < \text{num}(n + o(n))</math>
: <math>S(n) < \text{num}(3n+6)</math> &nbsp; (Ben-Amram, et al., 1996<ref name=":6">{{Cite journal |last=Ben-Amram |first=A. M. |last2=Julstrom |first2=B. A. |last3=Zwick |first3=U. |date=1996-08-01 |title=A note on busy beavers and other creatures |url=https://doi.org/10.1007/BF01192693 |journal=Mathematical systems theory |language=en |volume=29 |issue=4 |pages=375–386 |doi=10.1007/BF01192693 |issn=1433-0490}}</ref>)

Ben-Amram and Petersen, 2002, also give an asymptotically improved bound on S(n).{{Full citation needed|date=July 2024}} There exists a constant ''c'', such that for all {{math|''n'' ≥ 2}}:

:<math>S(n) \le \Sigma\left(n + \left\lceil \frac{8n}{\log_2 n} \right\rceil + c\right). </math>

{{tmath|S (n)}} tends to be close to the square of {{tmath|\Sigma (n)}}, and in fact many machines give {{tmath|S (n)}} less than {{tmath|\Sigma(n)^2}}.{{Citation needed|date=July 2024}}

===Exact values and lower bounds===
The following table lists the exact values and some known lower bounds for ''S''(''n''), Σ(''n''), and several other busy beaver functions. In this table, 2-symbol Turing machines are used. Entries listed as "?" are at least as large as other entries to the left (because all n-state machines are also (n+1) state machines), and no larger than entries above them (because S(n) ≥ space(n) ≥ Σ(n) ≥ num(n)).
{| class="wikitable"
|+Values of busy beaver functions
!Function
!2-state
!3-state
!4-state
!5-state
!6-state
|-
|'''S(n)'''
|6 (<ref name=":62" />)
|21 (<ref name=":62" />)
|107 (<ref name=":62" />)
|{{val|47176870}} (<ref name=":4" />)
|> 10⇈15 (<ref name=":5" />)
|-
|'''space(n)'''
|4 (<ref name=":8" />)
|7 (<ref name=":8" />)
|16 (<ref name=":8" />)
|≥ {{val|12289}} (<ref name=":8" />)
|?
|-
|'''Σ(n)'''
|4 (<ref name=":8" />)
|6 (<ref name=":8" />)
|13 (<ref name=":8" />)
|≥ {{val|4098}} (<ref name=":8" />)
|> 10⇈15 (<ref name="ligocki_bb6" />)
|-
|'''num(n)'''
|4 (<ref name=":8" />)
|6 (<ref name=":8" />)
|12 (<ref name=":8" />)
|?
|?
|}
The 5-state busy beaver was discovered by Heiner Marxen and Jürgen Buntrock in 1989, but only proved to be the winning fifth busy beaver — stylized as BB(5) — in 2024 using a proof in [[Coq (software)|Coq]].<ref>{{Cite web |date=2024-07-02 |title=[July 2nd 2024] We have proved "BB(5) = 47,176,870" |url=https://discuss.bbchallenge.org/t/july-2nd-2024-we-have-proved-bb-5-47-176-870/237 |access-date=2024-07-02 |website=The Busy Beaver Challenge |language=en}}</ref><ref>{{Cite web |title=The Busy Beaver Challenge |url=https://bbchallenge.org/ |access-date=2024-07-02 |website=bbchallenge.org |language=en}}</ref>


=== List of busy beavers ===
These are tables of rules for the Turing machines that generate Σ(1) and ''S''(1), Σ(2) and ''S''(2), Σ(3) (but not ''S''(3)), Σ(4) and ''S''(4), Σ(5) and ''S''(5), and the best known lower bound for Σ(6) and ''S''(6).
{{for|an example of a 3-state busy beaver's state table and its "run"|Turing machine examples#3-state Busy Beaver|Turing machine examples}}[[File:Busy Beaver 5 spacetime.png|thumb|480px|A zoomed-out space-time diagram of the 5-state busy beaver machine (for S(n), then Σ(n)). The machine runs for 47,176,870 steps, peaking with 12288 zeroes, and leaving behind 4098 zeroes upon halt. <br />The diagram is compressed so only steps which change the tape are shown. Green and yellow triangles indicate regions where the Turing machine shuttles back and forth; the time taken is proportional to the areas of these colored triangles. The bottom row is an excerpt of the tape and the read/write head upon halting.]]These are tables of rules for the Turing machines that generate Σ(1) and ''S''(1), Σ(2) and ''S''(2), Σ(3) (but not ''S''(3)), Σ(4) and ''S''(4), Σ(5) and ''S''(5), and the best known lower bound for Σ(6) and ''S''(6).


In the tables, columns represent the current state and rows represent the current symbol read from the tape. Each table entry is a string of three characters, indicating the symbol to write onto the tape, the direction to move, and the new state (in that order). The halt state is shown as <span style="color:red">'''H'''</span>.
In the tables, columns represent the current state and rows represent the current symbol read from the tape. Each table entry is a string of three characters, indicating the symbol to write onto the tape, the direction to move, and the new state (in that order). The halt state is shown as <span style="color:red">'''H'''</span>.
Line 406: Line 345:


:{| class="wikitable"
:{| class="wikitable"
|+ current 6-state, 2-symbol best contender<ref name=michel_comp>Pascal Michel's [https://bbchallenge.org/~pascal.michel/bbc.html Busy Beaver Competitions] page listing best contenders known.</ref><ref name=ligocki_bb6>[https://www.sligocki.com/2022/06/21/bb-6-2-t15.html BB(6, 2) > 10↑↑15] article proving this bound.</ref>
|+ current 6-state, 2-symbol best contender<ref name=michel_comp>Pascal Michel's [https://bbchallenge.org/~pascal.michel/bbc.html Busy Beaver Competitions] page listing best contenders known.</ref><ref name=ligocki_bb6>https://www.sligocki.com/2022/06/21/bb-6-2-t15.html </ref>
! width="20px" |
! width="20px" |
! A
! A

Latest revision as of 08:18, 19 July 2024

The Space-time diagram[1] shows the first 100,000 timesteps of the best 5-state busy beaver. Orange is "1", white is "0" (image compressed vertically).

In theoretical computer science, the busy beaver game aims at finding a terminating program of a given size that (depending on definition) either produces the most output possible, or runs for the longest number of steps.[2] Since an endlessly looping program producing infinite output or running for infinite time is easily conceived, such programs are excluded from the game.[2] Rather than traditional programming languages, the programs used in the game are n-state Turing machines,[2] one of the first mathematical models of computation.[3]

Turing machines consist of an infinite tape, and a finite set of states which serve as the program's "source code". Producing the most output is defined as writing the largest number of 1s on the tape, also referred to as achieving the highest score, and running for the longest time is defined as taking the longest number of steps to halt.[4] The n-state busy beaver game consists of finding the longest-running or highest-scoring Turing machine which has n states and eventually halts.[2] Such machines are assumed to start on a blank tape, and the tape is assumed to contain only zeros and ones (a binary turing machine).[2] A player should conceive of a set of transitions between states aiming for the highest score or longest running time while making sure the machine will halt eventually.

An nth busy beaver, BB-n or simply "busy beaver" is a Turing machine that wins the n-state busy beaver game.[5] Depending on definition, it either attains the highest score, or runs for the longest time, among all other possible n-state competing Turing machines. The functions determining the highest score or longest running time of the n-state busy beavers by each definition are Σ(n) and S(n) respectively.[4]

Deciding the running time or score of the nth Busy Beaver is incomputable.[4] In fact, both the functions Σ(n) and S(n) eventually become larger than any computable function.[4] This has implications in computability theory, the halting problem, and complexity theory.[6] The concept was first introduced by Tibor Radó in his 1962 paper, "On Non-Computable Functions".[4] One of the most interesting aspects of the busy beaver game is that, if it were possible to compute the functions Σ(n) and S(n) for all n, then this would resolve all mathematical conjectures which can be encoded as "does this Turing machine halt or not".[5] For example, a 27-state Turing machine could check Goldbach's conjecture for each number and halt on a counterexample: if this machine had not halted after running for S(27) steps, then it must run forever, resolving the conjecture.[5] Many other problems, including the Riemann hypothesis (744 states) and the consistency of ZF set theory (748 states), can be expressed in a similar form, where only an infinite (countable) number of cases need to be checked.[5]

Technical definition

[edit]

The n-state busy beaver game (or BB-n game), introduced in Tibor Radó's 1962 paper, involves a class of Turing machines, each member of which is required to meet the following design specifications:

  • The machine has n "operational" states plus a Halt state, where n is a positive integer, and one of the n states is distinguished as the starting state. (Typically, the states are labelled by 1, 2, ..., n, with state 1 as the starting state, or by A, B, C, ..., with state A as the starting state.)
  • The machine uses a single two-way infinite (or unbounded) tape.
  • The tape alphabet is {0, 1}, with 0 serving as the blank symbol.
  • The machine's transition function takes two inputs:
  1. the current non-Halt state,
  2. the symbol in the current tape cell,
and produces three outputs:
  1. a symbol to write over the symbol in the current tape cell (it may be the same symbol as the symbol overwritten),
  2. a direction to move (left or right; that is, shift to the tape cell one place to the left or right of the current cell), and
  3. a state to transition into (which may be the Halt state).

"Running" the machine consists of starting in the starting state, with the current tape cell being any cell of a blank (all-0) tape, and then iterating the transition function until the Halt state is entered (if ever). If, and only if, the machine eventually halts, then the number of 1s finally remaining on the tape is called the machine's score. The n-state busy beaver (BB-n) game is therefore a contest, depending on definition to find such an n-state Turing machine having the largest possible score or running time.

[edit]

Score function Σ

[edit]

The score function quantifies the maximum score attainable by a busy beaver on a given measure. This is a noncomputable function. This function can be shown to grow asymptotically faster than any computable function.[7]

The score function, , is defined so that Σ(n) is the maximum attainable score (the maximum number of 1s finally on the tape) among all halting 2-symbol n-state Turing machines of the above-described type, when started on a blank tape.

It is clear that Σ is a well-defined function: for every n, there are at most finitely many n-state Turing machines as above, up to isomorphism, hence at most finitely many possible running times.

This infinite sequence Σ is the score function, and according to the score-based definition, any n-state 2-symbol Turing machine M for which σ(M) = Σ(n) (i.e., which attains the maximum score) is called a busy beaver. Note that for each n, there exist at least 4(n − 1)! n-state busy beavers. (Given any n-state busy beaver, another is obtained by merely changing the shift direction in a halting transition, a third by reversing all shift directions uniformly, and a fourth by reversing the halt direction of the all-swapped busy beaver. Furthermore, a permutation of all states except Start and Halt produces a machine that attains the same score. Theoretically, there could be more than one kind of transition leading to the halting state, but in practice it would be wasteful, because there's only one sequence of state transitions producing the sought-after result.)

Non-computability

[edit]

Radó's 1962 paper proved that if is any computable function, then Σ(n) > f(n) for all sufficiently large n, and hence that Σ is not a computable function.[4]

Moreover, this implies that it is undecidable by a general algorithm whether an arbitrary Turing machine is a busy beaver. (Such an algorithm cannot exist, because its existence would allow Σ to be computed, which is a proven impossibility. In particular, such an algorithm could be used to construct another algorithm that would compute Σ as follows: for any given n, each of the finitely many n-state 2-symbol Turing machines would be tested until an n-state busy beaver is found; this busy beaver machine would then be simulated to determine its score, which is by definition Σ(n).)

Even though Σ(n) is an uncomputable function, there are some small n for which it is possible to obtain its values and prove that they are correct. It is not hard to show that Σ(0) = 0, Σ(1) = 1, Σ(2) = 4, and with progressively more difficulty it can be shown that Σ(3) = 6, Σ(4) = 13 and Σ(5) = 4098 (sequence A028444 in the OEIS). Σ(n) has not yet been determined for any instance of n > 5, although lower bounds have been established (see the Known values section below).

Complexity and unprovability of Σ

[edit]

A variant of Kolmogorov complexity is defined as follows:[8] The complexity of a number n is the smallest number of states needed for a BB-class Turing machine that halts with a single block of n consecutive 1s on an initially blank tape. The corresponding variant of Chaitin's incompleteness theorem states that, in the context of a given axiomatic system for the natural numbers, there exists a number k such that no specific number can be proven to have complexity greater than k, and hence that no specific upper bound can be proven for Σ(k) (the latter is because "the complexity of n is greater than k" would be proven if n > Σ(k) were proven). As mentioned in the cited reference, for any axiomatic system of "ordinary mathematics" the least value k for which this is true is far less than 10⇈10; consequently, in the context of ordinary mathematics, neither the value nor any upper-bound of Σ(10⇈10) can be proven. (Gödel's first incompleteness theorem is illustrated by this result: in an axiomatic system of ordinary mathematics, there is a true-but-unprovable sentence of the form Σ(10⇈10) = n, and there are infinitely many true-but-unprovable sentences of the form Σ(10⇈10) < n.)

Maximum shifts function S

[edit]

In addition to the function Σ, Radó [1962] introduced another extreme function for Turing machines, the maximum shifts function, S, defined as follows:[4]

  • s(M) = the number of shifts M makes before halting, for any MEn,
  • S(n) = max{s(M) | MEn} = the largest number of shifts made by any halting n-state 2-symbol Turing machine.

Because normal 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 S is noncomputable for the same reason that Σ is noncomputable — it grows faster than any computable function. He proved this simply by noting that for each n, S(n) ≥ Σ(n). Each shift may write a 0 or a 1 on the tape, while Σ counts a subset of the shifts that wrote a 1, namely the ones that hadn't been overwritten by the time the Turing machine halted; consequently, S grows at least as fast as Σ, which had already been proved to grow faster than any computable function.[4]

The following connection between Σ and S was used by Lin & Radó [Computer Studies of Turing Machine Problems, 1965] to prove that Σ(3) = 6: For a given n, if S(n) is known then all n-state Turing machines can (in principle) be run for up to 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 Σ(n). The approach used by Lin & Radó for the case of n = 3 was to conjecture that 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 S(3) = 21, and determining that Σ(3) = 6 by the procedure just described.[full citation needed]

In 2016, Adam Yedidia and Scott Aaronson obtained the first (explicit) upper bound on the minimum n for which S(n) is unprovable in ZFC. To do so they constructed a 7910-state[9] Turing machine whose behavior cannot be proven based on the usual axioms of set theory (Zermelo–Fraenkel set theory with the axiom of choice), under reasonable consistency hypotheses (stationary Ramsey property).[10][11] Stefan O'Rear then reduced it to 1919 states, with the dependency on the stationary Ramsey property eliminated,[12][13] and later to 748 states.[6] In July 2023, Riebel reduced it to 745 states.[14][15]

Proof for uncomputability of S(n) and Σ(n)

[edit]

Suppose that S(n) is a computable function and let EvalS denote a TM, evaluating S(n). Given a tape with n 1s it will produce S(n) 1s on the tape and then halt. Let Clean denote a Turing machine cleaning the sequence of 1s initially written on the tape. Let Double denote a Turing machine evaluating function n + n. Given a tape with n 1s it will produce 2n 1s on the tape and then halt. Let us create the composition Double | EvalS | Clean and let n0 be the number of states of this machine. Let Create_n0 denote a Turing machine creating n0 1s on an initially blank tape. This machine may be constructed in a trivial manner to have n0 states (the state i writes 1, moves the head right and switches to state i + 1, except the state n0, which halts). Let N denote the sum n0 + n0.

Let BadS denote the composition Create_n0 | Double | EvalS | Clean. Notice that this machine has N states. Starting with an initially blank tape it first creates a sequence of n0 1s and then doubles it, producing a sequence of N 1s. Then BadS will produce S(N) 1s on tape, and at last it will clear all 1s and then halt. But the phase of cleaning will continue at least S(N) steps, so the time of working of BadS is strictly greater than S(N), which contradicts to the definition of the function S(n).

The uncomputability of Σ(n) may be proved in a similar way. In the above proof, one must exchange the machine EvalS with EvalΣ and Clean with Increment — a simple TM, searching for a first 0 on the tape and replacing it with 1.

The uncomputability of S(n) can also be established by reference to the blank tape halting problem. The blank tape halting problem is the problem of deciding for any Turing machine whether or not it will halt when started on an empty tape. The blank tape halting problem is equivalent to the standard halting problem and so it is also uncomputable. If S(n) was computable, then we could solve the blank tape halting problem simply by running any given Turing machine with n states for S(n) steps; if it has still not halted, it never will. So, since the blank tape halting problem is not computable, it follows that S(n) must likewise be uncomputable.

Other functions

[edit]

A number of other uncomputable functions can be defined based on measuring the performance of Turing machines in other ways than time or maximal number of ones.[16] For example:[16]

  • The function is defined to be the maximum number of contiguous ones a halting Turing machine can write on a blank tape. In other words, this is the largest unary number a Turing machine of n states can write on a tape.
  • The function is defined to be the maximal number of tape squares a halting Turing machine can read (i.e., visit) before halting. This includes the starting square, but not a square that the machine only reaches after the halt transition (if the halt transition is annotated with a move direction), because that square does not influence the machine's behaviour. This is the maximal space complexity of an n-state Turing machine.

Both of these functions are also uncomputable.[16] This can be shown for by noting that every tape square a Turing machine writes a one to, it must also visit: in other words, .[16] The function can be shown to be incomputable by proving, for example, that : this can be done by designing an (3n+3)-state Turing machine which simulates the n-state space champion, and then uses it to write at least contiguous ones to the tape.[16] These functions stand in the relation:[16]

Generalizations

[edit]

Analogs of the shift function can be simply defined in any programming language, given that the programs can be described by bit-strings, and a program's number of steps can be counted.[17] For example, the busy beaver game can also be generalized to two dimensions using turing machines on two-dimensional tapes, or to turing machines that are allowed to stay in the same place as well as move to the left and right.[17] Alternatively a "busy beaver function" for diverse models of computation can be defined with Kolgomorov complexity.[17] This is done by taking to be the largest integer such that , where is the length of the shortest program in that outputs : is thereby the largest integer a program with length or less can output in .[17]

The longest running 6-state, 2-symbol machine which has the additional property of reversing the tape value at each step produces 6147 1s after 47339970 steps.[citation needed] So for the Reversal Turing Machine (RTM) class,[18] SRTM(6) ≥ 47339970 and ΣRTM(6) ≥ 6147. Likewise we could define an analog to the Σ function for register machines as the largest number which can be present in any register on halting, for a given number of instructions.[citation needed]

Different numbers of symbols

[edit]

A simple generalization is the extension to Turing machines with m symbols instead of just 2 (0 and 1).[17] For example a trinary Turing machine with m = 3 symbols would have the symbols 0, 1, and 2. The generalization to Turing machines with n states and m symbols defines the following generalized busy beaver functions:

  1. Σ(n, m): the largest number of non-zeros printable by an n-state, m-symbol machine started on an initially blank tape before halting,[citation needed] and
  2. S(n, m): the largest number of steps taken by an n-state, m-symbol machine started on an initially blank tape before halting.[17]

For example, the longest-running 3-state 3-symbol machine found so far runs 119112334170342540 steps before halting.[19][better source needed]

Nondeterministic Turing machines

[edit]
Maximal Halting Times and States from p-case, 2-state, 2-color NDTM[20]
p steps states
1 2 2
2 4 4
3 6 7
4 7 11
5 8 15
6 7 18
7 6 18

The problem can be extended to nondeterministic Turing machines by looking for the system with the most states across all branches or the branch with the longest number of steps.[20] The question of whether a given NDTM will halt is still computationally irreducible, and the computation required to find an NDTM busy beaver is significantly greater than the deterministic case, since there are multiple branches that need to be considered. For a 2-state, 2-color system with p cases or rules, the table to the right gives the maximum number of steps before halting and maximum number of unique states created by the NDTM.

Applications

[edit]

In addition to posing a rather challenging mathematical game, the busy beaver functions Σ(n) and S(n) offer an entirely new approach to solving pure mathematics problems. Many open problems in mathematics could in theory, but not in practice, be solved in a systematic way given the value of S(n) for a sufficiently large n.[5][21] Theoretically speaking, the value of S(n) encodes the answer to all mathematical conjectures that can be checked by a Turing machine with less than or equal to n states.[6]

Consider any conjecture: any conjecture that could be disproven via a counterexample among a countable number of cases (e.g. Goldbach's conjecture). Write a computer program that sequentially tests this conjecture for increasing values. In the case of Goldbach's conjecture, we would consider every even number ≥ 4 sequentially and test whether or not it is the sum of two prime numbers. Suppose this program is simulated on an n-state Turing machine. If it finds a counterexample (an even number ≥ 4 that is not the sum of two primes in our example), it halts and indicates that. However, if the conjecture is true, then our program will never halt. (This program halts only if it finds a counterexample.)[6]

Now, this program is simulated by an n-state Turing machine, so if we know S(n) we can decide (in a finite amount of time) whether or not it will ever halt by simply running the machine that many steps. And if, after S(n) steps, the machine does not halt, we know that it never will and thus that there are no counterexamples to the given conjecture (i.e., no even numbers that are not the sum of two primes). This would prove the conjecture to be true.[6] Thus specific values (or upper bounds) for S(n) could be, in theory, used to systematically solve many open problems in mathematics.[6]

However, current results on the busy beaver problem suggest that this will not be practical for two reasons:[citation needed]

  • It is extremely hard to prove values for the busy beaver function (and the max shift function). Every known exact value of S(n) was proven by enumerating every n-state Turing machine and proving whether or not each halts. One would have to calculate S(n) by some less direct method for it to actually be useful.[citation needed]
  • The values of S(n) and the other busy beaver functions get very large, very quickly. While the value of S(5) is only around 47 million, the value of S(6) is more than 10⇈15, which is equal to with a stack of 15 tens.[17][better source needed] This number has 10⇈14 digits and is unreasonable to use in a computation. The value of S(27), which is the number of steps the current program for the Goldbach conjecture would need to be run to give a conclusive answer, is incomprehensibly huge, and not remotely possible to write down, much less run a machine for, in the observable universe.[5]

Another property of S(n) is that no arithmetically sound, computably axiomatized theory can prove all of the function's values. Specifically, given a computable and arithmetically sound theory , there is a number such that for all , no statement of the form can be proved in .[6] This implies that for each theory there is a specific largest value of S(n) that it can prove. This is true because for every such , a Turing machine with can be designed to enumerate every possible proof in .[6] If the theory is inconsistent, then all false statements are provable, and the Turing machine can be given the condition to halt if and only if it finds a proof of, for example, .[6] Any theory that proves the value of proves its own consistency, violating Godel's second incompleteness theorem.[6] This can be used to place various theories on a scale, for example the various large cardinal axioms in ZFC: if each theory is assigned as its number , theories with larger values of prove the consistency of those below them, placing all such theories on a countably infinite scale.[6]

Notable instances

[edit]
  • A 43-state Turing machine has been constructed that halts if, and only if, Goldbach's conjecture is false, and a 27-state machine for that conjecture has been proposed but not yet verified.[12][5]
  • A 15-state Turing machine has been constructed that halts if and only if the following conjecture formulated by Paul Erdős in 1979 is false: for all n > 8 there is at least one digit 2 in the base 3 representation of 2n.[22][23]

Known results

[edit]

Lower bounds

[edit]

Green machines

[edit]

In 1964 Milton Green developed a lower bound for the 1s-counting variant of the Busy Beaver function that was published in the proceedings of the 1964 IEEE symposium on switching circuit theory and logical design. Heiner Marxen and Jürgen Buntrock described it as "a non-trivial (not primitive recursive) lower bound".[24] This lower bound can be calculated but is too complex to state as a single expression in terms of n.[25] This was done with a set of Turing machines, each of which demonstrated the lower bound for a certain n.[25] When n=8 the method gives

.

In contrast, the best current (as of 2024) lower bound on is , where each is Knuth's up-arrow notation.[17] This represents , an exponentiated chain of 15 tens equal to . The value of is probably much larger still than that.

Specifically, the lower bound was shown with a series of recursive Turing machines, each of which was made of a smaller one with two additional states that repeatedly applied the smaller machine to the input tape.[25] Defining the value of the N-state busy-beaver competitor on a tape containing ones to be (the ultimate output of each machine being its value on , because a blank tape has 0 ones), the recursion relations are as follows:[25] a

This leads to two formulas, for odd and even numbers, for calculating the lower bound given by the Nth machine, :

for odd N
for even N

The lower bound BB(N) can also be related to the Ackermann function. It can be shown that:[26]

Relationships between Busy beaver functions

[edit]

Trivially, S(n) ≥ Σ(n) because a machine that writes Σ(n) ones must take at least Σ(n) steps to do so.[26] It is possible to give a number of upper bounds on the time S(n) with the number of ones Σ(n):

  •   (Rado[26])
  •   (Buro[26])
  •   (Julstrom and Zwick[26])

By defining num(n) to be the maximum number of ones an n-state Turing machine is allowed to output contiguously, rather than in any position (the largest unary number it can output), it is possible to show:[26]

  (Ben-Amram, et al., 1996[16])

Ben-Amram and Petersen, 2002, also give an asymptotically improved bound on S(n).[full citation needed] There exists a constant c, such that for all n ≥ 2:

tends to be close to the square of , and in fact many machines give less than .[citation needed]

Exact values and lower bounds

[edit]

The following table lists the exact values and some known lower bounds for S(n), Σ(n), and several other busy beaver functions. In this table, 2-symbol Turing machines are used. Entries listed as "?" are at least as large as other entries to the left (because all n-state machines are also (n+1) state machines), and no larger than entries above them (because S(n) ≥ space(n) ≥ Σ(n) ≥ num(n)).

Values of busy beaver functions
Function 2-state 3-state 4-state 5-state 6-state
S(n) 6 ([6]) 21 ([6]) 107 ([6]) 47176870 ([3]) > 10⇈15 ([17])
space(n) 4 ([26]) 7 ([26]) 16 ([26]) 12289 ([26]) ?
Σ(n) 4 ([26]) 6 ([26]) 13 ([26]) 4098 ([26]) > 10⇈15 ([27])
num(n) 4 ([26]) 6 ([26]) 12 ([26]) ? ?

The 5-state busy beaver was discovered by Heiner Marxen and Jürgen Buntrock in 1989, but only proved to be the winning fifth busy beaver — stylized as BB(5) — in 2024 using a proof in Coq.[28][29]

List of busy beavers

[edit]
A zoomed-out space-time diagram of the 5-state busy beaver machine (for S(n), then Σ(n)). The machine runs for 47,176,870 steps, peaking with 12288 zeroes, and leaving behind 4098 zeroes upon halt.
The diagram is compressed so only steps which change the tape are shown. Green and yellow triangles indicate regions where the Turing machine shuttles back and forth; the time taken is proportional to the areas of these colored triangles. The bottom row is an excerpt of the tape and the read/write head upon halting.

These are tables of rules for the Turing machines that generate Σ(1) and S(1), Σ(2) and S(2), Σ(3) (but not S(3)), Σ(4) and S(4), Σ(5) and S(5), and the best known lower bound for Σ(6) and S(6).

In the tables, columns represent the current state and rows represent the current symbol read from the tape. Each table entry is a string of three characters, indicating the symbol to write onto the tape, the direction to move, and the new state (in that order). The halt state is shown as H.

Each machine begins in state A with an infinite tape that contains all 0s. Thus, the initial symbol read from the tape is a 0.

Result key: (starts at the position overlined, halts at the position underlined)

1-state, 2-symbol busy beaver
A
0 1RH
1 (not used)

Result: 0 0 1 0 0 (1 step, one "1" total)

2-state, 2-symbol busy beaver[citation needed]
A B
0 1RB 1LA
1 1LB 1RH

Result: 0 0 1 1 1 1 0 0 (6 steps, four "1"s total)

Animation of a 3-state, 2-symbol busy beaver
3-state, 2-symbol busy beaver[30][31]
A B C
0 1RB 0RC 1LC
1 1RH 1RB 1LA

Result: 0 0 1 1 1 1 1 1 0 0 (14 steps, six "1"s total).

Unlike the previous machines, this one is a busy beaver only for Σ, but not for S. (S(3) = 21.)

Animation of a 4-state, 2-symbol busy beaver
4-state, 2-symbol busy beaver
A B C D
0 1RB 1LA 1RH 1RD
1 1LB 0LC 1LD 0RA

Result: 0 0 1 0 1 1 1 1 1 1 1 1 1 1 1 1 0 0 (107 steps, thirteen "1"s total)

5-state, 2-symbol busy beaver
A B C D E
0 1RB 1RC 1RD 1LA 1RH
1 1LC 1RB 0LE 1LD 0LA

Result: 4098 "1"s with 8191 "0"s interspersed in 47,176,870 steps.

Note in the image to the right how this solution is similar qualitatively to the evolution of some cellular automata.

current 6-state, 2-symbol best contender[19][27]
A B C D E F
0 1RB 1RC 1LC 0LE 1LF 0RC
1 0LD 0RF 1LA 1RH 0RB 0RE

Result: 1 0 1 1 1 ... 1 1 1 ("10" followed by more than 10↑↑15 contiguous "1"s in more than 10↑↑15 steps, where 10↑↑15=1010..10, an exponential tower of 15 tens).

Visualizations

[edit]

In the following table, the rules for each busy beaver (maximizing Σ) are represented visually, with orange squares corresponding to a "1" on the tape, and white corresponding to "0". The position of the head is indicated by the black ovoid, with the orientation of the head representing the state. Individual tapes are laid out horizontally, with time progressing from top to bottom. The halt state is represented by a rule which maps one state to itself (head doesn't move).

Evolution of busy beavers with 1-4 states
Rules for 1-state busy beaver
Rules for 2-state busy beaver
Rules for 3-state busy beaver
Rules for 4-state busy beaver
Evolution of 1-state busy beaver until halt. The initial state triggers a halt, with a single "1" being written before termination.
Evolution of 2-state busy beaver until halt
Evolution of 3-state busy beaver until halt
Evolution of 4-state busy beaver until halt. Bottom line in left image wraps to top line of right image. The final step writes "1" before halting (not shown).

See also

[edit]

Notes

[edit]
  1. ^ "The Busy Beaver Challenge: Story # space-time-diagrams". bbchallenge.org. Retrieved 2024-07-09.
  2. ^ a b c d e Weisstein, Eric W. "Busy Beaver". Wolfram MathWorld. Retrieved 21 November 2023.
  3. ^ a b Brubaker, Ben (2024-07-02). "Amateur Mathematicians Find Fifth 'Busy Beaver' Turing Machine". Quanta Magazine. Retrieved 2024-07-03.
  4. ^ a b c d e f g h Radó, Tibor (May 1962). "On non-computable functions" (PDF). Bell System Technical Journal. 41 (3): 877–884. doi:10.1002/j.1538-7305.1962.tb00480.x.
  5. ^ a b c d e f g h Pavlus, John (10 December 2020). "How the Slowest Computer Programs Illuminate Math's Fundamental Limits". Quanta Magazine. Retrieved 2020-12-11.
  6. ^ a b c d e f g h i j k l m n Aaronson, Scott (2020-09-29). "The Busy Beaver Frontier". SIGACT News. 51 (3): 32–54. doi:10.1145/3427361.3427369. ISSN 0163-5700. PDF available from author.
  7. ^ Chaitin (1987)
  8. ^ Boolos, Burgess & Jeffrey, 2007. "Computability and Logic"
  9. ^ Adam Yedidia and Scott Aaronson (May 2016). A Relatively Small Turing Machine Whose Behavior Is Independent of Set Theory (Technical Report). MIT. arXiv:1605.04343. Bibcode:2016arXiv160504343Y.
  10. ^ Aron, Jacob. "This Turing machine should run forever unless maths is wrong". NewScientist. Retrieved 2016-09-25.
  11. ^ Version from May 3rd contained 7918 states: "The 8000th Busy Beaver number eludes ZF set theory". Shtetl-Optimized blog. 2016-05-03. Retrieved 2016-09-25.
  12. ^ a b c "Three announcements". Shtetl-Optimized blog. 2016-05-03. Retrieved 2018-04-27.
  13. ^ "GitHub - sorear/metamath-turing-machines: Metamath proof enumerators and other things". GitHub. 2019-02-13.
  14. ^ a b "Life, blogging, and the Busy Beaver function go on". 2023-07-05. Retrieved 2023-08-27.
  15. ^ a b "The Undecidability of BB(748)" (PDF). Retrieved 2023-08-27.
  16. ^ a b c d e f g Ben-Amram, A. M.; Julstrom, B. A.; Zwick, U. (1996-08-01). "A note on busy beavers and other creatures". Mathematical systems theory. 29 (4): 375–386. doi:10.1007/BF01192693. ISSN 1433-0490.
  17. ^ a b c d e f g h i Aaronson, Scott (2024-07-02). "BusyBeaver(5) is now known to be 47,176,870". Shtetl-Optimized. Retrieved 2024-07-04.
  18. ^ "Reversal Turing machine". skelet.ludost.net. Retrieved 2022-02-10.
  19. ^ a b Pascal Michel's Busy Beaver Competitions page listing best contenders known.
  20. ^ a b Wolfram, Stephen (4 February 2021). "Multiway Turing Machines". www.wolframphysics.org.
  21. ^ Chaitin, Gregory J. (1987). "Computing the Busy Beaver Function" (PDF). In Cover, T. M.; Gopinath, B. (eds.). Open Problems in Communication and Computation. Springer. pp. 108–112. ISBN 978-0-387-96621-2. Archived from the original (PDF) on 2017-12-30. Retrieved 2022-07-07.
  22. ^ Tristan Stérin and Damien Woods (July 2021). On the hardness of knowing busy beaver values BB(15) and BB(5,4) (Technical Report). Maynooth University. arXiv:2107.12475.
  23. ^ Erdõs, Paul (1979). "Some unconventional problems in number theory". Math. Mag. 52 (2): 67–70. doi:10.1080/0025570X.1979.11976756. JSTOR 2689842.
  24. ^ Brady, Allen H. (March 1998). "Heiner Marxen and Jürgen Buntrock. Attacking the busy beaver 5. Bulletin of the European Association for Theoretical Computer Science, no. 40 (Feb.1990), pp. 247–251. - Pascal Michel. Busy beaver competition and Collatz-like problems. Archive for mathematical logic, vol. 32 (1993), pp. 351–367". The Journal of Symbolic Logic. 63 (1): 331–332. doi:10.2307/2586607. ISSN 0022-4812. Free HTML version by author
  25. ^ a b c d Green, Milton W. (1964-11-11). "A lower bound RADO's sigma function for binary turing machines". Proceedings of the 1964 Proceedings of the Fifth Annual Symposium on Switching Circuit Theory and Logical Design. SWCT '64. USA: IEEE Computer Society: 91–94. doi:10.1109/SWCT.1964.3.
  26. ^ a b c d e f g h i j k l m n o p q Ben-Amram, A. M.; Petersen, H. (2002-02-01). "Improved Bounds for Functions Related to Busy Beavers". Theory of Computing Systems. 35 (1): 1–11. doi:10.1007/s00224-001-1052-0. ISSN 1433-0490.
  27. ^ a b Ligocki, Shawn (2022-06-21). "BB(6, 2) > 10↑↑15". sligocki. Retrieved 2024-07-04.
  28. ^ "[July 2nd 2024] We have proved "BB(5) = 47,176,870"". The Busy Beaver Challenge. 2024-07-02. Retrieved 2024-07-02.
  29. ^ "The Busy Beaver Challenge". bbchallenge.org. Retrieved 2024-07-02.
  30. ^ Shen Lin (1963). Computer studies of Turing machine problems (Ph.D. thesis). Ohio State University.
  31. ^ Lin, Shen; Rado, Tibor (April 1965). "Computer studies of Turing machine problems". Journal of the ACM. 12 (2): 196–212. doi:10.1145/321264.321270. S2CID 17789208.

References

[edit]
[edit]