by tromp · 4y ago · 0 comments
Instead of Turing machines, one can also take the lambda calculus as model of computation. Sequence A333479 in the Online Encyclopedia of Integer Sequences [1] shows the Busy Beaver for binary lambda calculus as the maximum normal form size of any closed lambda term of size n bits. Using bits instead of states gives a more fine-grained scale of un-computability.
The latest BB(6) result suggests a challenge for functional programmers: what's the smallest n for which A333479(n) can be shown at least 10^10^10^10^10^10^10^10^10^10^10^10^10^10^10 ?
I'm hoping it can be under 60 bits...
Having said all that, your encoding is a bit wasteful, so let's optimize. ;)
First, there's really no need for the encoded states to end on bit boundaries. To give an example, to encode 9 numbers between 0 and 9 (inclusive), you don't need 9*ceil(log2(10))=36 bits, you only need ceil(9*log2(10))=30 bits by treating the digits as a large decimal number and converting that to binary.
Second, if you're going to halt anyway, there's no need (at least for the BB problem) to write a symbol and move the tape on the last transition, so we can simply treat that as an alternative to encoding a transition.
Armed with both of those, the size of an encoded machine goes down to ceil(2 * 6 * log2(2 * 2 * 6 + 1)) = 56 bits. (In general for n states and k symbols, ceil(k * n * log2(2 * k * n + 1)). The 2 is for the directions, the + 1 is the halting transition.)
> so we can simply treat that as an alternative to encoding a transition
That's fine for the shift number but a lot of BB research concerns the number of 1s written rather than the number of steps taken, and there it matters. They prefer to use a single model for all variants.
EDIT: Oh, perhaps there's multiple common definitions for Turing machine busy beaver? Doing some searches, I've seen both (1) number of steps, and (2) number of 1s on the tape when it halts. Perhaps the second notion is more directly comparable to maximum normal form sizes of lambda terms?
Does it make sense to compare BB(n) against A333479(n)?
It seems like A333479(n) grows much faster... my mind is jumping to the classic "problem" of being able to construct a lambda term of size O(2^n) using only O(n) steps. For a Turing machine, writing a symbol requires at least one step. But for lambda, you can generate large terms very quickly.
(Of course, this isn't a fundamental issue with lambda calculus, and there are other notions of size that are more "realistic". But focusing on just lambda calculus normal form sizes, how do we resolve this?)
No, for proper comparison both should measure the argument size in bits. That's why my top comment talks about the number of bits needed to encode an n-state TM in a straightforward manner.
So compare BB(n) with A333479(n*2*(2+ceil(log(n+1)))).
We have A333479(53) exceeding an exponential tower of 256 2s [1].
We also have A333479(114) exceeding Graham's number, which would require a 10-state TM to remain competitive.
[1] https://mathoverflow.net/questions/353514/whats-the-smallest...