User blog:LittlePeng9/Hard-coding long binary strings

Today I have discovered a way of hard-coding binary strings into Turing machines with asymptotically fewer states. More precisely, I've found the following:


 * For any string of \(2^k\cdot l\) bits, there is a Turing machine with three colors (0, 1 and blank) and \(2\cdot 2^k+k+4\cdot 2^l\) states which, on blank input, writes that string of bits and halts with its head on the first character of the string.

By simulating a three-color Turing machine with a two-color one and adding a few more steps to take care of deciphering the string, we can show the following (I don't bother with establishing the constants):


 * For any \(l\) and large enough \(k\) (depending on \(l\)), for any string of \(2^k\cdot l\) there is a Turing machine with at most \(2^k\) states which, on blank input, halts with its head at the beginning of this string written on the tape.

Application
The idea occured to me when we were discussing something along the lines of this on IRC. Using the above result, we can finally compare the two functions: \(BB(n)\) eventually dominates \(BB_C(n)\).

To see why this is the case, we have to take some Turing machine which is an interpreter of C. Let's take such a Turing machine which, as an input, takes the ASCII code of some program written in C with the read-write head positioned at the leftmost bit of the code, and as an output prints a block of ones of length given by the program's output (we don't care about non-number outputs). Let's say this TM has \(s\) states.

Consider some large \(k\). For any C code of length at most \(3\cdot 2^k\), hence with ASCII code's length at most \(24\cdot 2^k\), there is a TM with at most \(2^k\) states which halts after having written that code (the result above with \(l=24\)). Let's create now a Turing machine with \(2^k+s\) states which first writes this string and then applies the interpreter like in the above paragraph. The output of this TM has as many ones as the C program returns. This way we quickly establish an inequality \(BB(2^k+s)\geq BB_C(3\cdot 2^k)\).

Finally, for large \(n\), there is an intger \(k\) such that \(2^k+s\leq n\leq 3\cdot 2^k\). Since both \(BB\) and \(BB_C\) are nondecreasing, \(BB(n)\geq BB(2^k+s)\geq BB_C(3\cdot 2^k)\geq BB_C(n)\).

Proof of the result
Here is a proof-of-concept Turing machine. The string is encoded using the last characters in lines 15-22. Later I will add a general description which works for any \(k,l\).