In theoretical computer science, a busy beaver is a Turing program that generates the longest finite output among all programs with the same number of states. A program that generated a longer output must necessarily continue generating forever, i.e. cannot terminate. It is generally undecidable whether a given program is a busy beaver; hence examples are known only for the first few state counts. The busy beaver game aims to find new busy beaver examples. Rather than traditional programming languages, the programs used in the game are Turing machines, one of the first mathematical models of computation. A Turing machine consists of an infinite tape, a finite set of states, and a set of transitions between them which serve as the program's "machine code". The tape is initially blank. Consider all Turing machines that have n states and, when run on a blank tape, will halt eventually. Only finitely many such machines exist. Such a machine B is called an n-state busy beaver if no other such machine writes more non-blank symbols on the tape than B. The number of non-blank symbols written by B is called its score, and symbolized as Σ(n). A variant asks for the maximum run time rather than the maximum output length. The maximum number of computation steps an n-state Turing machine can run on an initially blank tape before halting is symbolized as S(n). The n-state busy beaver game consists of finding the highest-scoring or longest-running Turing machine which has n states and eventually halts. The objective of the game is to program a set of transitions between states aiming for the highest score or the longest running time while making sure the machine will halt eventually. Both the functions S(n) and Σ(n) eventually become larger than any computable function and are hence noncomputable. This has implications in computability theory, the halting problem, and complexity theory. The concept of a busy beaver was first introduced by Tibor Radó in his 1962 paper, "On Non-Computable Functions". If it were possible to compute the functions S(n) and Σ(n) for all n, then this would resolve all mathematical conjectures that can be reduced to a halting problem, e.g., into a form of "does ⟨this Turing machine⟩ halt". For example, there is a 25-state Turing machine that checks Goldbach's conjecture for each number and halts on a counterexample; if this machine does not halt after running for S(25) steps, then it must run forever, resolving the conjecture. Many other problems, including the Riemann hypothesis (120 states) and the consistency of ZF set theory (745 states), can be expressed in a similar form, where at most a countably infinite number of cases need to be checked.
Technical definition 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:
"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 the machine eventually halts, then the number of 1s finally remaining on the tape is called the machine's score. An n-th busy beaver, BB-n or simply "busy beaver" is a Turing machine that wins the n-state busy beaver game. Depending on definition, it either attains the highest score (denoted by Σ(n)), or runs for the longest time (S(n)), among all other possible n-state competing Turing machines.
Example The rules for one 1-state Turing machine might be:
In state 1, if the current symbol is 0, write a 1, move one space to the right, and transition to state 1 In state 1, if the current symbol is 1, write a 0, move one space to the right, and transition to HALT This Turing machine would move to the right, swapping the value of all the bits it passes. Since the starting tape is all 0s, it would make an unending string of ones. This machine would not be a busy beaver contender because it runs forever on a blank tape.
Functions In his original 1962 paper, Radó defined two functions related to the busy beaver game: the score function Σ(n) and the shifts function S(n). Both take a number of Turing machine states n and output the maximum score attainable by a Turing machine of that number of states by some measure. The score function Σ(n) gives the maximum number of 1s an n-state Turing machine can output before halting, while the shifts function S(n) gives the maximum number of shifts (or equivalently steps, because each step includes a shift) that an n-state Turing machine can undergo before halting. He proved that both of these functions were noncomputable, because they each grew faster than any computable function. The function BB(n) has been defined to be either of these functions, so that notation is not used in this article. A number of other uncomputable functions can also be defined based on measuring the performance of Turing machines in other ways than time or maximal number of ones. For example:
The function num(n) 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 space(n) 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 behavior. This is the maximal space complexity of an n-state Turing machine. These four functions together stand in the relation num(n)≤Σ(n)≤space(n)≤S(n). More functions can also be defined by operating the game on different computing machines, such as 3-symbol Turing machines, non-deterministic Turing machines, the lambda calculus (sequence A333479 in the OEIS) or even arbitrary programming languages.
… excerpt ends here. Continue reading the full article.

![Busy beaver: This "space–time diagram"[1] shows the state of the memory tape on a row for the first 100,000 timesteps of the 5-state busy beaver from top to bottom. Orange is "1", white is "0" (image compressed vertically).](https://thumb.wikimedia.org/wikipedia/commons/thumb/1/18/Busy_Beaver_5_State_2_Color.png/500px-Busy_Beaver_5_State_2_Color.png?utm_source=en.wikipedia.org&utm_campaign=parser&utm_content=thumbnail)



