Pascal, you inspired me to dig a little more into this TM! I also found it hard to characterize the behavior in a concise way, but here is the best analysis I have been able to find so far:
A(a, b, c, d) ... = 0^inf <A 1 0^a 2 333^b 1 0^c 2 333^d ...
A(2k+1, b, c, d) -> A(3k, b+1, c, d)
A(2k, b+1, c+2, d) -> A(3k+1, b+2, c, d)
A(2k, b+1, 1, d) -> A(3k+2, 0, 3b+1, d+1)
A(2k, 0, c, d) -> A(3k+1, 0, 0, 0) 0^c 2 3^3d
A(2k, b+1, 0, 0) 00 -> A(3k+2, 0, 3b+2, 0) 121
A(2k, b+1, 0, 0) 1 -> A(3k+2, 0, 3b+2, 0) 12
A(2k, b+1, 0, 0) 2 -> A(3k+2, 0, 3b+2, 0) 14
A(2k, b+1, 0, d+1) 121 -> A(3k+2, 0, 3b+3, 0) 1 0^3d+2 212
A(2k, b+1, 0, d+1) 122 -> A(3k+2, 0, 3b+3, 0) 1 0^3d+2 214
A(2k, b+1, 0, d+1) 14 -> Halt!
Start (at step 16): A(1, 0, 0, 0) 0^inf = 0^inf <A 10212 0^inf
Some notes are in order here:
- By (A(2k, b+1, 0, 0) 00 -> A(3k+2, 0, 3b+2, 0) 121) I mean that if the first two symbols after the A() expression (where the ... are listed in the definition) are 00, then replace those with 121 (in addition to adjusting the A() parameters).
- These rules are NOT exhaustive, they do not include rules for situations that could (in theory) occur like (A(2k, b+1, 0, d+1) 123) or (A(2k, b+1, 0, 0) 02), etc. However, none of these occur in practice while simulating from a blank tape. I don't think an exhaustive list is possible as the (A(2k, b+1, 0, d+1) 123) case would lead to much more complicated behavior.
- In practice, while using these rules, you only need to keep track of the nearest 3 symbols on the right (since no rule looks at more than 3 symbols on the right and they all strictly increase the number of symbols on the right). Again, this is specific to the trajectory starting from a blank tape, from an arbitrary starting point, I don't think any such restriction is possible in general
Starting at (
A(1, 0, 0, 0)) it takes 107,994 iterations to halt! The last config before halting is (
A(~10^19_016.69, 27, 0, 1) 14 ...).
If you break down the iterations by which rule they use we see:
54143 (2k+1, b, c, d)
53415 (2k, b+1, c+2, d)
221 (2k, 0, c, d)
60 (2k, b+1, 0, 0) 2
54 (2k, b+1, 0, 0) 00
48 (2k, b+1, 1, d)
47 (2k, b+1, 0, 0) 1
3 (2k, b+1, 0, d+1) 122
2 (2k, b+1, 0, d+1) 121
1 (2k, b+1, 0, d+1) 14
The overwhelming majority of iterations are spent dealing with the situation where c is large. Specifically, this TM has one triumphant moment where c grows to a maximum of 60,002.
If we focus only on this behavior for large c, we see it's a much simpler second-level Collatz-like behavior:
A(2k+1, b, c, d) -> A(3k, b+1, c, d)
A(2k, b+1, c+2, d) -> A(3k+1, b+2, c, d)
So, we are iterating the Collatz-like function
2k+1 -> 3k
2k -> 3k+1
incrementing b on each iteration and reducing c by 2 every time we follow the even rule. This leads to growth approximately like:
A(a, b, c, d) -> A(~(3/2)^c a, ~b+c, 0 or 1, d)
That is to say, we will iterate approximately c times, each time increasing a by about 3/2 and b by 1 until c is less than 2. At this point there are several possible rules each of which lead to remarkably similar configurations:
A(2k, b+1, 1, d ) -> A(3k+2, 0, 3b+1, d+1)
A(2k, b+1, 0, 0 ) 00 -> A(3k+2, 0, 3b+2, 0) 121
A(2k, b+1, 0, 0 ) 1 -> A(3k+2, 0, 3b+2, 0) 12
A(2k, b+1, 0, 0 ) 2 -> A(3k+2, 0, 3b+2, 0) 14
A(2k, b+1, 0, d+1) 121 -> A(3k+2, 0, 3b+3, 0) 1 0^3d+2 212
A(2k, b+1, 0, d+1) 122 -> A(3k+2, 0, 3b+3, 0) 1 0^3d+2 214
And here's where the interesting bit happens. If 3k+2 is even then we apply
A(2k, 0, c, d) -> A(3k+1, 0, 0, 0) 0^c 2 3^3d
and c gets reset to 0 ending the big-c fun. But if 3k+2 is odd then we apply
A(2k+1, b, c, d) -> A(3k, b+1, c, d)
And we start over again with a c value ~3x bigger than the previous run. The secret to how this TM runs for so long is basically that it eventually gets lucky and hits the following sequence:
553 A( 2.799e+97, 0, 0, 0) 000
558 A( 2.126e+98, 0, 11, 0) 121
569 A( 1.839e+100, 0, 28, 1) 121
600 A( 5.289e+105, 0, 90, 0) 100
684 A( 3.274e+120, 0, 248, 0) 120
931 A( 1.022e+164, 0, 737, 0) 122
1_683 A( 2.693e+296, 0, 2_251, 1) 122
3_912 A( ~10^688.93760, 0, 6_682, 2) 122
10_599 A(~10^1_866.4598, 0, 20_058, 0) 100
30_601 A(~10^5_388.6372, 0, 60_002, 0) 120
90_837 A(~10^15_995.670, 0, 180_704, 0) 122
90_838 A(~10^15_995.846, 0, 0, 0) 000
That is, it lands on an odd number 9 times (each time increasing c roughly 3x) before hitting the first even (and thus resetting c). This single lucky streak takes the tape size from 10^98 to 10^16k. The TM hits a couple more lucky streaks later:
91_124 A(~10^16_046.20849, 0, 0, 0) 200
91_128 A(~10^16_046.91285, 0, 8, 0) 140
91_138 A(~10^16_048.67376, 0, 26, 0) 124
91_161 A(~10^16_052.72386, 0, 65, 0) 122
91_226 A(~10^16_064.16979, 0, 190, 1) 122
91_434 A(~10^16_100.79678, 0, 621, 0) 100
92_054 A(~10^16_209.97336, 0, 1_855, 1) 100
93_925 A(~10^16_539.44010, 0, 5_608, 2) 100
93_926 A(~10^16_539.61619, 0, 0, 0) 000
and
94_881 A(~10^16_707.78335, 0, 0, 0) 000
94_885 A(~10^16_708.48771, 0, 8, 0) 121
94_896 A(~10^16_710.42472, 0, 29, 0) 122
94_930 A(~10^16_716.41182, 0, 97, 1) 122
95_024 A(~10^16_732.96440, 0, 277, 2) 122
95_328 A(~10^16_786.49614, 0, 907, 3) 122
96_223 A(~10^16_944.09782, 0, 2_680, 4) 122
98_912 A(~10^17_417.60721, 0, 8_064, 0) 100
106_991 A(~10^18_840.24849, 0, 24_233, 0) 120
106_992 A(~10^18_840.42458, 0, 0, 0) 000
but they aren't able to make nearly as much impact.
Finally, the TM finds it's way to the halting transition shortly thereafter:
107_954 A(~10^19_009.82438, 0, 0, 0) 200
107_957 A(~10^19_010.35265, 0, 5, 0) 140
107_966 A(~10^19_011.93747, 0, 22, 1) 140
107_993 A(~10^19_016.69194, 27, 0, 1) 140
Note: This TM has to follow a narrow path in order to halt, specifically, it must apply the following transitions in order:
A(2k, 0, c+1, d) -> A(3k+1, 0, 0, 0) 0^c+1 2 3^3d
A(2k, 0, 0, 0) -> A(3k+1, 0, 0, 0) 2
A(2k, b+1, 0, 0) 2 -> A(3k+2, 0, 3b+2, 0) 14
A(2k, b+1, 1, d) -> A(3k+2, 0, 3b+1, d+1)A(2k, b+1, 0, d+1) 14 -> Halt!
applying only a very limited set of transitions between each of these or else it falls off of the path and must restart eventually.
PS: My rules are basically a superset of Pascal's. Specifically, Pascal's rules (a-f) correspond to mine in this way:
(a) A(2k+1, b, c, d) -> A(3k, b+1, c, d)
(b) A(2k, 0, c, d) -> A(3k+1, 0, 0, 0) 0^c 2 3^3d (When c = 0)
(c) A(2k, b+1, 0, 0) 2 -> A(3k+2, 0, 3b+2, 0) 14
(d) A(2k, b+1, 0, 0) 00 -> A(3k+2, 0, 3b+2, 0) 121
(e) A(2k, b+1, c+2, d) -> A(3k+1, b+2, c, d)
(f) A(2k, b+1, 1, d) -> A(3k+2, 0, 3b+1, d+1)