167

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.

Qiaochu Yuan
  • 419,620
  • 13
    This seems like it might well depend sensitively on the details of your machine setup. – Chris Eagle Jan 07 '13 at 00:01
  • So I'm not sure what you mean by that. "Turing machine," as far as I'm aware, picks out a unique model of computation, and there's a unique thing I mean by "step" in this model of computation. – Qiaochu Yuan Jan 07 '13 at 00:24
  • 10
    Some discussion on this question: http://www.scottaaronson.com/blog/?p=46 – Dan Brumleve Jan 07 '13 at 00:44
  • 1
    I mean that I fear this question will turn out to be uninteresting, if it does indeed turn out that the answer changes with trivial tweaks to your machine definition: for example, whether writing a new character and then moving counts as one step or two, and whether the machine is allowed to move any set distance as a single step, or is restricted to moving one character in a step. – Chris Eagle Jan 07 '13 at 00:44
  • 3
    @Chris: okay. Assume that I have chosen an interesting setup. – Qiaochu Yuan Jan 07 '13 at 00:51
  • 5
    A variation: can it be shown that $\text{BB}(n)$ is composite infinitely often? This version is seemingly less sensitive to the encoding. – Dan Brumleve Jan 07 '13 at 04:02
  • 4
    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. – Ed Pegg Feb 26 '13 at 15:51
  • 7
  • BB(1) could be infinity, because if you have 0 as the value of all of the elements, and your 1-state Turing machine just goes through all of them changing 0's to 1's, the wouldn't it go on forever? If you could get any n-state Turing machine to repeat, then wouldn't BB(n) always be infinity? – Jason Chen Apr 27 '14 at 18:46
  • When people ask questions like that I always say to use the original definition (in this case Turing 1937) to at least dispense with what is likely an uninteresting or even inconsequential question, as well as actually making sure your definition retains the properties of the original definition. – Charlie Volkstorf May 21 '14 at 09:37
  • 1
    @JasonChen: BB(x) gives the largest time taken to halt. If something repeats, then it doesn't halt. – Fengyang Wang Oct 03 '14 at 21:06
  • Given any fixed $n$, the number $\text{BB}(n)$ is uniquely determined by the sequence $(\text{BB}(n)\text{ mod }2,\text{BB}(n)\text{ mod }3,\text{BB}(n)\text{ mod }4,\ldots,\text{BB}(n)\text{ mod }m,\ldots)$ of residues. Would there be a contradiction if every residue $\text{BB}(n)\text{ mod }m$ were computable? In other words, is $\text{BB}(n)$ computable from this sequence or just uniquely determined by it? – Jasha Feb 05 '15 at 01:57
  • 2
    @Jasha: no contradiction; you'd still have to run infinitely many computations to compute $BB(n)$ this way. – Qiaochu Yuan Feb 05 '15 at 01:59
  • How do you determine whether a statement is a "property of the busy beaver numbers" or not? –  Jun 21 '15 at 18:16
  • 1
    @user41404: a property of the busy beaver numbers is a function of the form $n \mapsto f(BB(n))$ where $f$ is a Boolean-valued function. For example, whether $BB(n)$ is even or odd. ($f$ itself should probably be computable.) – Qiaochu Yuan Jun 21 '15 at 18:36
  • @ARi Certainly not any - if you apply a constant function, result will clearly be computable. – Wojowu Dec 30 '15 at 17:47
  • Given HALT a TM suffixes 1 to the first string 0 zero to the second and repeats. If we call this function X(n) it is incomputable but you can compute X(n) Mod 2. The BB(n) can also be generated by a TM given HALT...there is nothing which suggests it wont have computable properties... In fact it may have infinitely many... and since the property you quote is a many one function...it will not be able to compute HALT even if it is not computable itself – ARi Dec 30 '15 at 18:11

1 Answers1

11

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).

Dan Brumleve
  • 17,796