# What properties of busy beaver numbers are computable?

The busy beaver function $$\text{BB}(n)$$ describes the maximum number of steps that an $$n$$-state Turing machine can execute before it halts (assuming it halts at all). It is not a computable function because computing it allows you to solve the halting problem.

Are functions like $$\text{BB}(n) \bmod 2$$, or more generally $$\text{BB}(n) \bmod m$$ for a modulus $$m$$, computable? Computing these functions doesn't solve the halting problem, so the above argument doesn't apply.

Edit, 10/11/22: It is maybe worth linking here to Scott Aaronson's survey The Busy Beaver Frontier, which ends with the following:

Perhaps my favorite open questions about the Busy Beaver function were posed by my former student Andy Drucker. He asked:

Is BB (n) infinitely often even? Is it infinitely often odd? Is the set {n : BB (n) is odd} computable?

Currently, we know only that BB (2) = 6 is even, while BB (1) = 1, BB (3) = 21, and BB (4) = 107 are odd.

We could likewise ask: is BB (n) infinitely often prime? Is it infinitely often composite? (Right now one prime value is known: BB (4) = 107.) Is BB (n) ever a perfect square or a power of 2? Etc.

Of course, just like many of the questions discussed in previous sections, the answers to these questions could be highly sensitive to the model of computation. Indeed, it’s easy to define a Turing-complete model of computation wherein every valid program is constrained to run for an even number of steps (or a square number of steps, etc), so that some of these number-theoretic questions would be answered by fiat!

But what are the answers in “natural” models of computation, like Turing machines (as for the usual BB function), RAM machines, or Lisp programs?

Admittedly, these are not typical research questions for computability theory, since they’re so model-dependent. But that’s part of why I’ve grown to like the questions so much. Even to make a start on them, it seems, one would need to say something new and general about computability, beyond what’s common to all Turing-universal models — something able to address “computational epiphenomena,” like whether a machine will run for an odd or even number of steps, after we’ve optimized it for a property completely orthogonal to that question.

• This seems like it might well depend sensitively on the details of your machine setup. Jan 7, 2013 at 0:01
• Some discussion on this question: scottaaronson.com/blog/?p=46 Jan 7, 2013 at 0:44
• A variation: can it be shown that $\text{BB}(n)$ is composite infinitely often? This version is seemingly less sensitive to the encoding. Jan 7, 2013 at 4:02
• 1-D BB Turing machines are hard to visualize, so I made a page for 2-D Turing Machine BBs.. Once a 1-D Turing machine becomes predictable, it can be classified as halting or infinite. Thus, the point of predictability is the important point. This rarely happens elegantly. The champions tend to be machines that can be extended forward as they get into temporary predictable behaviors. Feb 26, 2013 at 15:51
• Jul 23, 2013 at 16:21

Define $\text{BB}(n)$ as the largest natural number whose Kolmogorov complexity (in a prefix-free binary language) is less than or equal to $n$ bits.

Consider $\text{BB}(n) \space \text{mod} \space 4^n$. This number has a Kolmogorov complexity less than $n + o(n)$, since it can be computed from $\text{BB}(n)$, and $K(\text{BB}(n)) \le n$.

Also consider $\lfloor \Omega \cdot 4^n \rfloor$ where $\Omega$ is Chaitin's constant. This number's Kolmogorov complexity is at least $2 \cdot n - o(n)$ bits (by definition of algorithmic randomness).

So,

$\text{BB}(n) \space \text{mod} \space 4^n \stackrel{?}{=} \lfloor \Omega \cdot 4^n \rfloor$

is computable since it is false for all but finitely many $n$.

Given the first $n$ bits of $\Omega$ it is possible to compute not just $\text{BB}(n)$ but all the $\text{BB}(i)$ for $i$ up to $n$. We can use this to turn the above statement sideways and say something about only the lower bits of each busy beaver number:

$K(\sum_{i \le n}{[4^i \cdot (\text{BB}(i) \space \text{mod} \space 4)]}) < n + o(n)$

implying that

$\sum_{i}{\frac{\text{BB}(i) \space \text{mod} \space 4}{4^i}}$

is not algorithmically random, and in particular,

$\Omega \ne \sum_{i}{\frac{\text{BB}(i) \space \text{mod} \space 4}{4^i}}$ .

A couple more observations:

There is a total computable function $\text{CC}:\mathbb{N}\rightarrow\mathbb{N}$ that inverts $\text{BB}$, i.e. $\text{CC}(\text{BB}(n)) = n$ for all $n \in \mathbb{N}$. It works like this: on input $k$, run every TM with $k$ or fewer states for $k$ steps, and return the fewest number of states of any that halted on the last step. For all $k$ there is a $k$-state machine that terminates in exactly $k$ steps, so there will be a smallest one. This implies immediately that Busy Beaver numbers have some computable properties, for example if $f$ is any computable function, then there is another computable function $g$ such that $f(n) = g(\text{BB}(n))$, namely $g(k) = f(\text{CC}(k))$. But also, we can make $f$ and $g$ be the same function: $\text{CC}$ is non-increasing so it has no cycles and at least one fixed point, call the computable function that finds it $\text{CC}^*$. So, $\text{CC}^*(\text{BB}(n)) = \text{CC}^*(n)$. For $\text{CC}^*$ to be non-trivial there need to be at least two fixed points, surely there always are, but if not just redefine $\text{CC}(k) = k$ on some particular $k$ which is not a $\text{BB}$ number.

On the other extreme, I believe there exists a total computable function $g$ such that $\sum{\frac{g(\text{BB}(n))}{2^n}}$ is algorithmically random: $g(k)$ computes the $\text{CC}(k)^{\text{th}}$ bit of $\Omega$ using the assumption that $\text{BB}(\text{CC}(k)) = k$. I think it should work to to count all programs shorter than $\text{CC}(k)$ that terminate in at most $k$ steps (but more care is needed to describe this and prove that it is total).