Sunday Function

So I spent two weeks in Wyoming, participated in a wedding in Louisiana, moved two apartments worth of stuff, visited Louisiana again to get a marriage license for myself (20 days left!), collected data for an experiment demonstrating a new result we're trying to get published quickly (hot topic, lots of competition), and so forth. Blogging is fun, but in terms of priority it has been taking a backseat.

For some reason, I feel the Busy Beaver function might be a good topic for this Sunday...

Ok, consider a Turing machine. I've embedded a video of a guy who's actually built one, but so you'll understand it here's a little background. A Turing machine is a generalized model that mathematicians use to think about computation abstractly. It consists of a tape with a string of symbols printed on it, in this case 0s and 1s. There's a read/write head situated at a fixed position, and the tape runs under it. The read/write head itself has a number associated with it, which is called a state. The state can be any of the numbers {1, 2, 3,... n}, where the specific n is up to you. The read/write head reads the number under it on the tape, and depending on the number on the tape and the state of the head it 1) changes (or leaves alone) the number of the tape, 2) shifts the tape one position to the left or right according to its program for that state and tape value, and 3) the state changes according to whatever rules you've programmed into the machine. The process then repeats. Crucially, one of those programmed instructions needs to cause the machine to stop, otherwise it just runs forever. Here's such a machine in action:

In an abstract mathematical Turing machine the tape is infinite in length, but this physical version gets the gist across pretty well. So to take the simplest possible example, imagine a machine with just one possible state on the read/write head (so n = 1), programmed in the following way. "If the symbol under the head is a 0, write the number 1 to that position, move the tape one position to the right, and halt the program. If the symbol under the head is a 1, halt the program." If you feed it a tape containing an infinite string of 0, the program will print one number 1 and then quit.

Which is about as boring as it's possible for a program to be. But if you let n be higher, then you can make more complicated rule sets and get more interesting behavior. So here's the important part. Imagine you're trying to make a Turing machine that prints out the most possible 1s for a particular n. It's easy to make a machine that prints out an infinite number of 1s, but the rules of the contest state that you're looking for the largest finite n - the machine is required to finish its program.

So the Busy Beaver function is defined as the maximum finite number of 1s that an n-state program can print to the tape. It's generally denoted Σ(n). Here's the first few values:

Now here's the catch. There's provably no algorithm that can determine whether or not an arbitrary program on a Turing machine does in fact halt. In the general case, you just have to run it and see. But of course this means that you can never be sure that a particular Turing machine program doesn't halt unless you cleverly manage to prove it by other means, because it could just be that you haven't let the program run long enough. And there's no general method for doing that. It's possible to extend this argument to show that if you have any computable function f(n), no matter how quickly growing, eventually Σ(n) will catch up and surpass it for high enough n. (In this context, "computable function" means a function whose value you can calculate with an algorithm in a finite number of steps.)

The Σ(n) I've plotted doesn't seem to be growing all that fast. But that's all the values that are known, the next few are not known precisely but we have managed to prove that Σ(5) is greater than 4098 and Σ(6) is known to be no less than a staggering 10^18267. The 6-state Turing machine that prints the most 1s before halting is a very busy beaver indeed.

Tags

More like this

Basics: The Turing Machine (with an interpreter!)
As long as I'm doing all of these basics posts, I thought it would be worth explaining just what a Turing machine is. I frequently talk about things being Turing equivalent, and about effective computing systems, and similar things, which all assume you have some clue of what a Turing machine is.…
Quantum Computation Complexity: BQP
What started me on this whole complexity theory series was a question in the comments about the difference between quantum computers and classical computers. Taking the broadest possible view, in theory, a quantum computer is a kind of non-deterministic machine - so in the best possible case, a…
Basics: The Halting Problem
Many people would probably say that things like computability and the halting program aren't basics. But I disagree: many of our basic intuitions about numbers and the things that we can do with them are actually deeply connected with the limits of computation. This connection of intuition with…
Ω: my favorite strange number
Ω is my own personal favorite transcendental number. Ω isn't really a specific number, but rather a family of related numbers with bizzare properties. It's the one real transcendental number that I know of that comes from the theory of computation, that is important, and that expresses meaningful…

Generally, when I'm explaining Busy Beaver I use the slightly different normalization that just cares about how many steps a machine can run and then halt. This is more intuitive than the number of 1s printed and it is more immediately obvious why the function grows too fast to be computable.

And if anybody wants to bring their PC to its knees, they can try programming it up on vturing.exe.

(Note: be careful with which vturing.exe you get. I hear there are some recent versions running around with viruses in them. I've had my copy since Windows 95 days and I believe it to be clean. There is also a more recent attempt on sourceforge.net by a different author)

By GrayGaffer (not verified) on 15 Aug 2010 #permalink

Perhaps it isn't necessarily the case that no function grows faster than sigma(n), but rather that no function can be *proved* to grow faster than it.