User blog:LittlePeng9/Random Turing machines

!Ikosarakt1 inspired me to get back to TM programming.

These machines are designed to work on this simulator.

Pólya conjecture test
Challenge - prove this machine halts ; Tape consists of three parts - prime, work value and function value ; Pólya conjecture states that so called summatory Liouville function is everywhere positive ; This is equivalent to 'function value is always non-zero' in my machine ; Number of 1's in function space is equal to -L(n)+1 ; These are setup states. They are here to make tape ready to work 0 _ 1 l 1 1 _ _ l 2 2 _ 1 l 3 3 _ 1 l 4 4 _ 1 l 5 5 _ _ l 6 6 _ 1 l 7 7 _ 1 r x0 ; This is 'get to work' state. It simply moves from leftmost symbol to work space x0 1 1 r x0 x0 x _ r x0 x0 _ _ l w1 ; These are working states. They check if work value is divisible by prime ; w states mark p symbols in work value (where p is value of prime) w1 1 x r w2 w1 x x l w1 w3 1 x l w0 w2 _ _ r w3 w3 _ _ l s0 ; If p doesn't divide work value, it skips to s w0 _ _ l w1 w0 * * l w0 w2 * * r w2 w3 * * r w3 w1 _ _ r c0 ; If we finished marking p, we check if it's end of work value c0 _ _ r c1 c0 * * r c0 c0 x 1 r c0 c1 _ p l d0 ; if it does, skip to d c1 p _ l d0 c1 1 1 l c2 c2 x y l w0 ; If it isn't, return to w c1 * * r c1 ; Division - we divide work value by p and we leave 'p' on tape, marking prime factor d0 x y l d1 d0 y y l d1 d1 x y r d2 d1 y y l d1 d2 p p l d3 d2 _ _ l d3 d2 * * r d2 d3 y _ l d0 d1 _ _ r d4 d4 y 1 r d4 d4 _ _ l d5 d5 1 1 l d6 d6 1 1 l w0 d6 _ _ r a0 ; This simply increments prime s0 x 1 l s0 s0 y 1 l s0 s0 _ _ l s1 s1 x 1 l s1 s1 1 1 l s1 s1 _ 1 r x0 ; Crucial part - depending on number of prime factors we increment or decrement function value ; It also sets work value to next number a0 * * r a1 a1 _ 1 r a1 a1 p 1 r a2 a2 _ 1 r a2 a2 p 1 r a1 a1 1 _ r a3 a3 _ _ r halt ; If function value reaches 0, Pólya conjecture is false, and machine halts a3 1 1 l r0 a2 1 _ r a4 a4 1 1 r a4 a4 _ 1 r a5 a5 _ 1 l r0 ; Return - after changing function value it starts dividing new number r0 1 1 l r0 r0 _ _ l r1 r1 1 1 l r1 r1 _ _ l r2 r2 1 1 l r3 r3 1 1 l r4 r4 1 x l r4 r4 _ _ r x0

Restricted Knuth up-arrow notation
Example input - x^^^x^^^^xx It corresponds to \(2\uparrow 2 \uparrow \uparrow 3\)

Question - how many states we need to add in order to compute Ackermann function? I found 7 is enough ; This machine computes restricted Knuth up-arrow notation ; It is able to compute 2^(a)2^(b)...2^(n)x, where ^(n) means n up-arrows and x is natural ; Setting input - one up arrow means addition, two mean multiplication, three exponentiation etc. ; Every '2' in notation is represented by ONE 'x'. Rightmost number must have one less 'x' than it represents. 0 * * r 0 ; State 0 simply moves to rightmost non-blank cell 0 _ _ l 1 ; State 1 searches for rightmost arrow 1 x x l 1 1 ^ x l 1a 1 _ _ r halt ; If there are no arrows, halt 1a x x r 1 ; If there is only one arrow, add two numbers and search for new arrow 1a ^ ^ r 1b 1b * * r 2 2 x _ l 3 ; Otherwise, we replace 2^(n)x with 2^(n-1)2^(n)x-1 3 x x l 3 3 ^ y r 4 4 * * r 4 4 x x r 5 5 ^ ^ r 5 5 _ ^ r 6 6 x _ r 7 6 _ _ l 11 ; At this point I use error which happens when last number is 2 7 x x r 7 7 _ x l 8 8 * * l 8 8 y y l 9 9 y y l 9 9 ^ y r 4 9 x x r 10 10 y ^ r 10 10 _ ^ r 0 10 * * r 10 11 x _ l 12 ; If last number is 2, no matter how many arrows there are we collapse to 4 11 ^ _ l 11 12 * _ l 12 12 x x r 13 13 _ x r 14 14 _ x l 1

Two color restricted Knuth up-arrow notation
Same rules as above - strings of x's and ^'s replace with strings of 1's with blanks inbetween. Output isn't decreased by 1 in here

Example input - 1 111 1 1111 11 It corresponds to \(2\uparrow 2 \uparrow \uparrow 3\) 0 1 1 r 0 0 _ _ r 1 1 1 1 r 0 1 _ _ l 2 2 _ _ l 2 2 1 1 l 3 3 _ 1 r c0 3 1 1 l 4 c0 1 _ l c0 c0 _ 1 r c1 c1 _ 1 r 1 4 1 1 l 4 4 _ 1 l 5a 5a _ _ r halt 5a 1 _ l 5b 5b 1 1 r 5c 5b _ 1 r a0 5c _ _ r 6 6 1 _ r 7 7 1 _ l 8 8 _ _ l 9 9 _ _ l 9 9 1 _ r 10 10 _ 1 r 11 11 1 1 r 11 11 _ _ r 12 12 1 1 r 12 12 _ 1 r 13 13 1 _ r 14 13 _ _ r 13 14 1 1 r 14 14 _ 1 l 15 15 1 1 l 15 15 _ _ l 16 16 1 1 l 16 16 _ _ l 17 17 1 1 l 17 17 _ _ l 18 18 _ _ r x0 18 1 1 r 9 x0 _ 1 r x1 x1 1 1 r x1 x1 _ 1 l x2 x2 1 _ r x3 x3 1 1 r x4 x4 1 _ r x5 x5 1 1 r x5 x5 _ 1 r x6 x6 1 1 r x7 x7 1 _ r x8 x7 _ _ r x9 x8 _ 1 r x9 x8 1 1 r x8 x9 _ 1 r 2 a0 _ 1 r a1 a1 1 1 r a1 a1 _ _ l a2 a2 1 _ l a3 a3 1 _ l 2

Two color Collatz conjecture tester
Works for one given number only ; This machine computes so called hailstone sequence for a number written in unary ; This machine is not checking Collatz conjecture. It tests it for only one given number ; First, machine checks if number is even or odd 0 1 1 r 1 1 1 1 r 0 0 _ _ l 00 1 _ _ l 10 ; If number is even, we divide it by 2 00 1 _ l 01 00 _ _ l r 01 1 _ l 02 02 1 1 l 02 02 _ _ l 03 03 1 1 l 03 03 _ 1 r 04 04 1 1 r 04 04 _ _ r 0 r 1 1 l r r _ _ r 0 ; If it is odd, we first check if it is 1 10 1 _ l x x _ _ l y y _ _ r halt ; If it isn't, we replace n with 3*n+1 10 _ 1 l r x 1 1 l 11 y 1 1 l 12 11 1 1 l 11 11 _ _ l 12 12 _ 1 l 13 12 1 1 l 12 13 _ 1 l 14 14 _ 1 r 15 15 1 1 r 15 15 _ _ r 16 16 _ _ l 10 16 1 1 r 16

Improved version
;First, check if number is odd or even 0 1 1 r 1 0 _ _ l 6 1 1 1 r 0 1 _ _ l 2 ;If it's odd, multiply it by 3 and add 1 2 1 _ r 3 2 _ 1 r 1 3 1 1 r 3 3 _ 1 r 4 4 _ 1 l 5 4 1 _ l 11 ;When working with odd numbers this transition isn't used, but it's used for even ones 5 1 1 l 5 5 _ 1 l 2 ;If it's even we divide it by 2 6 1 _ l 7 6 _ _ l 4 7 1 _ l 8 8 1 1 l 8 8 _ _ l 9 9 1 1 l 9 9 _ 1 r 10 10 1 1 r 10 10 _ _ r 0 ;If result of division is 1, halt 11 _ 1 r halt 11 1 _ l 5

Binary version
This machine isn't my construction, I've seen it in one cellular automaton (this one. I also made improved version of this automaton, if anyone is interested) and recreated it as simple TM. Input is binary number written backwards. ;Delete trailing zeroes (division by 2) 0 0 _ r 0 0 1 0 r 1 ;Check if number is 1 1 1 1 r 2 1 0 0 r 3 1 _ 1 r halt ;n->3n+1 in linear time 2 1 1 r 2 2 * 0 r 3 3 1 0 r 2 3 * 1 r 4 4 0 0 r 4 4 1 1 r 3 4 _ _ l 5 5 * * l 5 5 _ _ r 0

3-color version
For every natural number it returns \(\lfloor \sqrt{n} \rfloor \) ; For every nonnegative integer, machine computes floor(sqrt(n)) ; It uses fact that n^2=1+3+5+...+(2n-1) ; Short setup ; On the left there is current addend, now it is 1 0 1 1 l 0 0 _ _ l 1 1 _ 1 r 5 ; We mark exactly that many 1's from input as there is in addend 2 _ 1 l 6 2 x x l 2 2 1 x r 3 3 x x r 3 3 _ _ r 4 4 x x r 4 4 1 x l 5 4 _ _ l 8 5 x x l 5 5 _ _ l 2 ; If we used whole addend, we increase it by 2 6 _ 1 r 7 7 1 1 r 7 7 x 1 r 7 7 _ _ l 2 ; If we marked whole input, we remove it, leaving only output 8 x _ l 8 8 _ 1 l 9 ; At this moment, addend is exactly 2n+1, where n is wanted output 9 _ _ l 9 9 x _ l 10 9 1 _ l 10 10 x _ r 11 10 1 _ r 11 10 _ _ r 14 11 _ _ r 11 11 1 1 r 12 12 1 1 r 12 12 _ 1 l 13 13 1 1 l 13 13 _ _ l 9 ; Now there is n+1 left on tape. We remove one 1 and we're done 14 _ _ r 14 14 1 _ r halt

2-color version
Works same way as previous machine, expect for marking. It uses single blank space as end of marked part. Suprisingly, time complexity haven't increased much.

Challenge: I didn't bother to make it work for all integers. Change it. It should be possible with 5 new states 0 1 1 l 1 0 _ _ l halt 1 _ _ l 2 2 _ 1 l 3 3 * _ l 4 4 * 1 l 5 5 * _ l 6 6 * 1 r 7 7 * _ r 8 8 1 1 l 8 8 _ 1 l 9 9 1 _ r 10 9 _ 1 l 14 10 1 1 r 10 10 _ _ r 11 11 1 1 r 11 11 _ 1 r 12 12 1 _ l 13 12 _ _ l 16 13 1 1 l 13 13 _ _ l 8 14 _ 1 r 15 15 1 1 r 15 15 _ _ l 4 16 1 _ l 16 16 _ _ l 17 17 1 1 l 17 17 _ _ l 18 18 1 _ l 19 19 _ _ l 19 19 1 _ l 20 20 _ _ r 24 20 1 _ r 21 21 _ _ r 21 21 1 1 r 22 22 1 1 r 22 22 _ 1 l 23 23 1 1 l 23 23 _ _ l 19 24 _ _ r 24 24 1 _ r halt

Arbitrary root calculator
Edit: machine fixed. It works now for every b>0 ; Input form - (a) (b) ; Output form - (floor(root(b,a))) 0 1 1 r 0 0 _ x r s0 ; This is my power-taking machine. With input (n) (m) it outputs (m^n) 0a 1 _ r 1 1 1 _ r 20 1 _ _ r 10 1 x _ r 11 2 * * r 2 2 _ _ r 3 3 1 _ r 4 3 x _ l 8 4 1 1 r 4 4 _ x r 5 4 x x r 5 5 1 1 r 5 5 _ 1 l 6 6 1 1 l 6 6 * * l 7 7 1 1 l 7 7 _ 1 r 3 8 1 1 l 8 8 x x l 8 8 _ x l 9 9 1 1 l 8 9 _ _ r 10 10 x _ r 1 10 1 1 l 15 11 1 1 r 11 11 x _ r 11 11 _ _ l 12 12 1 1 l 12 12 _ _ r m0 ; Multiplication subroutine m0 1 _ r m1 m0 _ _ r m9 m1 1 1 r m1 m1 _ _ r m2 m2 1 _ r m3 m2 _ _ l m7 m3 1 1 r m3 m3 _ _ r m4 m4 1 1 r m4 m4 _ 1 l m5 m5 1 1 l m5 m5 _ _ l m6 m6 1 1 l m6 m6 _ 1 r m2 m7 1 1 l m7 m7 _ _ l m8 m8 1 1 l m8 m8 _ _ r m0 m9 1 _ r m9 m9 _ 1 r 13 13 1 1 r 13 13 _ _ l 14 14 1 _ l 15 15 1 1 l 15 15 _ 1 l 16 16 1 1 r 17 16 _ _ r 13 16 x _ r 18 17 1 _ l 12 18 1 1 r 18 18 _ _ l 19 19 1 _ l c1 20 * * r 2 20 _ x r 3 ; When machine starts, we add two 1's at the end ; As this number changes, we call it c s0 1 1 r s0 s0 _ _ r s1 s1 _ 1 r s2 s1 1 1 l s3 s2 _ 1 l s3 s3 * * l s3 s3 x _ r d0 ; We copy b and c d0 1 x r d1 d0 _ _ r d5 d1 1 1 r d1 d1 _ _ r d2 d2 1 1 r d2 d2 _ _ r d3 d3 _ 1 l d4 d3 1 1 r d3 d4 * * l d4 d4 x x r d0 d5 1 x r d6 d5 _ x r 0a d6 1 1 r d6 d6 _ _ r d7 d7 1 1 r d7 d7 _ _ r d8 d8 _ 1 l d9 d8 1 1 r d8 d9 * * l d9 d9 x x r d5 ; We compare a with c^b ; If c^b>a, then c-1 is result c0 1 * r c0 c0 x x r c5 c0 _ _ l c1 c1 1 _ l c2 c1 _ 1 l f0 c2 * * l c2 c2 _ * l c3 c3 1 * l c3 c3 _ 1 r c4 c3 x x l c2 c4 1 _ r c5 c4 _ _ l h0 c5 1 * r c5 c5 x x r c5 c5 _ _ r c0 ; Otherwise we increase c f0 x 1 l f0 f0 _ _ l f1 f1 x 1 l f0 f1 1 1 l f1 f1 _ 1 l f2 f2 1 1 l f2 f2 _ _ r f3 f3 1 _ r 0 ; We delete a, b, remains of c^b and leave c-1 h0 1 _ l h0 h0 _ _ r h1 h1 _ _ r h1 h1 x _ r h2 h2 x _ r h2 h2 _ _ r h3 h3 x 1 r h3 h3 _ _ r h4 h4 1 _ r h4 h4 _ _ l h5 h5 * * l h5 h5 1 _ l halt

Binary logarithm calculator
It works only for powers of 2. Even now it is very inefficient. Calculates \(log_2(1024)\) in 1082294 steps. 0 1 1 r 2 1 _ 1 r 2 2 _ _ r 2 2 1 _ r 10 3 _ _ r 3 3 1 _ r 4 4 1 _ r 5 4 _ _ l 9 5 1 1 r 5 5 _ _ r 6 6 1 1 r 6 6 _ 1 l 7 7 1 1 l 7 7 _ _ l 8 8 1 1 l 8 8 _ _ r 3 9 _ _ l 9 9 1 1 r 1 10 1 _ r 5 10 _ _ l 11 11 _ _ l 11 11 1 1 r halt

Improved version
This version computes \(\lceil log_2(n)\rceil\) for any n and has fewer states at the same time. It's also faster, computes \(log_2(1024)\) in 703277 steps. 0 1 _ r 4 0 _ _ l 3 1 1 1 l 1 1 _ 1 r 2 2 1 1 r 2 2 _ _ r 0 3 1 1 l 3 3 _ _ l 1 4 1 1 r 4 4 _ _ l 5 5 1 _ l 6 5 _ 1 l 7 6 1 1 l 6 6 _ 1 r 0 7 1 1 l 3 7 _ _ r 8 8 1 _ l halt

Prime factorization
I posted it in Turing golf, here is commented version ; Number we currently try to divide is n. Current prime is p ; Setup 0 1 1 l 1 1 _ _ l 2 2 _ 1 l 3 3 _ 1 r 4 4 1 1 r 4 4 _ _ l 5 ; Trying to add current prime to remaining number 5 x x l 5 5 1 x r 6 5 _ _ r 9 ; If succesful, we check if we filled number 6 x x r 6 6 _ _ r 7 7 x x r 7 7 y y r 7 7 1 x l 8 7 _ _ l 27 ; If unsuccesful, number isn't divisible by prime, so we increase prime 8 x x l 8 8 y y l 8 8 _ _ l 5 ; We have to mark number can fit another copy of prime 9 x 1 r 9 9 _ _ r 10 10 x x r 10 10 y y r 10 10 1 1 l 11 10 _ _ l 12 ; If we filled number, we can divide number by prime 11 x y l 8 ; It's important that number of y's is equal to n/p 12 x 1 l 13 13 y 1 l 13 13 1 1 l 13 13 x 1 r 14 13 _ y l 16 ; We finish dividing 14 1 1 r 14 14 _ _ l 15 15 1 _ l 13 ; Now p is prime factor of n, so we copy it to far left of tape 16 1 x l 17 16 x x l 16 16 _ _ l 21 17 1 1 l 17 17 _ _ l 18 18 1 1 l 17 18 _ x r 20 18 x x l 19 19 x x l 19 19 _ x r 20 20 * * r 20 20 y y l 16 ; We make tape ready for another division 21 * * l 21 21 x x l 22 22 x x l 22 22 _ _ r 23 23 x 1 r 23 23 * * r 23 23 y _ r 24 ; Here is check-if-n-is-1 subroutine 24 1 1 r 25 25 1 1 l 26 25 _ _ l 31 ; If it is, we have to finish job 26 1 1 l 4 ; Otherwise, we try to divide by same prime ; Here we have to increase prime ; At the same moment we move all known factors to the left 27 * 1 l 27 27 _ y l 28 28 * 1 l 28 28 _ 1 l 29 29 1 _ l 28 29 _ _ r 30 30 * * r 30 30 y _ l 5 ; And we repeat with new prime ; n is 1, so we delete it. We also delete current prime 31 1 _ l 31 31 _ _ l 32 32 1 _ l 32 32 _ _ l halt I used same principle as in Pólya conjecture checker

Divisor sum calculator
Again, just commented version as in Turing golf ; n is our number (input), d is current divisor to check ; Setup 0 1 1 l 1 1 _ _ l 2 2 _ 1 r 3 3 _ _ l 4 ; We try to fit copy of divisor to n 4 x x l 4 4 1 x r 5 4 _ _ r 8 5 x x r 5 5 _ _ r 6 6 x x r 6 6 1 x l 7 6 _ _ l 25 ; If unsuccesful, we must increase divisor by recycling states 18-20 7 x x l 7 7 _ _ l 4 ; If succeded, we check if we filled number 8 x 1 r 8 8 _ _ r 9 9 x x r 9 9 1 1 l 7 ; If we did not, we repeat 9 _ _ l 10 ; Otherwise, we have to copy divisor to far left 10 x 1 l 10 10 _ y l 11 11 1 x l 12 11 x x l 11 11 _ _ l 15 12 1 1 l 12 12 _ _ l 13 13 x x l 13 13 _ x r 14 13 1 1 l 12 14 * * r 14 14 y y l 11 15 * * l 15 15 x x l 16 16 x x l 16 16 _ _ r 17 17 x 1 r 17 17 * * r 17 17 y y l 18 ; We also have to increase divisor, because divisors don't form multiset 18 1 1 l 18 18 x 1 l 18 18 _ 1 l 19 19 1 _ l 18 19 _ _ r 20 20 * * r 20 20 y _ l c0 ; If d>n, then machine won't find any divisors, so we have to check that ; Otherwise, machine would loop to infinity ; This machine is made by Googleaarex, modified by me c0 1 1 l c0 c0 * * r c1 c1 1 x r c2 c1 _ _ r 21 ; If d<=n, we can repeat c2 1 1 r c2 c2 * * r c3 c3 1 1 r c3 c3 * * l c4 c4 1 x l c5 c4 _ x r 26 ; Otherwise, we can halt machine c5 1 1 l c5 c5 * * l c0 ; We must un-mark n and d before continuing 21 * * r 21 21 _ _ l 22 22 x 1 l 22 22 1 1 l 22 22 _ _ l 23 23 x x l 23 23 _ _ r 24 24 x 1 r 24 24 _ _ l 4 ; We must un-mark n before increasing divisor 25 x 1 l 25 25 _ y l 18 ; If we finished looking for divisors, we delete n and d and we add al divisors 26 x x r 26 26 _ _ l 27 27 x _ l 27 27 _ _ l 28 28 1 1 l 28 28 _ _ l 29 29 _ _ r halt 29 1 1 r 30 30 _ 1 r 31 31 1 1 r 31 31 _ _ l 32 32 1 _ l 28

Multiplication
I found out trying to improve Ikosarakt's ideas is kind of fun. Machine doesn't handle a<2 and/or b=0. ; To multiply a by b we write strings of 1's of length a and b and put blank between them ; We remove 1 from a 0 1 _ r 1 1 1 1 r 1 1 _ _ r 2 ; Now we copy b to third string, which at the beginning is empty ; At the same moment, we check if remains of b is one or more 2 _ _ r 2 2 1 _ r 3 3 1 1 r 4 3 _ _ r 9 ; If it is, we must restore b 4 1 1 r 4 4 _ _ r 5 5 1 1 r 5 5 _ 1 l 6 6 1 1 l 6 6 _ _ l 7 7 _ _ l 7 7 1 1 l 8 8 1 1 l 8 8 _ _ r 2 ; Number of blanks between 1st and 3rd string is always b+2 ; We skip first blank and write b+1 ones on tape 9 1 1 r 9 9 _ 1 l 10 10 1 1 l 10 10 _ _ l 11 11 _ 1 l 11 11 1 1 r 12 ; We remove one unneeded 1 12 1 _ l 13 ; We check if remains of a is 1 or not 13 1 1 l 14 14 1 1 l 15 14 _ _ r 16 ; If it is, we are nearly at the end 15 1 1 l 15 15 _ _ r 0 ; Otherwise, we repeat from beginning ; Now tape is 1 (b 1's) (a*(b-1) 1's) ; If we delete leftmost 1 and connect 2nd and 3rd string, we get a*b 16 1 _ r 16 16 _ _ r 17 17 _ _ r 17 17 1 _ r 18 18 1 1 r 18 18 _ 1 l halt

Improved version
I swear! I found this one by accident! I tried to make separated copies of input, but something went wrong 0 1 _ r 1 0 _ _ r 9 1 1 1 r 1 1 _ _ r 2 2 1 _ r 3 2 _ _ l 7 3 1 1 r 3 3 _ _ r 4 4 1 1 r 4 4 _ 1 l 5 5 1 1 l 5 5 _ _ l 6 6 1 1 l 6 6 _ 1 r 2 7 1 1 l 7 7 _ _ l 8 8 1 1 l 8 8 _ _ r 0 9 1 _ r 9 9 _ _ r halt

List multiplication
Guess which Turing golf challenge I'm going to solve with help of this machine. Input format: (a1) (a2)...(an)  (b1) (b2)...(bn) where (m) means string of m 1's. Output: (a1*b1) (a2*b2)...(an*bn) 0 1 _ r 13 0 _ _ r halt 1 1 1 r 1 1 _ _ r 2 2 1 1 r 1 2 _ _ r 14 3 1 1 r 3 3 _ _ r 4 4 1 1 r 3 4 _ _ r 5 5 1 1 r 5 5 _ 1 l 6 6 1 1 l 6 6 _ _ l 7 7 _ _ l 8 8 1 1 l 8 8 _ _ l 9 9 1 1 l 8 9 _ _ l 31 10 1 1 l 10 10 _ _ l 11 10 x x r 15 11 1 1 l 10 11 _ _ r 12 12 _ _ r 0 13 _ x r 2 13 1 1 r 1 14 _ _ r 14 14 1 1 r 3 15 1 1 r 15 15 _ _ r 16 16 1 1 r 15 16 _ _ r 32 17 _ _ r 23 17 1 x r 18 18 1 1 r 18 18 _ _ r 19 19 1 1 r 18 19 _ _ r 20 20 1 1 r 20 20 _ _ r 21 21 1 1 r 21 21 _ 1 l 22 22 * * l 22 22 x _ r 17 23 1 1 r 23 23 _ _ r 24 24 1 1 r 23 24 _ x r m0 m0 1 _ r m1 m0 _ _ r m9 m1 1 1 r m1 m1 _ _ r m2 m2 1 _ r m3 m2 _ _ l m7 m3 1 1 r m3 m3 _ _ r m4 m4 1 1 r m4 m4 _ 1 l m5 m5 1 1 l m5 m5 _ _ l m6 m6 1 1 l m6 m6 _ 1 r m2 m7 1 1 l m7 m7 _ _ l m8 m8 1 1 l m8 m8 _ _ r m0 m9 1 _ r m9 m9 _ 1 r 25 25 1 1 r 25 25 _ _ l 26 26 1 _ l 27 27 1 1 l 27 27 _ 1 r 25 27 x 1 r 28 28 1 1 r 28 28 _ _ l 29 29 1 _ l 30 30 * * l 30 30 x _ r 0 31 _ _ l 31 31 1 1 l 10 31 x x r 32 32 _ _ r 32 32 1 x r 18

Taking number to arbitrary power
Given input (a) (b) calculates b^a

Edit: machine fixed for a<3 0 1 1 l 0a 0 _ _ r 19 0a _ x r 0b 0b 1 _ r 1 1 1 _ r 21 1 _ _ r 10 1 x _ r 11 2 * * r 2 2 _ _ r 3 3 1 _ r 4 3 x _ l 8 4 1 1 r 4 4 _ x r 5 4 x x r 5 5 1 1 r 5 5 _ 1 l 6 6 1 1 l 6 6 * * l 7 7 1 1 l 7 7 _ 1 r 3 8 1 1 l 8 8 x x l 8 8 _ x l 9 9 1 1 l 8 9 _ _ r 10 10 x _ r 1 10 1 1 l 20 11 1 1 r 11 11 x _ r 11 11 _ _ l 12 12 1 1 l 12 12 _ _ r m0 m0 1 _ r m1 m0 _ _ r m9 m1 1 1 r m1 m1 _ _ r m2 m2 1 _ r m3 m2 _ _ l m7 m3 1 1 r m3 m3 _ _ r m4 m4 1 1 r m4 m4 _ 1 l m5 m5 1 1 l m5 m5 _ _ l m6 m6 1 1 l m6 m6 _ 1 r m2 m7 1 1 l m7 m7 _ _ l m8 m8 1 1 l m8 m8 _ _ r m0 m9 1 _ r m9 m9 _ 1 r 13 13 1 1 r 13 13 _ _ l 14 14 1 _ l 15 15 1 1 l 15 15 _ 1 l 16 16 1 1 r 17 16 _ _ r 13 16 x _ r 18 17 1 _ l 12 18 1 _ r halt 19 1 _ r 19 19 _ 1 r halt 20 * * l 20 20 x _ r halt 21 * * r 2 21 _ x r 3

Factorial
We can reduce machine by 2 states, if we allow it to don't handle number 1 (and no else). In second transition we have to replace x0 with 1, so states x will never be used ; First part of setup 0 _ 1 r halt 0 1 1 r x0 1 _ _ l 2 2 _ 1 r 3 3 _ _ r s0 ; We must check if n is 1, if it is, machine runs infinitely x0 _ _ l halt x0 1 1 l x1 x1 1 1 l 1 ; Second part of setup. This is my string duplication machine s0 1 _ r s1 s0 _ _ r 4 s1 1 1 r s1 s1 _ _ r s2 s2 1 1 r s2 s2 _ 1 l s3 s3 1 1 l s3 s3 _ _ l s4 s4 1 1 l s4 s4 _ 1 r s0 ; After duplication we have to delete 1 from second string 4 1 1 r 4 4 _ _ l 5 5 1 _ l 6 5 _ _ l 7 ; If smaller string is 1, we end setup 6 1 1 l 6 6 _ _ r s0 ; Else we duplicate smaller string etc. ; We move left until we find string 11 1 7 _ _ l 8 8 1 1 l 9 8 _ 1 l halt 9 _ _ l 10 10 1 1 l 10 ; This state is also used to move to next multiplication 10 _ _ r m0 ; This is my multiplication machine m0 1 _ r m1 m1 1 1 r m1 m1 _ _ r m2 m2 _ _ r m2 m2 1 _ r m3 m3 1 1 r m4 m3 _ _ r m9 m4 1 1 r m4 m4 _ _ r m5 m5 1 1 r m5 m5 _ 1 l m6 m6 1 1 l m6 m6 _ _ l m7 m7 _ _ l m7 m7 1 1 l m8 m8 1 1 l m8 m8 _ _ r m2 m9 1 1 r m9 m9 _ 1 l m10 m10 1 1 l m10 m10 _ _ l m11 m11 _ 1 l m11 m11 1 1 r m12 m12 1 _ l m13 m13 1 1 l m14 m14 1 1 l m15 m14 _ _ r m16 m15 1 1 l m15 m15 _ _ r m0 m16 1 _ r m16 m16 _ _ r m17 m17 _ _ r m17 m17 1 _ r m18 m18 1 1 r m18 m18 _ 1 l 11 ; We have to move multiplication product to the left 11 1 1 l 11 11 _ _ l 12 12 1 1 l 13 12 _ _ r 14 13 1 1 r 10 ; Now we move to next number and multiply again 13 _ _ r 17 ; If there is no more numbers, we delete setup 14 _ 1 r 15 15 1 1 r 15 15 _ _ l 16 16 1 _ l 11 ; After deleting setup we halt 17 1 _ r halt

How to compute n(3)
This is my try to compute n(3). Here are needed elements and ready machine

String subsequence determiner
I improved Ikosarakt's design, and I think I improved it much. It works for any number of characters, for n characters it uses 5+2*n states, and has simplier input: write sequence we search for and sequence being search space. ; First machine checks what is first symbol on subsequence we search for 0 a _ r 1a 0 b _ r 1b 0 c _ r 1c 0 | _ r 4 ; If we found whole subsequence, we want to mark it ; Next five transitions repeat for every character 1a * * r 1a 1a _ | r 2a ; We search for blank space marking where we finished our search 2a * * r 2a 2a a _ l 3 ; If we find charachter we look for, we return to the beginning 2a _ _ l 6 ; Otherwise, there is no subsequence we need. We clear tape 1b * * r 1b 1b _ | r 2b 2b * * r 2b 2b b _ l 3 2b _ _ l 6 1c * * r 1c 1c _ | r 2c 2c * * r 2c 2c c _ l 3 2c _ _ l 6 3 * * l 3 3 _ _ r 0 ; This transitions looks for beginning of tape. Then we repeat 4 * _ r 4 4 _ _ r 5 5 * _ r 5 5 _ | l halt ; We clear tape, leaving '|' meaning 'subsequence found' 6 * _ l 6 6 _ _ r halt ; We clear tape, leaving nothing Note: this machine uses lemma I found - consider sequences \(a_1a_2...a_n\) and \(b_1b_2...b_m\). Search algorithm is as this: find smallest \(k_1\) such that \(a_1=b_{k_1}\). Now find smallest \(k_2>k_1\) such that \(a_2=b_{k_2}\) etc. We call sequence \(b_{k_1}b_{k_2}...b_{k_n}\) (if it exists) a minimal subsequence. If minimal subsequence exists, it is isomorphic to a, so a is subsequence of b. Lemma states inverse relation holds: if a is subsequence of b, there exists minimal subsequence.

Challenge: prove this lemma

Dividing string into elements to compare
For every n it gives, from given input, substring (n,2n). This is designed for 3 characters: a,b,c. Every character has a replacement - x,y,z, respectively. To add new character, for every transition containing a or x replace them with appropriate character or replacement. 0 * * r 0 0 _ _ r 1 1 _ 1 r 2 2 _ 1 l 3 3 1 1 l 3 3 _ _ l 4 4 * * l 4 4 _ _ r 5 5 a _ r 6a 6a * * r 6a 6a 1 a l 8 6a _ _ r 7a 7a _ 1 l 12 7a 1 a l 8 7a * * r 6a 5 b _ r 6b 6b * * r 6b 6b 1 b l 8 6b _ _ r 7b 7b _ 1 l 12 7b 1 b l 8 7b * * r 6b 5 c _ r 6c 6c * * r 6c 6c 1 c l 8 6c _ _ r 7c 7c _ 1 l 12 7c 1 c l 8 7c * * r 6c 8 * * l 8 8 _ _ l 9' 8 x x l 9 8 y y l 9 8 z z l 9 9 _ _ r 10 9 x x r 10 9 y y r 10 9 z z r 10 9 * * l 8 9' _ _ r 10 9' x _ l 21 9' y _ l 21 9' z _ l 21 9' * * l 8 10 _ _ r 11 10 x x r 11 10 y y r 11 10 z z r 11 11 a x r 6a 11 b y r 6b 11 c z r 6c 12 1 1 l 12 12 _ _ l 13 13 x x l 13 13 y y l 13 13 z z l 13 13 a x r 14 13 b y r 14 13 c z r 14 13 _ _ r 16 14 x x r 14 14 y y r 14 14 z z r 14 14 _ _ r 15 15 1 1 r 15 15 _ 1 l 12 16 * * r 16 16 _ _ l 17 17 x a l 17 17 y b l 17 17 z c l 17 17 _ _ l 18 18 x a l 18 18 y b l 18 18 z c l 18 18 * * l 18 18 _ _ l 19 19 _ _ r 20 19 * * l 18 19 x a l 18 19 y b l 18 19 z c l 18 20 _ _ r 5 21 x _ l 21 21 y _ l 21 21 z _ l 21 21 _ _ r 22 22 _ _ r 22 22 a a r 23 22 b b r 23 22 c c r 23 23 a a r 23 23 b b r 23 23 c c r 23 23 _ _ r 24 24 _ _ l halt 24 a a r 23 24 b b r 23 24 c c r 23 23 1 1 r 25 25 1 1 r 25 25 _ _ l 26 26 * _ l 26 26 _ _ l halt

Property * determiner
As defined by Friedman, set of strings has property * iff for no two strings this set one is subsequence of another. ​0 a x r 1a 0 b y r 1b 0 c z r 1c 0 | _ * halt 0 _ | * halt 1a * * r 1a 1a _ | r 2a 1a x m r 2a 1a y n r 2a 1a z o r 2a 2a * * r 2a 2a a x l 3 2a _ _ r 4a 1b * * r 1b 1b _ | r 2b 1b x m r 2b 1b y n r 2b 1b z o r 2b 2b * * r 2b 2b b y l 3 2b _ _ r 4a 1c * * r 1c 1c _ | r 2c 1c x m r 2c 1c y n r 2c 1c z o r 2c 2c * * r 2c 2c c z l 3 2c _ _ r 4a 3 * * l 3 3 _ _ r 0 3 x x r 0 3 y y r 0 3 z z r 0 4a _ _ l 6 4a * * l 4 4 a m l 4 4 x m l 4 4 b n l 4 4 y n l 4 4 c o l 4 4 z o l 4 4 * * l 4 4 | | l 5 5 x a l 5 5 y b l 5 5 z c l 5 5 * * l 5 5 _ _ r 0 6 _ _ l 7 7 m a l 7 7 x a l 7 7 n b l 7 7 y b l 7 7 o c l 7 7 z c l 7 7 | _ l 7 7 _ _ r 8 7 * * l 7 8 * _ r 8 8 _ _ r 0

Friedman string recognizer
String \(x_1x_2x_3...\) is called Friedman string iff set \(\lbrace x_1x_2,x_2x_3x_4,x_3x_4x_5x_6,...\) has property * (look above) 0 * * r 0 0 _ _ r 1 1 _ 1 r 2 2 _ 1 l 3 3 1 1 l 3 3 _ _ l 4 4 * * l 4 4 _ _ r 5 5 a _ r 6a 6a * * r 6a 6a 1 a l 8 6a _ _ r 7a 7a _ 1 l 12 7a 1 a l 8 7a * * r 6a 5 b _ r 6b 6b * * r 6b 6b 1 b l 8 6b _ _ r 7b 7b _ 1 l 12 7b 1 b l 8 7b * * r 6b 5 c _ r 6c 6c * * r 6c 6c 1 c l 8 6c _ _ r 7c 7c _ 1 l 12 7c 1 c l 8 7c * * r 6c 8 * * l 8 8 _ _ l 9' 8 x x l 9 8 y y l 9 8 z z l 9 9 _ _ r 10 9 x x r 10 9 y y r 10 9 z z r 10 9 * * l 8 9' _ _ r 10 9' x _ l 21 9' y _ l 21 9' z _ l 21 9' * * l 8 10 _ _ r 11 10 x x r 11 10 y y r 11 10 z z r 11 11 a x r 6a 11 b y r 6b 11 c z r 6c 12 1 1 l 12 12 _ _ l 13 13 x x l 13 13 y y l 13 13 z z l 13 13 a x r 14 13 b y r 14 13 c z r 14 13 _ _ r 16 14 x x r 14 14 y y r 14 14 z z r 14 14 _ _ r 15 15 1 1 r 15 15 _ 1 l 12 16 * * r 16 16 _ _ l 17 17 x a l 17 17 y b l 17 17 z c l 17 17 _ _ l 18 18 x a l 18 18 y b l 18 18 z c l 18 18 * * l 18 18 _ _ l 19 19 _ _ r 20 19 * * l 18 19 x a l 18 19 y b l 18 19 z c l 18 20 _ _ r 5 21 x _ l 21 21 y _ l 21 21 z _ l 21 21 _ _ r 22 22 _ _ r 22 22 a a r 23 22 b b r 23 22 c c r 23 23 a a r 23 23 b b r 23 23 c c r 23 23 _ _ r 24 24 _ _ l 27 24 a a r 23 24 b b r 23 24 c c r 23 23 1 1 r 25 25 1 1 r 25 25 _ _ l 26 26 * _ l 26 26 _ _ l 27 c0 a x r c1a c0 b y r c1b c0 c z r c1c c0 | _ * halt c0 _ | * halt c1a * * r c1a c1a _ | r c2a c1a x m r c2a c1a y n r c2a c1a z o r c2a c2a * * r c2a c2a a x l c3 c2a _ _ r c4a c1b * * r c1b c1b _ | r c2b c1b x m r c2b c1b y n r c2b c1b z o r c2b c2b * * r c2b c2b b y l c3 c2b _ _ r c4a c1c * * r c1c c1c _ | r c2c c1c x m r c2c c1c y n r c2c c1c z o r c2c c2c * * r c2c c2c c z l c3 c2c _ _ r c4a c3 * * l c3 c3 _ _ r c0 c3 x x r c0 c3 y y r c0 c3 z z r c0 c4a _ _ l c6 c4a * * l c4 c4 a m l c4 c4 x m l c4 c4 b n l c4 c4 y n l c4 c4 c o l c4 c4 z o l c4 c4 * * l c4 c4 | | l c5 c5 x a l c5 c5 y b l c5 c5 z c l c5 c5 * * l c5 c5 _ _ r c0 c6 _ _ l c7 c7 m a l c7 c7 x a l c7 c7 n b l c7 c7 y b l c7 c7 o c l c7 c7 z c l c7 c7 | _ l c7 c7 _ _ r c8 c7 * * l c7 c8 * _ r c8 c8 _ _ r c0 27 * * l 27 27 _ _ l 28 28 * * l 27 28 _ _ r 29 29 _ _ r c0

n(3) calculator
Putting everything together was easier than I thought. ; Tape consists of current length, current string and work space ; Machine checks every length until it can't find Friedman string of given length ; Setup is of form 'we already checked length 1' 0 _ 1 r w0 ; When we find Friedman string of current length, we clear current string and work space w0 _ _ l w0 w0 * _ l w0 w0 1 1 r s1 ; We increase length by 1 and at the same moment we create string of a's s0 1 _ r s1 s0 _ _ r d0 s1 1 1 r s1 s1 _ _ r s2 s2 a a r s2 s2 _ a l s3 s3 a a l s3 s3 _ _ l s4 s4 1 1 l s4 s4 _ 1 r s0 ; If current string isn't Friedman string we try lexicographically next one r0 _ _ r r1 r0 * _ r r0 r1 * _ r r0 r1 _ _ l r2 r2 _ _ l r2 r2 * _ l r2 r2 a a l r3 r2 b b l r3 r2 c c l r3 r3 * * l r3 r3 _ _ r i0 ; Strings are checked lexicographically, so we can use ternary counter i0 a b l i1 i0 b c l i1 i0 c a r i0 i0 _ _ l h0 i1 * * l i1 i1 _ _ r d0 ; If ccc...c wasn't Friedman string, none of given length is ; We clear current string and decrease output by 1, so we get n(3) h0 * _ l h0 h0 1 _ l halt ; We duplicate current string to work space d0 _ _ r 0' d0 a x r da0 da0 * * r da0 da0 _ _ r da1 da1 * * r da1 da1 _ a l d2 d0 b y r db0 db0 * * r db0 db0 _ _ r db1 db1 * * r db1 db1 _ b l d2 d0 c z r dc0 dc0 * * r dc0 dc0 _ _ r dc1 dc1 * * r dc1 dc1 _ c l d2 d2 * * l d2 d2 _ _ l d3 d3 * * l d3 d3 x a r d0 d3 y b r d0 d3 z c r d0 ; We divide string x1x2x3... into x1x2,x2x3x4,... 0' * * r 0' 0' _ _ r 1 1 _ 1 r 2 2 _ 1 l 3 3 1 1 l 3 3 _ _ l 4 4 * * l 4 4 _ _ r 5 5 a _ r 6a 6a * * r 6a 6a 1 a l 8 6a _ _ r 7a 7a _ 1 l 12 7a 1 a l 8 7a * * r 6a 5 b _ r 6b 6b * * r 6b 6b 1 b l 8 6b _ _ r 7b 7b _ 1 l 12 7b 1 b l 8 7b * * r 6b 5 c _ r 6c 6c * * r 6c 6c 1 c l 8 6c _ _ r 7c 7c _ 1 l 12 7c 1 c l 8 7c * * r 6c 8 * * l 8 8 _ _ l 9' 8 x x l 9 8 y y l 9 8 z z l 9 9 _ _ r 10 9 x x r 10 9 y y r 10 9 z z r 10 9 * * l 8 9' _ _ r 10 9' x _ l 21 9' y _ l 21 9' z _ l 21 9' * * l 8 10 _ _ r 11 10 * * r 11 11 a x r 6a 11 b y r 6b 11 c z r 6c 12 1 1 l 12 12 _ _ l 13 13 * * l 13 13 a x r 14 13 b y r 14 13 c z r 14 13 _ _ r 16 14 * * r 14 14 _ _ r 15 15 1 1 r 15 15 _ 1 l 12 16 * * r 16 16 _ _ l 17 17 x a l 17 17 y b l 17 17 z c l 17 17 _ _ l 18 18 x a l 18 18 y b l 18 18 z c l 18 18 * * l 18 18 _ _ l 19 19 _ _ r 20 19 * * l 18 19 x a l 18 19 y b l 18 19 z c l 18 20 _ _ r 5 21 * _ l 21 21 _ _ r 22 22 _ _ r 22 22 * * r 23 23 * * r 23 23 _ _ r 24 24 _ _ l 27 24 * * r 23 23 1 1 r 25 25 1 1 r 25 25 _ _ l 26 26 * _ l 26 26 _ _ l 27 27 * * l 27 27 _ _ l 28 28 * * l 27 28 _ _ r 29 29 _ _ r c0 ; Now we check if that set has property * c0 a x r c1a c0 b y r c1b c0 c z r c1c c0 1 _ l r0 c0 _ _ l w0 c1a * * r c1a c1a _ 1 r c2a c1a x m r c2a c1a y n r c2a c1a z o r c2a c2a * * r c2a c2a a x l c3 c2a _ _ r c4a c1b * * r c1b c1b _ 1 r c2b c1b x m r c2b c1b y n r c2b c1b z o r c2b c2b * * r c2b c2b b y l c3 c2b _ _ r c4a c1c * * r c1c c1c _ 1 r c2c c1c x m r c2c c1c y n r c2c c1c z o r c2c c2c * * r c2c c2c c z l c3 c2c _ _ r c4a c3 * * l c3 c3 _ _ r c0 c3 x x r c0 c3 y y r c0 c3 z z r c0 c4a _ _ l c6 c4a * * l c4 c4 a m l c4 c4 x m l c4 c4 b n l c4 c4 y n l c4 c4 c o l c4 c4 z o l c4 c4 * * l c4 c4 1 1 l c5 c5 x a l c5 c5 y b l c5 c5 z c l c5 c5 * * l c5 c5 _ _ r c0 c6 _ _ l c7 c7 m a l c7 c7 x a l c7 c7 n b l c7 c7 y b l c7 c7 o c l c7 c7 z c l c7 c7 1 _ l c7 c7 _ _ r c8 c7 * * l c7 c8 * _ r c8 c8 _ _ r c0 If someone counts states and colors, we'll have bound \(n(3)<\Sigma(s,c)\), although this bound is crushed by machine below (less states, less colors, much larger output).

How to modify machine to compute n(k)
Here I'll add character p with replacement q and second replacement r. You can add this exact ruleset and modify counter to compute n(4) easily. To add one character we need 3 new states.

Adding character consists of 2 steps: we need additional ruleset to handle new state: r2 p p l r3 d0 p q r dp0 dp0 * * r dp0 dp0 _ _ r dp1 dp1 * * r dp1 dp1 _ p l d2 d3 q p r d0 5 p _ r 6p 6p * * r 6p 6p 1 p l 8 6p _ _ r 7p 7p _ 1 l 12 7p 1 p l 8 7p * * r 6p 8 q q l 9 9 q q r 10 9' q _ l 21 11 p q r 6p 13 p q r 14 17 q p l 17 18 q p l 18 19 q p l 18 c0 p q r c1p c1a p r r c2a c1b p r r c2a c1c p r r c2a c1p * * r c1p c1p _ 1 r c2p c1p x m r c2p c1p y n r c2p c1p z o r c2p c1p p r r c2p ; You have to add similar transition for every character you add c2p * * r c2p c2p p q l c3 c2p _ _ r c4a c3 q q r c0 c4 p r l c4 c4 q r l c4 c5 q p l c5 c7 r p l c7 c7 q p l c7 Explanation of comment - if you already added, say, t with 2nd replacement u, we also need  c1p t u r c2p.

Secondly, we need to introduce new character. We must modify ternary counter like that: i0 a b l i1 i0 b c l i1 i0 c d l i1 i0 d e l i1 ... i0 p a r i0 It must cycle through all characters you want to use. Order is irrelevant.

Modified Goucher's T(n)
This is essentially same function as T(n)  function by Adam Goucher. However, in my machine, c is increased also when we delete trailing 0's.

This function is almost certainly at growth level of \(f_{\varepsilon_0}(n)\). If it is, then, as far as I know, it is first machine which is halting for every input such that it's halting isn't provable in Peano Arithmetic ; Let the number multiplier (number to the left of !) be denoted c ; Setup - state 2 is missing because it was unnecesarry and I forgot to change ordering 0 1 1 l 1 1 _ ! l 3 3 _ x r 4 ; First machine travels to rightmost number and checks if it's 0 ; If it is, number is deleted and we increase c ; Above is only difference between this and Goucher's function 4 x x r 4 4 ! ! r 5 4 _ _ r 5 5 1 1 r 5 5 _ _ r 6 6 1 1 r 5 6 _ _ l 7 7 _ _ l 7 7 1 _ l 8 8 _ _ l 9 8 1 1 l 11 8 ! 1 l 2 ; If there is no numbers, we can halt 9 * * l 9 9 x x l 10 10 x x l 10 10 _ x r 4 ; We seek for first number from right smaller than rightmost number ; In original problem, numbers to the left of it are called R ; Every time we copy only R-1 11 1 1 l 11 11 _ _ l 12 11 ! | l 19 ; If there is only one number, we copy just it 12 * * l 12 12 1 1 l 13 13 1 1 l 13 13 * * r c1 ; We find R by comparing rightmost number with all number to its left ; This is again modified Aarex's machine c0 1 1 l c0 c0 * * r c1 c0 y y l c5 c1 1 x r c2 c1 * | l 27 ; If we find smaller number, we proceed c2 1 1 r c2 c2 y y r c2 c2 * * r c3 c3 1 1 r c3 c3 y y r c2 c3 * * l c4 c4 1 x l c5 c4 * _ r 14 ; If given number isn't smaller, we'll check next one c5 1 1 l c5 c5 y y l c5 c5 * * l c0 ; We replace number we just compared with y's and we ignore it for now 14 x x r 14 14 _ _ l 15 15 x 1 l 15 15 y y l 15 15 _ _ l 16 16 x y l 16 16 1 y l 16 16 y y l 15 16 _ _ l 13 16 ! ! r 17 ; If there are no smaller numbers, whole string is R and we copy it 17 y 1 r 17 17 _ _ r 17 17 1 1 l 18 18 * * l 18 18 ! | l 19 19 x x l 19 19 _ _ r 20 ; These are setup states for duplication 20 x y r 21 20 _ _ r 23 21 x x r 21 21 _ _ r 22 21 | | r d0 22 * * r 22 22 | | r d0 ; Here is most imprtant part - we copy everything to the right of '|' ; At the end we have c+1 copies of R-1 d0 1 x r d1 d0 _ y r d8 d0 | | r d11 d1 1 1 r d1 d1 _ _ r d2 d1 | | r d6 d2 1 1 r d1 d2 _ 1 l d3 d3 _ | r d4 d4 1 1 r d4 d4 _ | l d5 d5 * * l d5 d5 x x r d0 d5 y y r d0 d6 * * r d6 d6 | 1 r d7 d7 _ | l d5 d8 * * r d8 d8 | | r d9 d9 * * r d9 d9 | _ r d10 d10 _ | l d5 d11 * * r d11 d11 | _ l d12 d12 * * l d12 d12 | | l d13 d13 x 1 l d13 d13 y _ l d13 d13 | _ l d14 d14 * * l d14 d14 y y r 20 ; After copying we can start everything all over again 23 * * r 23 23 | _ l 24 24 * * l 24 24 y y l 25 25 y y l 25 25 _ x r 26 26 y x r 26 26 _ ! r 5 ; After finding smaller number, we prepare everything for copying 27 x x l 27 27 _ _ r 28 28 x 1 r 28 28 | | r 29 29 y 1 r 29 29 _ _ r 29 29 x 1 r 30 30 x 1 r 30 30 _ _ l 31 31 * * l 31 31 ! _ l 19 ; Missing state 2 is used to replace multiplier with output 2 x 1 l 2 2 _ _ r halt

Kirby-Paris hydra game
This time we can construct function which certainly does grow at level of \(f_{\varepsilon_0}(n)\) (previous machine hasn't been proven to do that, although it seems sure).

This machine isn't computing actual function, it only collapses hydra, output must be of form ))...) A, where ))...) is 1 or more right parentheses and A is any tree in parenthesis form without outermost pair (i.e. root)

3-color version
; Number to the left is multiplier ; Machine runs to the right of hydra 0 * * r 0 0 _ _ r 1 1 * * r 1 1 _ _ l 2 ; Machine deletes rightmost )'s until it finds pair - rightmost head 2 ) _ l 3 2 _ _ l halt ; If there are no nodes left, hydra is dead 3 ( _ l 42 ; If rightmost head was child of node, we don't have to copy anything 3 ) _ l 4 4 ) _ l 4 4 ( _ r 5 ; Machine finds smallest pair enclosing head we cut ; We do it by 'balance searching' : We look for rightmost parenthesis such that everything to its right is balanced 5 _ ) r 6 6 * * r 6 6 _ _ r 7 7 ( ( r 7 7 _ ( l 8 8 ( ( l 8 8 _ _ l 9 9 * * l 9 9 _ _ l 10 10 ) _ r 5 10 ( _ r 11 11 _ ( r 12 12 * * r 12 12 _ _ r 13 13 ( ( r 13 13 _ _ l 14 14 ( _ l 15 15 ( ( l 8 15 _ _ l 16 ; We'll make that many copies as multiplier says 16 * * l 16 16 _ _ l 17 17 * * l 17 17 _ _ l 18 18 ) ) l 18 18 r 19 18 _ ) r 19 ; This increases multiplier for next run 19 ) ( r 20 19 _ _ r 22 ; If multiplier is used, we must put one hydra into one piece 20 ) ) r 20 20 _ _ r 21 21 * * r 21 21 _ _ r c0 ; This part makes one copy c0 ( _ l (1 c0 ) _ l )1 c0 _ ( r c3 (1 _ ( r (2 (2 _ _ r (3 (3 * * r (3 (3 _ _ r (4 (4 * * r (4 (4 _ ( l c1 )1 _ ) r )2 )2 _ _ r )3 )3 * * r )3 )3 _ _ r )4 )4 * * r )4 )4 _ ) l c1 c1 * * l c1 c1 _ _ l c2 c2 * * l c2 c2 _ _ r c0 c3 ( ( r c3 c3 ) ) l c4 c4 r c5 c5 ) ) r c5 c5 ( ( l c6 c5 _ _ l c7 c6 ) ( r c3 c7 ) _ l 16 ; We put hydra in one piece, but it still lacks rightmost )'s  22 ( _ r 23 23 ( ( r 23 23 ) ( r 24 24  r 23 24 ) ) r 24 24 _ ) l 25 ; We check parenthesis ony-by-one to check, how many )'s we need 25 * * l 25 25 _ _ r 26 26 ( _ l 27 26 ) _ l 32 26 _ ) l 38 27 _ ( r 28 28 _ _ r 29 29 * * r 29 29 _ _ r 30 30 ) ) r 30 30 _ ) l 31 31 ) ) l 31 31 _ _ l 25 32 _ ) r 33 33 _ _ r 34 34 * * r 34 34 _ _ r 35 35 * * r 35 35 _ _ l 36 36 ) _ l 37 37 * * l 37 37 _ _ l 25 ; When machine finishes, it puts hydra ready for next cut 38 _ ) r 39 39 * * r 39 39 _ _ l 40 40 ) _ l 41 41 ) _ l 2 ; Now it's only left to setup new multiplier to work 42 * * l 42 42 _ _ l 43 43 ) ) l 43 43 _ ) r 0

Heavily improved version!
I noticed one thing - previous machine at the beginning deletes rightmost )'s and later reconstructs them. So even if at the beginning they were unbalanced, they'd balance by themselves. So they are theoretically unnecessary. This version has lost 15 states thanks to this!

Now input must have ('s at the beginning instead of )'s, and it doesn't need rightmost )'s (e.g. ( (()) is equivalent to ( (( 0 * * r 0 0 _ _ r 1 1 * * r 1 1 _ _ l 2 2 * _ l 2 2 ( _ r 5 3 _ _ r 4 4 ( ( r 4' 4 ) _ r 27 4' * * r 4' 4' _ _ r 2 5 _ ) r 6 6 * * r 6 6 _ _ r 7 7 ) ) r 7 7 _ ) l 8 8 ) ) l 8 8 _ _ l 9 9 * * l 9 9 _ _ l 10 10 ) _ r 5 10 ( _ r 11 10 _ ( r 3 11 _ ( r 12 12 * * r 12 12 _ _ r 13 13 ) ) r 13 13 _ _ l 14 14 ) _ l 15 15 ) ) l 8 15 _ _ l 16 16 * * l 16 16 _ _ l 17 17 * * l 17 17 _ _ l 18 18 ( ( l 18 18 ) ( r 19 18 _ ( r 19 19 r 20 19 _ _ r 22 20 ( ( r 20 20 _ _ r 21 21 * * r 21 21 _ _ r c0 c0 ( _ l (1 c0 ) _ l )1 c0 _ ( r c3 (1 _ ( r (2 (2 _ _ r (3 (3 * * r (3 (3 _ _ r (4 (4 * * r (4 (4 _ ( l c1 )1 _ ) r )2 )2 _ _ r )3 )3 * * r )3 )3 _ _ r )4 )4 * * r )4 )4 _ ) l c1 c1 * * l c1 c1 _ _ l c2 c2 * * l c2 c2 _ _ r c0 c3 ( ( r c3 c3 ) ) l c4 c4 r c5 c5 ) ) r c5 c5 ( ( l c6 c5 _ _ l c7 c6 ) ( r c3 c7 ) _ l 16 22 * * r 22 22 _ _ r 23 23 * * r 23 23 _ _ l 24 24 ) _ l 25 25 ) ) l 25 25 l 26 26 ) ( l 25 26 ( ( l 26 26 _ ( r 1 27 _ _ r 27 27 ) _ l halt Using just 2 states this can be converted to function comparable with \(f_{\varepsilon_0}(n)\)!

Reduced number of states!
Thanks to comment by Wythagoras on this blog post I was able to reduce number of states to 38. There is no state 4' now, state 14 was replaced with state 5, (1 with c3, (2 with c4, 24 with c4, )1 with c6, )2 with c7, and I did some renaming to keep numbering consistent. I'm leaving above machine for historical purposes and comparison. 0 * * r 0 0 _ _ r 1 1 * * r 1 1 _ _ l 2 2 * _ l 2 2 ( _ r 5 3 _ _ r 3 3 ( ( r 4 3 ) _ r 24 4 * * r 4 4 _ _ r 2 5 _ ) r 6 5 ) _ l 15 6 * * r 6 6 _ _ r 7 7 ) ) r 7 7 _ ) l 8 8 ) ) l 8 8 _ _ l 9 9 * * l 9 9 _ _ l 10 10 ) _ r 5 10 ( _ r 11 10 _ ( r 3 11 _ ( r 12 12 * * r 12 12 _ _ r 13 13 ) ) r 13 13 _ _ l 5 15 ) ) l 8 15 _ _ l 16 16 * * l 16 16 _ _ l 17 17 * * l 17 17 _ _ l 18 18 ( ( l 18 18 ) ( r 19 18 _ ( r 19 19 r 20 19 _ _ r 22 20 ( ( r 20 20 _ _ r 21 21 * * r 21 21 _ _ r c0 c0 ( _ l c3 c0 ) _ l c6 c0 _ ( r c3 (1 * * r (1 (1 _ _ r (2 (2 * * r (2 (2 _ ( l c1 )1 * * r )1 )1 _ _ r )2 )2 * * r )2 )2 _ ) l c1 c1 * * l c1 c1 _ _ l c2 c2 * * l c2 c2 _ _ r c0 c3 ( ( r c3 c3 ) ) l c4 c3 _ ( r c4 c4 r c5 c4 _ _ r (1 c4 ) _ l 25 c5 ) ) r c5 c5 ( ( l c6 c5 _ _ l 14 c6 ) ( r c3 c6 _ ) r 14 14 _ _ r )1 14 ) _ l 16 22 * * r 22 22 _ _ r 23 23 * * r 23 23 _ _ l c4 24 _ _ r 24 24 ) _ l halt 25 ) ) l 25 25 l 26 26 ) ( l 25 26 ( ( l 26 26 _ ( r 1

Reduced number of states II
Reduced again by two states by Wythagoras! Note that this machine actually computes Hydra(n)+1. 0 ( ( r 0 0 _ _ r 1 1 ( ( r 1 1 ) ) r 1 1 _ _ l 2 2 _ _ l 2 2 ) _ l 2 2 ( _ r 5 3 _ _ r 3 3 ( ( r 4 3 ) _ r halt 4 ( ( r 4 4 ) ) r 4 4 _ _ r 2 5 _ ) r 6 5 ) ) l 5 5 l 24 6 ( ( r 6 6 ) ) r 6 6 _ _ r 7 7 ) ) r 7 7 _ ) l 8 8 ) ) l 8 8 _ _ l 9 9 ( ( l 9 9 ) ) l 9 9 _ _ l 10 10 ) _ r 5 10 ( _ r 11 10 _ ( r 3 11 _ ( r 12 12 ( ( r 12 12 ) ) r 12 12 _ _ r 13 13 ) ) r 13 13 _ _ l 20 15 ) ) l 8 15 _ _ l 16 16 ( ( l 16 16 ) ) l 16 16 _ _ l 17 17 ( ( l 17 17 ) ) l 17 17 _ _ l 18 18 ( ( l 18 18 ) ( r 19 18 _ ( r 19 19 r 20 19 _ _ r 22 20 ( ( r 20 20 ) _ l 15 20 _ _ r 21 21 ( ( r 21 21 ) ) r 21 21 _ _ r c0 c0 ( _ l c3 c0 ) _ l c6 c0 _ ( r c3 (1 ( ( r (1 (1 ) ) r (1 (1 _ _ r (2 (2 ( ( r (2 (2 ) ) r (2 (2 _ ( l c1 )1 ( ( r )1 )1 ) ) r )1 )1 _ _ r )2 )2 ( ( r )2 )2 ) ) r )2 )2 _ ) l c1 c1 ) ) l c1 c1 ( ( l c1 c1 _ _ l c2 c2 ( ( l c2 c2 ) ) l c2 c2 _ _ r c0 c3 ( ( r c3 c3 ) ) l c4 c3 _ ( r c4 c4 r c5 c4 _ _ r (1 c4 ) _ l 5 c5 ) ) r c5 c5 ( ( l c6 c5 _ _ l 14 c6 ) ( r c3 c6 _ ) r 14 14 _ _ r )1 14 ) _ l 16 22 ) ) r 22 22 ( ( r 22 22 _ _ r 23 23 ) ) r 23 23 ( ( r 23 23 _ _ l c4 24 ) ( l 5 24 ( ( l 24 24 _ ( r 1

7-color version
About half as many states, about twice as many colors 0 * * r 0 0 _ _ r 1 1 * * r 1 1 ] ) r 1 1 _ _ l 2 2 ) _ l 3 2 _ _ l halt 3 ( _ l 30 3 ) _ l 4 4 ) _ l 4 4 ( ] r 5 5 * * r 5 5 _ ) l 6 6 * * l 6 6 ] ] l 7 7 * * l 7 7 ) ] r 5 7 ( [ r 8 8 * * r 8 8 _ _ l 9 9 ) _ l 10 10 ) ) l 6 10 ] ) l 11 11 ] ) l 11 11 [ ( l 11 11 ) > l 11 11 ( < l 11 11 _ _ l 12 12 ) ) l 12 12 * ) r 13 13 ) ( r 14 13 _ _ r 22 14 * * r 14 14 _ _ r 15 15 ( [ r 16 15 ) ] r 17 15 * * r 15 16 * * r 16 16 _ [ l 18 17 * * r 17 17 _ ] l 18 18 [ [ l 18 18 ] ] l 18 18 * * l 19 19 * * l 19 19 [ ( r 15 19 ] ) r 15 19 < < r 20 19 > > r 20 19 _ _ r 20 20 * * r 20 20 ] ) l 21 21 * * l 21 21 _ _ l 12 21 < < l 21 21 > > l 21 22 * * r 22 22 > ) r 22 22 < ( r 22 22 _ _ l 23 23 [ ( l 23 23 ] ) l 23 23 * * l 23 23 _ _ r 24 24 ( [ r 25 24 ) ] r 26 25 * * r 25 25 _ ] l 28 26 * * r 26 26 _ _ l 27 27 ] _ l 28 28 * * l 28 28 ( ( l 29 28 ) ) l 29 29 * * l 29 29 _ _ r 1 29 [ ( r 24 29 ] ) r 24 30 * * l 30 30 _ _ l 31 31 * * l 31 31 _ ) r 0

Buchholz's hydra
Yes, I started work on Buchholz's hydra game. For now I'm not planning implementing whole game, rather just parts for machines or partial results. Never mind, I did it anyway :D

Important - every part of hydra not inside parenthesis (i.e. connected to root) must be inside pair. For example, is invalid, so is ([])[()]

Cutting 1-labelled head
If I'm able to extend one of above machines to cut heads while preserving [] pairs we'll be able to reach Bachmann-Howard ordinal! ; This part looks for rightmost head (for sake of this machine it MUST be [] pair) 0 * * r 0 0 _ _ l 1 1 ) ) l 1 1 ] ] l 1 1 [ ( r 2 ; From hydra behavior we know head will become 2 ] x r 3 ; x marks where head was 3 ) ) r 3 3 ] ) r 4 4 ) ] r 3 4 ] ] r 4 3 _ ) l 5 4 _ ] l 5 5 * * l 5 5 x ) r 6 ; We search for 0-labelled node in hydra, i.e. ) parenthesis 6 ) ] r 7 7 ] ] r 7 7 ) x l 8 8 ] > l 13 ; Now, by balance searching, we look for part of hydra going to be copied 9 * * r 9 9 _ _ r 10 10 x x r 10 10 _ x l 11 11 * * l 11 11 _ _ l 12 12 * * l 12 12 x x l 13 13 * * l 13 13 ) > r 9 13 ] } r 9 13 ( < r 14 13 [ { r 14 14 * * r 14 14 _ _ r 15 15 * * r 15 15 _ _ l 16 16 x _ l 11 16 _ _ l 17 ; Now we copy it to the side 17 * * l 17 17 x x l 18 18 * * l 18 18 _ _ r 19 18 ( ( r 19 18 [ [ r 19 18 ) ) r 19 18 ] ] r 19 19 < ( r 0( 19 > ) r 0) 19 { [ r 0[ 19 } ] r 0] 19 x _ l 20 ; We have 2 states per parenthesis type to copy it 0( * * r 0( 0( _ _ r 1( 1( * * r 1( 1( _ ( l 17 0) * * r 0) 0) _ _ r 1) 1) * * r 1) 1) _ ) l 17 0[ * * r 0[ 0[ _ _ r 1[ 1[ * * r 1[ 1[ _ [ l 17 0] * * r 0] 0] _ _ r 1] 1] * * r 1] 1] _ ] l 17 ; Now we have to once again find reduced head 20 * * l 20 20 ( ( r 21 21 ) x r 22 22 ) ) r 22 22 ] ) r 23 22 _ ) r 24 23 ) ] r 22 23 ] ] r 23 ; ...putting hydra part into place 24 * * r 24 24 _ _ r 25 25 ( _ l (2 25 ) _ l )2 25 [ _ l [2 25 ] _ l ]2 25 _ _ l 29 ; Here one state per parenthesis was enough (2 * * l (2 (2 x ( r 26 )2 * * l )2 )2 x ) r 26 [2 * * l [2 [2 x [ r 26 ]2 * * l ]2 ]2 x ] r 26 26 ) x r 27 26 ] x r 28 27 ) ) r 27 27 ] ) r 28 27 _ ) r 24 28 ) ] r 27 28 ] ] r 28 ; Getting everything in place and stop 29 _ _ l 29 29 ) _ l 30 30 ) ) l 30 30 ] ) l 30 30 x ) l halt 31 ) ] l 30 31 ] ] l 30 31 x ] l halt

Cutting 0-labelled head
Now it should work well.

Input format: multiplier represented by string of x's followed by space and hydra ; Searching for head and deleting it 0 x x r 0 0 _ _ r 1 1 * * r 1 1 _ _ l 2 2 ) ) l 2 2 ] ] l 2 2 ( x r 3 3 ) x l 4 ; Balance searching 4 * * l 4 4 ) > r 5 4 ] } r 5 4 ( < r 8 4 [ { r 8 4 _ _ r 45 5 * * r 5 5 _ _ r 6 6 _ ( l 7 6 ( ( r 6 7 * * l 7 7 x x l 4 8 * * r 8 8 _ _ r 9 9 ( ( r 9 9 _ _ l 10 ; Setting everything for copying 10 ( _ l 7 10 _ _ l 11 11 * * l 11 11 x x l 12 12 * * l 12 12 ( ( r 13 12 ) ) r 13 12 [ [ r 13 12 ] ] r 13 12 _ _ r 13 13 < x r 14 13 { x r 15 14 < < r 14 14 { < r 15 14 > < r 16 14 } < r 17 14 x < r 18 15 < { r 14 15 { { r 15 15 > { r 16 15 } { r 17 15 x { r 18 16 < > r 14 16 { > r 15 16 > > r 16 16 } > r 17 16 x > r 18 17 < } r 14 17 { } r 15 17 > } r 16 17 } } r 17 17 x } r 18 18 x x r 18 18 ) x l 19 18 ] x l 20 19 x > l 22 20 x } l 22 ; We copy piece of hydra between x's as many times as multiplier says 22 * * l 22 22 _ _ l 23 23 x x l 23 23 _ _ r 24 23 > x r 24 24 x > r 25 24 _ x r 31 25 x x r 25 25 _ _ r 26 26 * * r 26 26 < ( r (0 26 { [ r [0 26 > ) r )0 26 } ] r ]0 26 _ _ l 29 27 * * l 27 27 _ _ l 28 28 * * l 28 28 _ _ r 26 ; We copy parentheses one-by-one (0 * * r (0 (0 _ _ r (1 (1 * * r (1 (1 _ ( l 27 [0 * * r [0 [0 _ _ r [1 [1 * * r [1 [1 _ [ l 27 )0 * * r )0 )0 _ _ r )1 )1 * * r )1 )1 _ ) l 27 ]0 * * r ]0 ]0 _ _ r ]1 ]1 * * r ]1 ]1 _ ] l 27 ; If we finished copy, we look if we need another (decrement multiplier) 29 x x l 30 29 * * l 29 30 ( < l 30 30 [ { l 30 30 ) > l 30 30 ] } l 30 30 x x l 22 ; If we don't, we set everything up for inserting hydra 31 ( _ r 32 31 x _ r 36 32 ( ( r 32 32 [ ( r 33 32 ) ( r 34 32 ] ( r 35 32 x ( r 36 33 ( [ r 32 33 [ [ r 33 33 ) [ r 34 33 ] [ r 35 33 x [ r 36 34 r 32 34 [ ) r 33 34 ) ) r 34 34 ] ) r 35 34 x ) r 36 35 ( ] r 32 35 [ ] r 33 35 ) ] r 34 35 ] ] r 35 35 x ] r 36 36 < ( r 36 36 { [ r 36 36 > ) r 36 36 } ] r 36 36 x x r 37 ; Same mechanism as for 1-labelled head deleting 37 * * r 37 37 _ _ r 38 38 ( _ l (2 38 [ _ l [2 38 ) _ l )2 38 ] _ l ]2 38 _ _ l 42 (2 * * l (2 (2 x ( r 39 [2 * * l [2 [2 x [ r 39 )2 * * l )2 )2 x ) r 39 ]2 * * l ]2 ]2 x ] r 39 39 ) x r 40 39 ] x r 41 39 _ x r 37 40 ) ) r 40 40 ] ) r 41 40 _ ) r 37 41 ) ] r 40 41 ] ] r 41 ; When finished, halt 42 _ _ l 42 42 ) _ l 43 42 x _ l halt 43 ) ) l 43 43 ] ) l 44 43 x ) l halt 44 ) ] l 43 44 ] ] l 44 44 x ] l halt ; In case deleted head is root child 45 < ( r 45 45 > ) r 45 45 { [ r 45 45 } ] r 45 45 x _ r 45 45 _ _ l 46 46 * * l 46 46 x x l 47 47 _ x r halt 47 * * l 47

(0,1)-labelled hydra game
I did it! I made hydra game on hydras labelled with 0's and 1's! If strength of these hydras is indeed Bachmann-Howard ordinal, I just made Turing machine undecidable within Kripke-Platek set theory!

Input format: multiplier represented by string of x's followed by space and hydra 0 x x r 0 0 _ _ r 1 1 * * r 1 1 _ _ l 2 2 ) ) l 2 2 ] ] l 2 2 ( x r 3 2 [ ( r 2' 2 _ _ l halt ; Deleting head 3 ) x l 4 4 * * l 4 4 ) > r 5 4 ] } r 5 4 ( < r 8 4 [ { r 8 4 _ _ r 45 5 * * r 5 5 _ _ r 6 6 _ ( l 7 6 ( ( r 6 7 * * l 7 7 x x l 4 8 * * r 8 8 _ _ r 9 9 ( ( r 9 9 _ _ l 10 10 ( _ l 7 10 _ _ l 11 11 * * l 11 11 x x l 12 12 * * l 12 12 ( ( r 13 12 ) ) r 13 12 [ [ r 13 12 ] ] r 13 12 _ _ r 13 13 < x r 14 13 { x r 15 14 < < r 14 14 { < r 15 14 > < r 16 14 } < r 17 14 x < r 18 15 < { r 14 15 { { r 15 15 > { r 16 15 } { r 17 15 x { r 18 16 < > r 14 16 { > r 15 16 > > r 16 16 } > r 17 16 x > r 18 17 < } r 14 17 { } r 15 17 > } r 16 17 } } r 17 17 x } r 18 18 x x r 18 18 ) x l 19 18 ] x l 20 19 x > l 22 20 x } l 22 22 * * l 22 22 _ _ l 23 23 x x l 23 23 _ _ r 24 23 > x r 24 24 x > r 25 24 _ x r 31 25 x x r 25 25 _ _ r 26 26 * * r 26 26 < ( r (0 26 { [ r [0 26 > ) r )0 26 } ] r ]0 26 _ _ l 29 27 * * l 27 27 _ _ l 28 28 * * l 28 28 _ _ r 26 (0 * * r (0 (0 _ _ r (1 (1 * * r (1 (1 _ ( l 27 [0 * * r [0 [0 _ _ r [1 [1 * * r [1 [1 _ [ l 27 )0 * * r )0 )0 _ _ r )1 )1 * * r )1 )1 _ ) l 27 ]0 * * r ]0 ]0 _ _ r ]1 ]1 * * r ]1 ]1 _ ] l 27 29 x x l 30 29 * * l 29 30 ( < l 30 30 [ { l 30 30 ) > l 30 30 ] } l 30 30 x x l 22 31 ( _ r 32 31 x _ r 36 32 ( ( r 32 32 [ ( r 33 32 ) ( r 34 32 ] ( r 35 32 x ( r 36 33 ( [ r 32 33 [ [ r 33 33 ) [ r 34 33 ] [ r 35 33 x [ r 36 34 r 32 34 [ ) r 33 34 ) ) r 34 34 ] ) r 35 34 x ) r 36 35 ( ] r 32 35 [ ] r 33 35 ) ] r 34 35 ] ] r 35 35 x ] r 36 36 < ( r 36 36 { [ r 36 36 > ) r 36 36 } ] r 36 36 x x r 37 37 * * r 37 37 _ _ r 38 38 ( _ l (2 38 [ _ l [2 38 ) _ l )2 38 ] _ l ]2 38 _ _ l 42 (2 * * l (2 (2 x ( r 39 [2 * * l [2 [2 x [ r 39 )2 * * l )2 )2 x ) r 39 ]2 * * l ]2 ]2 x ] r 39 39 ) x r 40 39 ] x r 41 39 _ x r 37 40 ) ) r 40 40 ] ) r 41 40 _ ) r 37 41 ) ] r 40 41 ] ] r 41 42 _ _ l 42 42 ) _ l 43 42 x _ l 1 43 ) ) l 43 43 ] ) l 44 43 x ) l 1 44 ) ] l 43 44 ] ] l 44 44 x ] l 1 45 < ( r 45 45 > ) r 45 45 { [ r 45 45 } ] r 45 45 x _ r 45 45 _ _ l 46 46 * * l 46 46 x x l 47 47 _ x r 0 47 * * l 47 ; Deleting [] head 2' ] x r 3' 3' ) ) r 3' 3' ] ) r 4' 4' ) ] r 3' 4' ] ] r 4' 3' _ ) l 5' 4' _ ] l 5' 5' * * l 5' 5' x ) r 6' 6' ) ] r 7' 7' ] ] r 7' 7' ) x l 8' 8' ] > l 13' 9' * * r 9' 9' _ _ r 10' 10' x x r 10' 10' _ x l 11' 11' * * l 11' 11' _ _ l 12' 12' * * l 12' 12' x x l 13' 13' * * l 13' 13' ) > r 9' 13' ] } r 9' 13' ( < r 14' 13' [ { r 14' 14' * * r 14' 14' _ _ r 15' 15' * * r 15' 15' _ _ l 16' 16' x _ l 11' 16' _ _ l 17' 17' * * l 17' 17' x x l 18' 18' * * l 18' 18' _ _ r 19' 18' ( ( r 19' 18' [ [ r 19' 18' ) ) r 19' 18' ] ] r 19' 19' < ( r 0(' 19' > ) r 0)' 19' { [ r 0[' 19' } ] r 0]' 19' x _ l 20' 0(' * * r 0(' 0(' _ _ r 1(' 1(' * * r 1(' 1(' _ ( l 17' 0)' * * r 0)' 0)' _ _ r 1)' 1)' * * r 1)' 1)' _ ) l 17' 0[' * * r 0[' 0[' _ _ r 1[' 1[' * * r 1[' 1[' _ [ l 17' 0]' * * r 0]' 0]' _ _ r 1]' 1]' * * r 1]' 1]' _ ] l 17' 20' * * l 20' 20' ( ( r 21' 21' ) x r 22' 22' ) ) r 22' 22' ] ) r 23' 22' _ ) r 24' 23' ) ] r 22' 23' ] ] r 23' 24' * * r 24' 24' _ _ r 25' 25' ( _ l (2' 25' ) _ l )2' 25' [ _ l [2' 25' ] _ l ]2' 25' _ _ l 29' (2' * * l (2' (2' x ( r 26' )2' * * l )2' )2' x ) r 26' [2' * * l [2' [2' x [ r 26' ]2' * * l ]2' ]2' x ] r 26' 26' ) x r 27' 26' ] x r 28' 27' ) ) r 27' 27' ] ) r 28' 27' _ ) r 24' 28' ) ] r 27' 28' ] ] r 28' 29' _ _ l 29' 29' ) _ l 30' 30' ) ) l 30' 30' ] ) l 30' 30' x ) l 46 31' ) ] l 30' 31' ] ] l 30' 31' x ] l 46

Finite Buchholz hydra - cutting >0 head
Differs a bit from original definition - top node becomes u instead of 0

Input format - consider standard representation of hydra using brackets with labels, e.g. 0( 3( 3) 0) where n( n) pair means node labelled with n. Each such pair we replace with n+1 left parentheses and n+1 right parentheses, e.g. above would be ( (()) ). Now place any number of x's to the right as a multiplier. 0 * * r 0 0 _ _ r 1 1 * * r 0 1 _ x l 2' 2 * * l 2 2 ( [ r c0 2' * * l 2' 2' ( ( l 3' 3' ( ( r 2 c0 * * r c0 c0 _ _ r c1 c0 x x r c0 c1 * * r c1 c1 _ _ l 4 c1 x x r c0 c1 ) ] l c2 c2 * * l c2 c2 _ _ l c3 c2 x x l c2 c3 * * l c3 c3 x x l c2 c3 _ _ r 3 c3 ( [ r c0 3 [ ( r 3 3 ] x r 3 3 * * r 3 3 ) ) l 2 4 * * l 4 4 x ) l 4 4 [ ( l 5 5 [ ( l 5 5 * * r 6 6 * * r 6 6 ] ] l 7 7 ] ] l 7 7 [ [ l 7 7 _ _ l 8 8 ] ] l 7 8 [ [ l 7 8 * * l 8 8 _ _ r 9 9 ) ] r 10 9 ( [ r 13 10 ) ] r 10 10 _ _ r 11 11 * * r 11 11 x ( r 12 12 _ x l 16 13 ( [ r 13 13 _ _ r 14 14 * * r 14 14 x _ l 15 15 ( x l 16 15 _ _ r 17 16 * * l 16 16 ] ] l 7 17 _ x l 18 18 * * l 18 18 ] ] l 19 19 ] ] l 19 19 [ [ l 19 19 _ x l 20 20 ] ] l 19 20 [ [ l 19 20 * * r 21 21 x _ r 22 22 [ ( r 23 22 ] ) r 26 22 x _ r 29 23 * * r 23 23 _ _ r 24 24 * * r 24 24 x [ r 25 25 _ x l 32 26 * * r 26 26 _ _ r 27 27 * * r 27 27 x } r 28 28 _ x l 32 29 * * r 29 29 _ _ r 30 30 * * r 30 30 x _ r 31 31 _ x l 32 32 * * l 32 32 ] ] l 33 32 x x l 34 33 * * l 33 33 ( ( r 22 33 ) ) r 22 33 _ _ r 22 34 x x l 34 34 _ x r 35 35 x x r 35 35 _ _ r 36 36 * * r 36 36 x x l 37 37 * * l 37 37 } ] l 37 37 ( _ r 38 38 _ x r 39 39 ) _ r 40 40 * * r 40 40 [ _ r 41 41 _ y l 43 41 * * l 43 42 _ y l 45 42 * * l 45 43 * * l 43 43 x ( r 44 44 _ x r 49 45 * * l 45 45 x ) r 46 46 _ x r 49 47 * * l 47 47 x _ r 48 48 _ x r 49 49 _ _ r 49 49 ) _ r 50 49 [ _ r 41 49 ] _ r 42 49 y _ l 47 49 x _ l 51 50 _ ) r 49 50 ) ) r 50 51 _ _ l 51 51 ) _ l 52 51 x _ r 53 52 _ ) l 51 52 ) ) l 52 53 ) ) r 53 53 _ _ r 54 54 ) ) r 53 54 _ _ l 55 55 _ _ l 55 55 ) _ l 56 55 ( x r 57 55 x _ * halt 56 _ ) l 55 56 ) ) l 56 57 ) _ r 58 58 ) ) r 58 58 _ _ r 59 59 ) ) r 58 59 _ _ l 55

Finite Buchholz hydra game
At last my machine is done! Input format is as above. If you find any error in this, please comment it together with input.

Oh, and I forgot - multiplier of n x's actually behaves like n+1. Technical reasons.

141 states (I think) and 7 symbols - and we reached limits of  \(\Pi_1^1\)-\(\text{CA}_0\) ! 0 * * r 0 0 _ _ r 1 1 * * r 0 1 _ x l 28 2 * * l 2 2 ( [ r c0 28 * * l 28 28 ( ( l 31 28 x x r 117 31 ( ( r 2 31 _ x r 60 c0 * * r c0 c0 _ _ r c1 c0 x x r c0 c1 * * r c1 c1 _ _ l 4 c1 x x r c0 c1 ) ] l c2 c2 * * l c2 c2 _ _ l c3 c2 x x l c2 c3 * * l c3 c3 x x l c2 c3 _ _ r 3 c3 ( [ r c0 3 [ ( r 3 3 ] x r 3 3 * * r 3 3 ) ) l 2 4 * * l 4 4 x ) l 4 4 [ ( l 5 5 [ ( l 5 5 * * r 6 6 * * r 6 6 ] ] l 7 7 ] ] l 7 7 [ [ l 7 7 _ _ l 8 8 ] ] l 7 8 [ [ l 7 8 * * l 8 8 _ _ r 9 9 ) ] r 10 9 ( [ r 13 10 ) ] r 10 10 _ _ r 11 11 * * r 11 11 x ( r 12 12 _ x l 16 13 ( [ r 13 13 _ _ r 14 14 * * r 14 14 x _ l 15 15 ( x l 16 15 _ _ r 17 16 * * l 16 16 ] ] l 7 17 _ x l 18 18 * * l 18 18 ] ] l 19 19 ] ] l 19 19 [ [ l 19 19 _ x l 20 20 ] ] l 19 20 [ [ l 19 20 * * r 21 21 x _ r 22 22 [ ( r 23 22 ] ) r 26 22 x _ r 29 23 * * r 23 23 _ _ r 24 24 * * r 24 24 x [ r 25 25 _ x l 32 26 * * r 26 26 _ _ r 27 27 * * r 27 27 x y r 25 ; State 28 is used elsewhere 29 * * r 29 29 _ _ r 30 30 * * r 30 30 x _ r 25 ; State 31 is used elsewhere 32 * * l 32 32 ] ] l 33 32 x x l 34 33 * * l 33 33 ( ( r 22 33 ) ) r 22 33 _ _ r 22 34 x x l 34 34 _ x r 35 35 x x r 35 35 _ _ r 36 36 * * r 36 36 x x l 37 37 * * l 37 37 y ] l 37 37 ( _ r 38 38 _ x r 39 39 ) _ r 40 40 * * r 40 40 [ _ r 41 41 _ y l 43 41 * * l 43 42 _ y l 45 42 * * l 45 43 * * l 43 43 x ( r 44 43 y ( r 44' 44 _ x r 49 44' _ y r 49 45 * * l 45 45 x ) r 46 45 y ) r 46' 46 _ x r 49 46' _ y r 49 47 * * l 47 47 x _ r 48 47 y _ r 48' 48 _ x r 49 48' _ y r 49 49 _ _ r 49 49 ) _ r 50 49 [ _ r 41 49 ] _ r 42 49 y _ l 47 49 x _ l 51 50 _ ) r 49 50 ) ) r 50 51 _ _ l 51 51 ) _ l 52 51 x _ r 53 51 y _ l 0 52 _ ) l 51 52 ) ) l 52 53 ) ) r 53 53 _ _ r 54 54 ) ) r 53 54 _ _ l 55 55 _ _ l 55 55 ) _ l 56 55 ( x r 57 55 x _ r 0 56 _ ) l 55 56 ) ) l 56 57 ) _ r 58 58 ) ) r 58 58 _ _ r 59 59 ) ) r 58 59 _ _ l 55 60 ( _ r 60 60 _ _ r 60 60 ) _ r 61 61 * * r 61 61 x _ l 62 62 _ x l 63 63 _ _ r 61 63 ) _ l 64 63 x _ r 65 64 _ ) l 63 64 ) ) l 64 65 ) ] r 65 65 _ _ l 66 65 x _ l 115 66 * * l 66 66 ] ] l 67 67 * * l 67 67 _ _ l 68 68 * * l 68 68 ] ] l 67 68 [ [ l 67 68 _ _ r 69 69 ) ] r 70 69 ( [ r 73 70 ) ] r 70 70 _ _ r 71 71 * * r 71 71 x ) r 72 72 _ x l 66 73 ( [ r 73 73 _ _ r 74 74 * * r 74 74 x _ l 75 75 ) x l 66 75 _ _ r 76 76 _ x l 77 77 * * l 77 77 ] ] r 77' 77' _ y l 78 78 * * l 78 78 _ x l 78 78 ( ( r 79 78 ) ) r 79 78 x * r 79 79 x _ r 80 80 [ ( r 81 80 ] ) r 83 80 x _ r 85 81 * * r 81 81 y y r 82 82 * * r 82 82 x [ r 87 83 * * r 83 83 y y r 84 84 * * r 84 84 x y r 87 85 * * r 85 85 y y r 86 86 * * r 86 86 x _ r 87 87 _ x l 88 88 * * l 88 88 ] ] l 89 88 x x r 90 89 * * l 89 89 ( ( r 80 89 ) ) r 80 89 _ _ r 80 90 * * r 90 90 y ] r 90 90 x _ l 91 91 * * l 91 91 ) ) r 92' 92' ] ] r 93 92' * * l 92 92 * * l 92 92 ] ] r 93 93 _ _ l 97 93 ) _ r 94 93 [ _ r 95 93 ] _ r 96 94 _ ) r 93 94 ) ) r 94 95 _ [ r 93 95 [ [ r 95 95 ] [ r 96 96 _ ] r 93 96 [ ] r 95 96 ] ] r 96 97 * * l 97 97 ) ) r 98' 98' ] _ r 99 98' * * l 98 98 * * l 98 98 x x r 100 98 ] _ r 99 99 _ x r 93 100 * * r 100 100 [ [ l 101 101 * y l 102 102 * * r 102 102 _ x r 103 103 * * r 102 103 _ _ l 104 104 x y l 105 105 * * l 105 105 y y l 106' 106' * * l 106' 106' x x l 106 106 * * l 106 106 y x r 110 106 x x l 107 107 x x l 107 107 * x r 108 108 x y r 109 109 * * r 109 109 y y r d0 d0 [ ( r [0 d0 ] ) r ]0 d0 x _ r x0 d0 y y r d3 d0 * * r d0 d1 * * l d1 d1 y y l d2 d2 * * l d2 d2 y y r d0 [0 * * r [0 [0 y y r [1 [1 * * r [1 [1 _ [ l d1 ]0 * * r ]0 ]0 y y r ]1 ]1 * * r ]1 ]1 _ ] l d1 x0 * * r x0 x0 y y r x1 x1 * * r x1 x1 _ x l d1 d3 * * r d3 d3 _ y l d4 d4 * * l d4 d4 ) ) l d5 d5 * * l d5 d5 y _ l 106' 110 * * r 110 110 x y r 111 111 * * r 111 111 ( [ r 112 112 ( [ r 112 112 ) ] r 112 112 _ _ r 112 112 y _ r 113 113 * * r 113 113 x _ r 113 113 y x l 114 114 * * l 114 114 y y r 40 115 * * l 115 115 x x l 116 116 x x l 116 116 _ x r 0 117 * * r 117 117 x _ l halt

How to translate this machine into long-halting Busy Beaver
Take some 2-state 7-color machine which leaves large number of consecutive symbols (like this candidate ). Use third and fourth state to replace whole string with ('s. Now use, for example, this machine: 0 ( _ r 1 0 _ _ l halt 1 ( ( r 1 1 _ _ r 2 2 ) ) r 2 2 _ ) l 3 3 ) ) l 3 3 _ _ l 4 4 ( ( l 4 4 _ ( r 0 To make it into 2 enclosing wide parentheses. Use similar machine to make long string of x's on the left. With about 5 more states we add pair to make hydra working. So about 19 new states are sufficient to make HUGE number! This gives BB(160,7)>>most of defined computable numbers.

Transfinite Buchholz hydra!
Just 17 states more! I hope you enjoy limits of ! You know label 0 is represented as, label 1 as etc. Label \(\omega\) is )). If you find any issues please comment them below.

While trying to find mistakes in code I thought "Halting times on this machine are unimaginably large, I can't know if machine properly halts." So I added some transitions and now, if we place [ to the left of multiplier, it will never increase, thus greatly reducing halting time. It still works for very long time, though. 0 * * r 0 0 _ _ r 1 0 ] _ r 1 1 * * r 0 1 _ x l 28 2 * * l 2 2 ( [ r c0 28 * * l 28 28 ( ( l 31 28 x x r 117 31 ( ( r 2 31 ) ( r 123 31 _ x r 60 c0 * * r c0 c0 _ _ r c1 c0 x x r c0 c1 * * r c1 c1 _ _ l 4 c1 x x r c0 c1 ) ] l c2 c2 * * l c2 c2 _ _ l c3 c2 x x l c2 c3 * * l c3 c3 x x l c2 c3 _ _ r 3 c3 ( [ r c0 3 [ ( r 3 3 ] x r 3 3 * * r 3 3 ) ) l 2 4 * * l 4 4 x ) l 4 4 [ ( l 5 5 [ ( l 5 5 * * r 6 6 * * r 6 6 ] ] l 7 7 ] ] l 7 7 [ [ l 7 7 _ _ l 8 8 ] ] l 7 8 [ [ l 7 8 * * l 8 8 _ _ r 9 9 ) ] r 10 9 ( [ r 13 10 ) ] r 10 10 ( [ r 118 10 _ _ r 11 11 * * r 11 11 x ( r 12 12 _ x l 16 13 ( [ r 13 13 _ _ r 14 14 * * r 14 14 x _ l 15 15 ( x l 16 15 _ _ r 17 16 * * l 16 16 ] ] l 7 17 _ x l 18 18 * * l 18 18 ] ] l 19 19 ] ] l 19 19 [ [ l 19 19 _ x l 20 20 ] ] l 19 20 [ [ l 19 20 * * r 21 21 x _ r 22 22 [ ( r 23 22 ] ) r 26 22 x _ r 29 23 * * r 23 23 _ _ r 24 24 * * r 24 24 x [ r 25 25 _ x l 32 26 * * r 26 26 _ _ r 27 27 * * r 27 27 x y r 25 ; State 28 is used elsewhere 29 * * r 29 29 _ _ r 30 30 * * r 30 30 x _ r 25 ; State 31 is used elsewhere 32 * * l 32 32 ] ] l 33 32 x x l 34 33 * * l 33 33 ( ( r 22 33 ) ) r 22 33 _ _ r 22 34 x x l 34 34 [ [ r 35 34 _ x r 35 35 x x r 35 35 _ _ r 36 36 * * r 36 36 x x l 37 37 * * l 37 37 y ] l 37 37 ( _ r 38 38 _ x r 39 39 ) _ r 40 40 * * r 40 40 [ _ r 41 40 ] _ r 42 41 _ y l 43 41 * * l 43 42 _ y l 45 42 * * l 45 43 * * l 43 43 x ( r 44 43 y ( r 44' 44 _ x r 49 44' _ y r 49 45 * * l 45 45 x ) r 46 45 y ) r 46' 46 _ x r 49 46' _ y r 49 47 * * l 47 47 x _ r 48 47 y _ r 48' 48 _ x r 49 48' _ y r 49 49 _ _ r 49 49 ) _ r 50 49 [ _ r 41 49 ] _ r 42 49 y _ l 47 49 x _ l 51 50 _ ) r 49 50 ) ) r 50 51 _ _ l 51 51 ) _ l 52 51 x _ r 53 51 y _ l 0 52 _ ) l 51 52 ) ) l 52 53 ) ) r 53 53 _ _ r 54 54 ) ) r 53 54 _ _ l 55 55 _ _ l 55 55 ) _ l 56 55 ( x r 57 55 x _ r 0 56 _ ) l 55 56 ) ) l 56 57 ) _ r 58 58 ) ) r 58 58 _ _ r 59 59 ) ) r 58 59 _ _ l 55 60 ( _ r 60 60 _ _ r 60 60 ) _ r 61 61 * * r 61 61 x _ l 62 62 _ x l 63 63 _ _ r 61 63 ) _ l 64 63 x _ r 65 64 _ ) l 63 64 ) ) l 64 65 ) ] r 65 65 _ _ l 66 65 x _ l 115 66 * * l 66 66 ] ] l 67 67 * * l 67 67 _ _ l 68 68 * * l 68 68 ] ] l 67 68 [ [ l 67 68 _ _ r 69 69 ) ] r 70 69 ( [ r 73 70 ) ] r 70 70 ( [ r 73 70 _ _ r 71 71 * * r 71 71 x ) r 72 72 _ x l 66 73 ( [ r 73 73 _ _ r 74 74 * * r 74 74 x _ l 75 75 ) x l 66 75 _ _ r 76 76 _ x l 77 77 * * l 77 77 ] ] r 77' 77' _ y l 78 78 * * l 78 78 _ x l 78 78 ( ( r 79 78 ) ) r 79 78 x * r 79 79 x _ r 80 80 [ ( r 81 80 ] ) r 83 80 x _ r 85 81 * * r 81 81 y y r 82 82 * * r 82 82 x [ r 87 83 * * r 83 83 y y r 84 84 * * r 84 84 x y r 87 85 * * r 85 85 y y r 86 86 * * r 86 86 x _ r 87 87 _ x l 88 88 * * l 88 88 ] ] l 89 88 x x r 90 89 * * l 89 89 ( ( r 80 89 ) ) r 80 89 _ _ r 80 90 * * r 90 90 y ] r 90 90 x _ l 91 91 * * l 91 91 ) ) r 92' 92' ] ] r 93 92' * * l 92 92 * * l 92 92 ] ] r 93 93 _ _ l 97 93 ) _ r 94 93 [ _ r 95 93 ] _ r 96 94 _ ) r 93 94 ) ) r 94 95 _ [ r 93 95 [ [ r 95 95 ] [ r 96 96 _ ] r 93 96 [ ] r 95 96 ] ] r 96 97 * * l 97 97 ) ) r 98' 98' ] _ r 99 98' * * l 98 98 * * l 98 98 x x r 100 98 ] _ r 99 99 _ x r 93 100 * * r 100 100 [ [ l 101 100 ] ] l 101 101 * y l 102 102 * * r 102 102 _ x r 103 103 * * r 102 103 _ _ l 104 104 x y l 105 105 * * l 105 105 y y l 106' 106' * * l 106' 106' x x l 106 106 * * l 106 106 y x r 110 106 x x l 107 107 x x l 107 107 [ [ r 108 107 * x r 108 108 x y r 109 109 * * r 109 109 y y r d0 d0 [ ( r [0 d0 ] ) r ]0 d0 x _ r x0 d0 y y r d3 d0 * * r d0 d1 * * l d1 d1 y y l d2 d2 * * l d2 d2 y y r d0 [0 * * r [0 [0 y y r [1 [1 * * r [1 [1 _ [ l d1 ]0 * * r ]0 ]0 y y r ]1 ]1 * * r ]1 ]1 _ ] l d1 x0 * * r x0 x0 y y r x1 x1 * * r x1 x1 _ x l d1 d3 * * r d3 d3 _ y l d4 d4 * * l d4 d4 ) ) l d5 d5 * * l d5 d5 y _ l 106' 110 * * r 110 110 x y r 111 111 * * r 111 111 ( ( l 112 112 ( [ r 112 112 ) ] r 112 112 _ _ r 112 112 y _ r 113 113 * * r 113 113 x _ r 113 113 y x l 114 114 * * l 114 114 y y r 40 115 * * l 115 115 x x l 116 116 x x l 116 116 _ x r 0 116 [ [ r 0 117 * * r 117 117 x _ l halt 118 * * r 118 118 x x l 119 119 ( ( l 14 119 _ _ l 120 120 * * l 120 120 ] x l 120 120 [ ( l 121 121 [ ( l 121 121 ] ) l 121 121 _ _ l 121 121 * * r 122 122 * * r 122 122 x x l 2 123 ( ( r 123 123 _ ] r 124 124 * * r 124 124 x _ l 125 125 * * l 125 125 x x l 127 125 y x r 0 ; NOTE: No state 126 127 x x l 127 127 [ [ r 128 127 * x r 128 128 x y r 129 129 * * r 129 129 x x r 129 129 _ _ r 130 130 * * r 130 130 ] ( r 131 131 ) ] r 132 132 ) ) r 132 132 _ ) r 133 133 ) _ r 132 133 _ _ l 134 134 * * l 134 134 ] ] r 135 134 y ) l 125 135 ) y r 132

Linear array notation
This machine computes version of linear arrays where {a,b}=a^b. If replace it with Bowers' original rule {a,b}=a+b, we'd save around 35 states. But I decided to go harder way.

Input format: x|A| where A is array in form of strings of 1's divided by blanks, e.g. x|111 111 111| calculates tritri 0 * * r 0 0 _ _ r 1 0 | | r 0' 0' * * r 0' 0' _ _ r 1 0' | _ l h0 1 _ _ r 1 1 1 1 r 2 2 _ _ r 3 2 | _ l 4 2 1 1 r 5 3 * _ r 3 3 | _ l 4 4 * * l 4 4 1 _ l r0 5 1 1 r 5 5 | _ l 6 5 _ _ r 9 6 1 x l 7 6 _ 1 l s1 7 * * l 7 7 | | r 8 7 x x r 8 8 1 x r s0 8 _ 1 r s3 9 1 1 r 10 9 _ _ r 9 9 y y l b0 10 1 1 r 11 10 _ _ r 9 10 | _ l 12 11 1 1 r 11 11 _ _ r 9 11 | | l 15 12 1 _ l 13 13 _ | l 14 14 * * l 14 14 | | r 0 15 * * l 15 15 | | r c0 15 x x r c0 15 y y r c0 c0 1 x r c1 c0 _ y r c3 c0 | | r c6 c1 * * r c1 c1 | | r c2 c2 * * r c2 c2 _ x l c5 c3 * * r c3 c3 | | r c4 c4 * * r c4 c4 _ y l c5 c5 * * l c5 c5 | | l 15 c6 x 1 r c6 c6 y _ r c6 c6 _ | l 16 16 * * l 16 16 | | r 17 17 1 1 r 17 17 _ _ r 18 18 1 1 r 18 18 _ 1 l 19 18 | _ l 20 19 1 _ r 18 20 1 | l 21 21 * * l 21 21 | | l 22 22 x 1 l 22 22 y _ l 22 22 | | r 23 23 1 1 r 23 23 _ _ r 24 24 1 1 r 24 24 _ _ r 25 25 1 y r 26 26 1 1 l 27 26 _ _ r 25 27 y _ l 27 27 _ _ l 28 28 1 1 l 28 28 y y l 27 28 _ _ r 29 29 1 x r 30 30 * * r 30 30 | | r 0 r0 _ _ l r0 r0 1 _ l r1 r0 | _ l r7 r1 * * l r1 r1 x 1 r r2 r2 1 x r r3 r2 _ x r r5 r2 | | r h0 r3 * * r r3 r3 | | r r4 r4 1 1 r r4 r4 _ _ l r0 r5 _ _ r r6 r5 1 _ r r10 r5 y _ r r13 r6 * * r r6 r6 | | r r4 r7 1 | l r8 r8 1 1 l r8 r8 _ 1 l r9 r8 x x r 32 r9 1 _ l r8 r9 _ _ l r9 r9 y _ l r14 r9 x _ r r9' r9' _ _ l 31 r9' * * l 14 r10 _ 1 r r11 r10 1 1 r r10 r10 | 1 r r12 r11 _ _ r r11 r11 1 _ r r10 r12 _ _ l r7 r12 1 | l r1 r13 _ y r r5 r14 _ y l r9 b0 * * l b0 b0 | | r b0' b0' 1 x r b0 b0 x 1 r b1 b1 _ _ r b7 b1 1 x r b2 b2 * * r b2 b2 y 1 r b3 b3 _ y r b4 b4 y _ r b3 b4 1 _ r b5 b5 1 1 r b5 b5 _ 1 r b4 b5 | 1 r b6 b6 _ | l b0 b7 * * r b7 b7 y 1 r 9 h0 * * l h0 h0 | 1 l h1 h1 * _ r halt s0 * * r s0 s0 x x l 6 s1 * * l s1 s1 x x r s2 s2 1 _ r s4 s3 1 1 r s3 s3 x _ r s4 s4 * 1 r s4 s4 _ _ l s5 s5 * * l s5 s5 x 1 l s5 s5 | | r p0 p0 1 1 l p0a p0 _ _ r p19 p0a | | r p0b p0b 1 _ r p1 p1 1 _ r p21 p1 _ _ r p10 p1 x _ r p11 p2 * * r p2 p2 _ _ r p3 p3 1 _ r p4 p3 x _ l p8 p4 1 1 r p4 p4 _ x r p5 p4 x x r p5 p5 1 1 r p5 p5 _ 1 l p6 p6 1 1 l p6 p6 * * l p7 p7 1 1 l p7 p7 _ 1 r p3 p8 1 1 l p8 p8 x x l p8 p8 _ x l p9 p9 1 1 l p8 p9 _ _ r p10 p10 x _ r p1 p10 1 1 l p20 p11 1 1 r p11 p11 x _ r p11 p11 _ _ l p12 p12 1 1 l p12 p12 _ _ r m0 m0 1 _ r m1 m0 _ _ r m9 m1 1 1 r m1 m1 _ _ r m2 m2 1 _ r m3 m2 _ _ l m7 m3 1 1 r m3 m3 _ _ r m4 m4 1 1 r m4 m4 _ 1 l m5 m5 1 1 l m5 m5 _ _ l m6 m6 1 1 l m6 m6 _ 1 r m2 m7 1 1 l m7 m7 _ _ l m8 m8 1 1 l m8 m8 _ _ r m0 m9 1 _ r m9 m9 _ 1 r p13 p13 1 1 r p13 p13 _ _ l p14 p14 1 _ l p15 p15 1 1 l p15 p15 _ 1 l p16 p16 1 1 r p17 p16 _ _ r p13 p16 x _ r p18 p16 | | r p22 p17 1 _ l p12 p18 1 _ r halt p19 1 _ r p19 p19 _ 1 r halt p20 * * l p20 p20 x _ r halt p21 * * r p2 p21 _ x r p3 p22 1 1 r p22 p22 _ _ l p23 p23 1 _ l r0 31 _ x r 32 32 * * r 32 32 | _ l r7

Unrestricted Knuth's up-arrow notation
Same as restricted one, expect it doesn't have 2-in-base limitation and strings have right length (we don't decrease by 1). Again, one ^ is addition, ^^ is multiplication. Proper hyper operators require two arrows more 0 * * r 0 0 _ _ l 1 1 1 _ l 2 2 ^ _ l 3 2 1 1 l 4 3 ^ _ l 3 3 1 _ l 2 4 1 1 l 4 4 ^ 1 l 4' 4 _ 1 l halt 4' ^ ^ l 5 4' 1 1 r 0 5 ^ ^ l 5 5 1 1 r 6 6 ^ x r 7 6 1 y r 9 6 | ^ l 12 7 * * r 7 7 _ | r 8 7 | | r 8 8 * * r 8 8 _ ^ l 11 9 * * r 9 9 | | r 10 10 * * r 10 10 _ 1 l 11 11 * * l 11 11 x ^ r 6 11 y 1 r 6 12 * * l 12 12 ^ ^ l 12' 12' ^ ^ l 12' 12' * * l 13 12' 1 x r 14 13 * * l 13 13 ^ ^ r 20 13 _ _ r 20 13 1 x r 14 14 * * r 14 14 ^ ^ r 15 15 ^ ^ r 15 15 x x r 16 15 1 x l 12 16 x x r 16 16 1 x l 12 16 ^ x r 17 17 ^ ^ r 17 17 1 ^ r 18 18 ^ 1 r 17 18 1 1 r 18 18 _ 1 l 19 19 * * l 19 19 x x l 12 20 x 1 r 20 20 ^ ^ r 21 21 ^ ^ r 21 21 x x r 22 22 x x r 22 22 1 _ r 23 22 ^ ^ l 30 23 1 _ r 23 23 ^ ^ l 24 24 _ ^ r 25 25 ^ ^ r 25 25 1 1 l 26 26 ^ 1 r 27 27 1 1 r 27 27 _ _ l 28 28 1 _ l 29 29 * * l 29 29 _ ^ r 25 29 x 1 l 30 30 x 1 l 30 30 ^ ^ r 31 31 * * r 31 31 _ _ l 32 32 1 _ l 1

Graham's number
Okay, this machine consists of 3 parts: Short setup, long setup and compute

Short setup
First, we need to write some setup by-hand. Namely, we need 161_111^111| with head on left end. This is made by this 20-state machine, using 2^m machine by Deedlit: 0 _ 1 l 1 1 _ 1 l 2 2 _ 1 l 3 3 _ 1 l 4 4 _ 1 l s3 s0 1 _ l s5 s0 _ 1 r halt s5 1 1 l s5 s5 _ _ r s3 s3 1 _ l s1 s3 _ 1 r s4 s1 1 1 l s1 s1 _ 1 r s2 s2 1 1 r s2 s2 _ 1 r s3 s4 1 _ l s5 s4 _ 1 l 5 5 1 1 l 6 6 1 x r 7 7 * * r 7 7 _ 1 r 8 8 _ ^ r 9 9 _ 1 r 10 10 _ 1 r 11 11 _ 1 r 12 12 _ | l 13 13 * * l 13 13 x _ l 13 13 _ _ r 1' Where 1' means state 1 in next machine.

Long setup
This machine translates above into (111^111|)63111^^^^^^11 with head on right end end. Remember that above machine moves to state 1 in this machine!

This is achieved by following 20-state machine 0 1 _ r 1 0 _ _ r 9 1 * * r 1 1 _ _ r 2 2 1 x r 3 2 ^ y r 4 2 | | r 6 3 * * r 3 3 _ 1 l 5 4 * * r 4 4 _ ^ l 5 5 * * l 5 5 x 1 r 2 5 y ^ r 2 6 * * r 6 6 _ | l 7 7 * * l 7 7 _ _ l 8 8 * * l 8 8 _ _ r 0 9 * * r 9 9 _ 1 r 10 10 _ 1 r 11 11 _ 1 r 12 12 _ ^ r 13 13 _ ^ r 14 14 _ ^ r 15 15 _ ^ r 16 16 _ ^ r 17 17 _ ^ r 18 18 _ 1 r 19 19 _ 1 r 1' Where 1' means state 1 in next machine.

Compute
Now this is core of machine. Shortly, it computes rightmost number and after computing it computes 3^^^...^^3 with that many arrows+2 (because of way my machine works). It repeats 63 times. This 40-state machine does all the work: 0 * * r 0 0 _ _ l 1 1 1 _ l 2 1 _ _ l 2 2 ^ _ l 3 2 1 1 l 4 3 ^ _ l 3 3 1 _ l 2 4 1 1 l 4 4 ^ 1 l 4' 4 _ 1 l halt 4 | | r 33 4' ^ ^ l 5 4' 1 1 r 0 5 ^ ^ l 5 5 1 1 r 6 6 ^ x r 7 6 1 y r 9 6 | ^ l 12 7 * * r 7 7 _ | r 8 7 | | r 8 8 * * r 8 8 _ ^ l 11 9 * * r 9 9 | | r 10 10 * * r 10 10 _ 1 l 11 11 * * l 11 11 x ^ r 6 11 y 1 r 6 12 * * l 12 12 ^ ^ l 12' 12' ^ ^ l 12' 12' * * l 13 12' 1 x r 14 13 * * l 13 13 ^ ^ r 20 13 _ _ r 20 13 | | r 20 13 1 x r 14 14 * * r 14 14 ^ ^ r 15 15 ^ ^ r 15 15 x x r 16 15 1 x l 12 16 x x r 16 16 1 x l 12 16 ^ x r 17 17 ^ ^ r 17 17 1 ^ r 18 18 ^ 1 r 17 18 1 1 r 18 18 _ 1 l 19 19 * * l 19 19 x x l 12 20 x 1 r 20 20 ^ ^ r 21 21 ^ ^ r 21 21 x x r 22 22 x x r 22 22 1 _ r 23 22 ^ ^ l 30 23 1 _ r 23 23 ^ ^ l 24 24 _ ^ r 25 25 ^ ^ r 25 25 1 1 l 26 26 ^ 1 r 27 27 1 1 r 27 27 _ _ l 28 28 1 _ l 29 29 * * l 29 29 _ ^ r 25 29 x 1 l 30 30 x 1 l 30 30 ^ ^ r 31 31 * * r 31 31 _ _ l 32 32 1 _ l 1 33 1 1 r 33 33 _ 1 l 34 34 * * l 34 34 ^ ^ r 35 35 1 ^ r 36 36 1 1 r 36 36 | 1 r 37 37 1 | l 34 37 _ _ l 1 Accidentaly, state numbers form nice round numbers. After summing we get 80 states. Number of colors is 5, so Turing golf score is: \(80+(5+2)^2-16=80+49-16=113<1000\), so it still applies for competition! Within new scoring system my machine has exactly 2000 points, but, as Deedlit said, not that anyone scores their TMs anyway :P

Goldbach conjecture
This machine halts iff Goldbach conjecture is false. If this is a case, we have pretty long lasting machine in here. But for now, as we don't know for sure if this conjecture is true or false, we can't know if this machine halts. ; Dividing number into two parts - p and q ; Check if p is prime 0 * 1 r 1 1 * 1 r 2 2 * _ l 3 3 1 1 l 3 3 _ _ r p0 ; If p is prime we test q 4 1 1 r 4 4 _ _ r 5 5 1 1 r 5 5 _ _ l q0 ; If both numbers are prime, conjecture doesn't fail for that number 6 _ 1 l 7 7 1 1 l 7 7 _ 1 l 8 8 1 1 l 8 8 _ _ r 0 ; If either number isn't prime, we replace p and q with p+1 and q-1 9 * 1 l 9 9 _ 1 r 10 10 1 _ r 11 11 1 1 r 12 12 1 1 l 13 12 _ _ l halt ; If q=1, number witnesses falsity of conjecture. Halt 13 * * l 13 13 _ _ l 3 14 * 1 r 14 14 _ 1 r 10 ; Primality test for left number p0 1 1 l p1 p0 _ _ r p0 p1 _ _ l p2 p2 _ 1 l p3 p3 _ 1 r p4 p4 x x l p4 p4 1 x r p5 p4 _ _ r p8 p5 x x r p5 p5 _ _ r p6 p6 x x r p6 p6 1 x l p7 p6 _ _ l p11 p7 x x l p7 p7 _ _ l p4 p8 * 1 r p8 p8 _ _ r p9 p9 x x r p9 p9 1 1 l p10 p9 _ _ l p14 p10 x x l p10 p10 _ _ l p4 p11 x 1 l p11 p11 _ _ l p12 p12 * * l p12 p12 _ 1 r p8 p13 * * r p13 p13 _ _ l p14 p13 1 1 l p14 p14 * _ l p15 p14 x 1 l p15 p14 _ _ r 4 p15 * * l p15 p15 _ _ l p16 p16 * * l p16 p16 _ _ r p17 p17 * _ r p18 p17 _ _ r 14 p18 * * r p18 p18 _ _ r p13 ; Primality test for right number q0 1 1 r q1 q0 _ _ l q0 q1 _ _ r q2 q2 _ 1 r q3 q3 _ 1 l q4 q4 x x r q4 q4 1 x l q5 q4 _ _ l q8 q5 x x l q5 q5 _ _ l q6 q6 x x l q6 q6 1 x r q7 q6 _ _ r q11 q7 x x r q7 q7 _ _ r q4 q8 * 1 l q8 q8 _ _ l q9 q9 x x l q9 q9 1 1 r q10 q9 _ _ r q14 q10 x x r q10 q10 _ _ r q4 q11 x 1 r q11 q11 _ _ r q12 q12 * * r q12 q12 _ 1 l q8 q13 * * l q13 q13 _ _ r q14 q13 1 1 r q14 q14 * _ r q15 q14 x 1 r q15 q14 _ 1 r 6 q15 * * r q15 q15 _ _ r q16 q16 * * r q16 q16 _ _ l q17 q17 * _ l q18 q17 _ _ l 9 q18 * * l q18 q18 _ _ l q13 (I know Goldbach conjecture is widely believed to be true, i.e. machine won't halt, but we aren't sure)

Ternary Goldbach conjecture
This is similar statement to above - every odd number >7 can be represented as sum of 3 odd primes. Again, machine halts iff conjecture is false. 0 * 1 r 1 1 * 1 r 2 2 * _ l 3 3 1 1 l 3 3 _ _ r p0 4 1 1 r 4 4 _ _ r 5 5 1 1 r 5 5 _ _ l q0 6 _ 1 l 7 7 1 1 l 7 7 _ 1 l 8 8 1 1 l 8 8 _ _ r 1 9 * 1 l 9 9 _ 1 r 10 10 1 _ r 11 11 1 1 r 12 12 1 1 l 13 12 _ _ l halt 13 * * l 13 13 _ _ l 3 14 * 1 r 14 14 _ 1 r 10 x0 _ 1 r x1 x1 1 1 r x1 x1 _ 1 l x2 x2 1 _ r x3 x3 1 1 r x4 x4 1 _ r x5 x5 1 1 r x5 x5 _ 1 r x6 x6 1 1 r x7 x7 1 _ r x8 x7 _ _ r x9 x8 _ 1 r x9 x8 1 1 r x8 x9 _ 1 r 2 p0 1 1 l p1 p0 _ _ r p0 p1 _ _ l p2 p2 _ 1 l p3 p3 _ 1 r p4 p4 x x l p4 p4 1 x r p5 p4 _ _ r p8 p5 x x r p5 p5 _ _ r p6 p6 x x r p6 p6 1 x l p7 p6 _ _ l p11 p7 x x l p7 p7 _ _ l p4 p8 * 1 r p8 p8 _ _ r p9 p9 x x r p9 p9 1 1 l p10 p9 _ _ l p14 p10 x x l p10 p10 _ _ l p4 p11 x 1 l p11 p11 _ _ l p12 p12 * * l p12 p12 _ 1 r p8 p13 * * r p13 p13 _ _ l p14 p13 1 1 l p14 p14 * _ l p15 p14 x 1 l p15 p14 _ _ r 4 p15 * * l p15 p15 _ _ l p16 p16 * * l p16 p16 _ _ r p17 p17 * _ r p18 p17 _ _ r 14 p18 * * r p18 p18 _ _ r p13 q0 1 1 r q1 q0 _ _ l q0 q1 _ _ r q2 q2 _ 1 r q3 q3 _ 1 l q4 q4 x x r q4 q4 1 x l q5 q4 _ _ l q8 q5 x x l q5 q5 _ _ l q6 q6 x x l q6 q6 1 x r q7 q6 _ _ r q11 q7 x x r q7 q7 _ _ r q4 q8 * 1 l q8 q8 _ _ l q9 q9 x x l q9 q9 1 1 r q10 q9 _ _ r q14 q10 x x r q10 q10 _ _ r q4 q11 x 1 r q11 q11 _ _ r q12 q12 * * r q12 q12 _ 1 l q8 q13 * * l q13 q13 _ _ r q14 q13 1 1 r q14 q14 * _ r q15 q14 x 1 r q15 q14 _ 1 r 6 q15 * * r q15 q15 _ _ r q16 q16 * * r q16 q16 _ _ l q17 q17 * _ l q18 q17 _ _ l 9 q18 * * l q18 q18 _ _ l q13 1a * * r 1a 1a _ | r 2a 1a x m r 2a 1a y n r 2a 1a z o r 2a 2a * * r 2a 2a a x l 3 2a _ _ r 4a 1b * * r 1b 1b _ | r 2b 1b x m r 2b 1b y n r 2b 1b z o r 2b 2b * * r 2b 2b b y l 3 2b _ _ r 4a c0 1 1 l c0 c0 * * r c1 c1 1 x r c2 c1 _ _ r 21 c2 1 1 r c2 c2 * * r c3 c3 1 1 r c3 c3 * * l c4 c4 1 x l c5 c4 _ x r 26 c5 1 1 l c5 c5 * * l c0 1c * * r 1c 1c _ | r 2c 1c x m r 2c 1c y n r 2c 1c z o r 2c 2c * * r 2c 2c c z l 3 2c _ _ r 4a

Computing pi (WIP)
I'm going to use Wallis' product for computing pi. This series is slowly converging, multiplying elements up to 1000 gives 2 digits of precision.

Numerator
Given input 2n, machine makes list of numbers 2n, 2n-2, 2n-4..., 4, 2, copies it and uses my list multiplication to do the job. Then we multiply by 2, because Wallis' formula computes half of pi, and we want whole pi. 0 1 _ r 1 0 _ _ r 5 1 1 1 r 1 1 _ _ r 2 2 1 1 r 2 2 _ 1 l 3 3 1 1 l 3 3 _ _ l 4 4 1 1 l 4 4 _ 1 r 0 5 1 1 r 5 5 _ _ l 6 6 1 _ l 6' 6' 1 _ l 7 6 _ x l 8 7 1 1 l 7 7 _ _ r 0 8 _ _ l 8 8 1 y l 9 9 1 y l 9 9 _ x l 10 10 1 y l 9 10 _ _ r 12 11 * * r 11 11 x _ l 21 11 y _ r 11 12 y 1 r 13 12 x _ r 18 12 _ _ r 11 13 * * r 13 13 _ _ r 14 14 * * r 14 14 x 1 r 15 15 _ x l 16 16 * * l 16 16 _ _ l 17 17 * * l 17 17 1 1 r 12 17 _ _ r 12 18 * * r 18 18 _ _ r 19 19 * * r 19 19 x y r 20 20 _ x l 16 21 1 1 l 21 21 _ _ l 22 22 1 1 l 21 22 _ _ l 23 23 1 1 l 21 23 _ _ r 24 24 _ _ r 24 24 1 _ r l13 l0 1 _ r l13 l0 _ _ r 25 l1 1 1 r l1 l1 _ _ r l2 l2 1 1 r l1 l2 _ _ r l14 l3 1 1 r l3 l3 _ _ r l4 l4 1 1 r l3 l4 _ _ r l5 l5 1 1 r l5 l5 _ 1 l l6 l6 1 1 l l6 l6 _ _ l l7 l7 _ _ l l8 l8 1 1 l l8 l8 _ _ l l9 l9 1 1 l l8 l9 _ _ l l31 l10 1 1 l l10 l10 _ _ l l11 l10 x x r l15 l11 1 1 l l10 l11 _ _ r l12 l12 _ _ r l0 l13 _ x r l2 l13 1 1 r l1 l14 _ _ r l14 l14 1 1 r l3 l15 1 1 r l15 l15 _ _ r l16 l16 1 1 r l15 l16 _ _ r l32 l17 _ _ r l23 l17 1 x r l18 l18 1 1 r l18 l18 _ _ r l19 l19 1 1 r l18 l19 _ _ r l20 l20 1 1 r l20 l20 _ _ r l21 l21 1 1 r l21 l21 _ 1 l l22 l22 * * l l22 l22 x _ r l17 l23 1 1 r l23 l23 _ _ r l24 l24 1 1 r l23 l24 _ x r m0 m0 1 _ r m1 m0 _ _ r m9 m1 1 1 r m1 m1 _ _ r m2 m2 1 _ r m3 m2 _ _ l m7 m3 1 1 r m3 m3 _ _ r m4 m4 1 1 r m4 m4 _ 1 l m5 m5 1 1 l m5 m5 _ _ l m6 m6 1 1 l m6 m6 _ 1 r m2 m7 1 1 l m7 m7 _ _ l m8 m8 1 1 l m8 m8 _ _ r m0 m9 1 _ r m9 m9 _ 1 r l25 l25 1 1 r l25 l25 _ _ l l26 l26 1 _ l l27 l27 1 1 l l27 l27 _ 1 r l25 l27 x 1 r l28 l28 1 1 r l28 l28 _ _ l l29 l29 1 _ l l30 l30 * * l l30 l30 x _ r l0 l31 _ _ l l31 l31 1 1 l l10 l31 x x r l32 l32 _ _ r l32 l32 1 x r l18 25 _ _ r 25 25 1 1 r 26 26 1 1 r 26 26 _ _ r 27 27 1 1 r 26 27 _ 1 r 28 28 _ 1 l 29 29 1 1 l 29 29 _ _ l 30 30 1 1 l 30 30 _ x r n0 n0 1 _ r n1 n0 _ _ r n9 n1 1 1 r n1 n1 _ _ r n2 n2 1 _ r n3 n2 _ _ l n7 n3 1 1 r n3 n3 _ _ r n4 n4 1 1 r n4 n4 _ 1 l n5 n5 1 1 l n5 n5 _ _ l n6 n6 1 1 l n6 n6 _ 1 r n2 n7 1 1 l n7 n7 _ _ l n8 n8 1 1 l n8 n8 _ _ r n0 n9 1 _ r n9 n9 _ 1 r n10 n10 1 1 r n10 n10 _ _ l n11 n11 1 _ l n12 n12 1 1 l n12 n12 _ 1 r n10 n12 x _ l n13 n13 1 1 l n14 n13 _ _ r halt n14 1 1 l n14 n14 _ x r n0

Denominator
Given input 2n, machine makes list of numbers 2n, 2n-2, 2n-4..., 4, 2, copies it and uses my list multiplication to do the job. From every product we subtract 1 and multiply everything together. 0 1 _ r 1 0 _ _ r 5 1 1 1 r 1 1 _ _ r 2 2 1 1 r 2 2 _ 1 l 3 3 1 1 l 3 3 _ _ l 4 4 1 1 l 4 4 _ 1 r 0 5 1 1 r 5 5 _ _ l 6 6 1 _ l 6' 6' 1 _ l 7 6 _ x l 8 7 1 1 l 7 7 _ _ r 0 8 _ _ l 8 8 1 y l 9 9 1 y l 9 9 _ x l 10 10 1 y l 9 10 _ _ r 12 11 * * r 11 11 x _ l 21 11 y _ r 11 12 y 1 r 13 12 x _ r 18 12 _ _ r 11 13 * * r 13 13 _ _ r 14 14 * * r 14 14 x 1 r 15 15 _ x l 16 16 * * l 16 16 _ _ l 17 17 * * l 17 17 1 1 r 12 17 _ _ r 12 18 * * r 18 18 _ _ r 19 19 * * r 19 19 x y r 20 20 _ x l 16 21 1 1 l 21 21 _ _ l 22 22 1 1 l 21 22 _ _ l 23 23 1 1 l 21 23 _ _ r 24 24 _ _ r 24 24 1 _ r l13 l0 1 _ r l13 l0 _ _ r 25 l1 1 1 r l1 l1 _ _ r l2 l2 1 1 r l1 l2 _ _ r l14 l3 1 1 r l3 l3 _ _ r l4 l4 1 1 r l3 l4 _ _ r l5 l5 1 1 r l5 l5 _ 1 l l6 l6 1 1 l l6 l6 _ _ l l7 l7 _ _ l l8 l8 1 1 l l8 l8 _ _ l l9 l9 1 1 l l8 l9 _ _ l l31 l10 1 1 l l10 l10 _ _ l l11 l10 x x r l15 l11 1 1 l l10 l11 _ _ r l12 l12 _ _ r l0 l13 _ x r l2 l13 1 1 r l1 l14 _ _ r l14 l14 1 1 r l3 l15 1 1 r l15 l15 _ _ r l16 l16 1 1 r l15 l16 _ _ r l32 l17 _ _ r l23 l17 1 x r l18 l18 1 1 r l18 l18 _ _ r l19 l19 1 1 r l18 l19 _ _ r l20 l20 1 1 r l20 l20 _ _ r l21 l21 1 1 r l21 l21 _ 1 l l22 l22 * * l l22 l22 x _ r l17 l23 1 1 r l23 l23 _ _ r l24 l24 1 1 r l23 l24 _ x r m0 m0 1 _ r m1 m0 _ _ r m9 m1 1 1 r m1 m1 _ _ r m2 m2 1 _ r m3 m2 _ _ l m7 m3 1 1 r m3 m3 _ _ r m4 m4 1 1 r m4 m4 _ 1 l m5 m5 1 1 l m5 m5 _ _ l m6 m6 1 1 l m6 m6 _ 1 r m2 m7 1 1 l m7 m7 _ _ l m8 m8 1 1 l m8 m8 _ _ r m0 m9 1 _ r m9 m9 _ 1 r l25 l25 1 1 r l25 l25 _ _ l l26 l26 1 _ l l27 l27 1 1 l l27 l27 _ 1 r l25 l27 x 1 r l28 l28 1 1 r l28 l28 _ _ l l29 l29 1 _ l l33 l33 1 _ l l30 l30 * * l l30 l30 x _ r l0 l31 _ _ l l31 l31 1 1 l l10 l31 x x r l32 l32 _ _ r l32 l32 1 x r l18 25 _ _ r 25 25 1 1 r 26 26 1 1 r 26 26 _ _ r 27 27 1 1 r 26 27 _ _ l 28 28 _ _ l 29 29 1 1 l 29 29 _ _ l 30 30 1 1 l 30 30 _ x r n0 n0 1 _ r n1 n0 _ _ r n9 n1 1 1 r n1 n1 _ _ r n2 n2 1 _ r n3 n2 _ _ l n7 n3 1 1 r n3 n3 _ _ r n4 n4 1 1 r n4 n4 _ 1 l n5 n5 1 1 l n5 n5 _ _ l n6 n6 1 1 l n6 n6 _ 1 r n2 n7 1 1 l n7 n7 _ _ l n8 n8 1 1 l n8 n8 _ _ r n0 n9 1 _ r n9 n9 _ 1 r n10 n10 1 1 r n10 n10 _ _ l n11 n11 1 _ l n12 n12 1 1 l n12 n12 _ 1 r n10 n12 x _ l n16 n13 1 1 r n13 n13 _ _ l n14 n14 1 _ l n15 n15 * * l n15 n15 _ _ l n16 n16 1 1 l n17 n16 _ _ r halt n17 1 1 l n17 n17 _ x r n0

Division
Given input of form (a) (b) where (n) means string of n 1's machine outputs integer part written in binary, binary dot and binary expansion of fraction 0 1 1 r 0 0 * . r 3 0' 1 _ l 1 0' _ _ r 3 1 _ 1 r 2 1 1 1 l 1 2 1 1 r 2 2 _ 1 r 0' 3 x x r 3 3 1 x l 4 3 _ _ r 8 4 x x l 4 4 * * l 5 5 1 1 l 5 5 * * r 6 6 1 x r 7 6 x x r 6 6 _ _ r 13 6 . . l 20 7 1 1 r 7 7 * * r 3 8 * * r 8 8 _ 1 l 9 9 * * l 9 9 _ _ l 10 10 x 1 l 10 10 _ _ l 11 10 . . l 18 11 * * l 11 11 _ _ r 12 12 x _ r 12 12 1 _ l 1 12 _ _ r 17 13 * 1 r 13 13 _ _ r 14 14 * * r 14 14 _ 0 l 15 15 * * l 15 15 x 1 l 16 16 x 1 l 16 16 _ _ r 0' 17 1 _ r 17 17 _ _ r halt 18 1 1 l 18 18 x _ l 18 18 _ _ r 19 19 _ _ r 19 19 1 1 r 0 19 . _ r 26 20 x 1 l 20 20 _ _ r 21 21 * * r 21 21 x 1 r 22 22 * 1 r 22 22 _ _ r 23 23 1 1 r 23 23 _ . l 24 24 * * l 24 24 . _ l 25 25 1 1 l 25 25 _ _ r 0' 26 1 _ r 26 26 _ _ r halt

Complete machine
Input is a bit complicated - yy...yxxx1xxx11...1 with number of y's same as number of 1's and even. Machine is very inefficient. Given 4 y's and 4 1's it takes 70000 steps before starting division. But then output is \({45\over 128}\approx 2.844...\neq \pi\). To get better results we need literally millions of y's. Very slow convergence. At least division is pretty efficient 0 x x r 0 0 1 y r 0' 0 _ _ r 5 0 y 1 r 0 0' x _ r 0' 0' 1 _ r 1 0' _ _ r 5 1 1 1 r 1 1 _ _ r 2 2 1 1 r 2 2 _ 1 l 3 3 1 1 l 3 3 _ _ l 4 4 1 1 l 4 4 _ 1 r 0' 5 1 1 r 5 5 _ _ l 6 6 1 _ l 6' 6' 1 _ l 7 6 _ x l 8 7 1 1 l 7 7 _ _ r 0' 8 _ _ l 8 8 1 y l 9 9 1 y l 9 9 _ x l 10 10 1 y l 9 10 _ _ r 12 11 * * r 11 11 x _ l 21 11 y _ r 11 12 y 1 r 13 12 x _ r 18 12 _ _ r 11 13 * * r 13 13 _ _ r 14 14 * * r 14 14 x 1 r 15 15 _ x l 16 16 * * l 16 16 _ _ l 17 17 * * l 17 17 1 1 r 12 17 _ _ r 12 18 * * r 18 18 _ _ r 19 19 * * r 19 19 x y r 20 20 _ x l 16 21 1 1 l 21 21 _ _ l 22 22 1 1 l 21 22 _ _ l 23 23 1 1 l 21 23 _ _ r 24 24 _ _ r 24 24 1 _ r l13 l0 1 _ r l13 l0 _ _ r 25 l1 1 1 r l1 l1 _ _ r l2 l2 1 1 r l1 l2 _ _ r l14 l3 1 1 r l3 l3 _ _ r l4 l4 1 1 r l3 l4 _ _ r l5 l5 1 1 r l5 l5 _ 1 l l6 l6 1 1 l l6 l6 _ _ l l7 l7 _ _ l l8 l8 1 1 l l8 l8 _ _ l l9 l9 1 1 l l8 l9 _ _ l l31 l10 1 1 l l10 l10 _ _ l l11 l10 x x r l15 l11 1 1 l l10 l11 _ _ r l12 l12 _ _ r l0 l13 _ x r l2 l13 1 1 r l1 l14 _ _ r l14 l14 1 1 r l3 l15 1 1 r l15 l15 _ _ r l16 l16 1 1 r l15 l16 _ _ r l32 l17 _ _ r l23 l17 1 x r l18 l18 1 1 r l18 l18 _ _ r l19 l19 1 1 r l18 l19 _ _ r l20 l20 1 1 r l20 l20 _ _ r l21 l21 1 1 r l21 l21 _ 1 l l22 l22 * * l l22 l22 x _ r l17 l23 1 1 r l23 l23 _ _ r l24 l24 1 1 r l23 l24 _ x r m0 m0 1 _ r m1 m0 _ _ r m9 m1 1 1 r m1 m1 _ _ r m2 m2 1 _ r m3 m2 _ _ l m7 m3 1 1 r m3 m3 _ _ r m4 m4 1 1 r m4 m4 _ 1 l m5 m5 1 1 l m5 m5 _ _ l m6 m6 1 1 l m6 m6 _ 1 r m2 m7 1 1 l m7 m7 _ _ l m8 m8 1 1 l m8 m8 _ _ r m0 m9 1 _ r m9 m9 _ 1 r l25 l25 1 1 r l25 l25 _ _ l l26 l26 1 _ l l27 l27 1 1 l l27 l27 _ 1 r l25 l27 x 1 r l28 l28 1 1 r l28 l28 _ _ l l29 l29 1 _ l l30 l30 * * l l30 l30 x _ r l0 l31 _ _ l l31 l31 1 1 l l10 l31 x x r l32 l32 _ _ r l32 l32 1 x r l18 25 _ _ r 25 25 1 1 r 26 26 1 1 r 26 26 _ _ r 27 27 1 1 r 26 27 _ 1 r 28 28 _ 1 l 29 29 1 1 l 29 29 _ _ l 30 30 1 1 l 30 30 _ x r n0 n0 1 _ r n1 n0 _ _ r n9 n1 1 1 r n1 n1 _ _ r n2 n2 1 _ r n3 n2 _ _ l n7 n3 1 1 r n3 n3 _ _ r n4 n4 1 1 r n4 n4 _ 1 l n5 n5 1 1 l n5 n5 _ _ l n6 n6 1 1 l n6 n6 _ 1 r n2 n7 1 1 l n7 n7 _ _ l n8 n8 1 1 l n8 n8 _ _ r n0 n9 1 _ r n9 n9 _ 1 r n10 n10 1 1 r n10 n10 _ _ l n11 n11 1 _ l n12 n12 1 1 l n12 n12 _ 1 r n10 n12 x _ l n13 n12 y y l a0 n13 1 1 l n14 n13 _ _ r n12 n14 1 1 l n14 n14 _ x r n0 a0 x _ l a0 a0 1 _ l a1 a0 _ _ l a5 a1 1 1 l a1 a1 _ _ l a2 a2 1 1 l a2 a2 _ 1 r a3 a3 1 1 r a3 a3 _ _ r a4 a4 1 1 r a4 a4 _ 1 l a0 a5 1 1 l a5 a5 _ _ r a6 a6 1 _ r a6' a6' 1 _ r a7 a6 _ x r a8 a7 1 1 r a7 a7 _ _ l a0 a8 _ _ r a8 a8 1 y r a9 a9 1 y r a9 a9 _ x r a10 a10 1 y r a9 a10 _ _ l a12 a11 * * l a11 a11 x _ r a21 a11 y _ l a11 a12 y 1 l a13 a12 x _ l a18 a12 _ _ l a11 a13 * * l a13 a13 _ _ l a14 a14 * * l a14 a14 x 1 l a15 a15 _ x r a16 a16 * * r a16 a16 _ _ r a17 a17 * * r a17 a17 1 1 l a12 a17 _ _ l a12 a18 * * l a18 a18 _ _ l a19 a19 * * l a19 a19 x y l a20 a20 _ x r a16 a21 1 1 r a21 a21 _ _ r a22 a22 1 1 r a21 a22 _ _ r a23 a23 1 1 r a21 a23 _ _ l a24 a24 _ _ l a24 a24 1 _ l al13 al0 1 _ l al13 al0 _ _ l a25 al1 1 1 l al1 al1 _ _ l al2 al2 1 1 l al1 al2 _ _ l al14 al3 1 1 l al3 al3 _ _ l al4 al4 1 1 l al3 al4 _ _ l al5 al5 1 1 l al5 al5 _ 1 r al6 al6 1 1 r al6 al6 _ _ r al7 al7 _ _ r al8 al8 1 1 r al8 al8 _ _ r al9 al9 1 1 r al8 al9 _ _ r al31 al10 1 1 r al10 al10 _ _ r al11 al10 x x l al15 al11 1 1 r al10 al11 _ _ l al12 al12 _ _ l al0 al13 _ x l al2 al13 1 1 l al1 al14 _ _ l al14 al14 1 1 l al3 al15 1 1 l al15 al15 _ _ l al16 al16 1 1 l al15 al16 _ _ l al32 al17 _ _ l al23 al17 1 x l al18 al18 1 1 l al18 al18 _ _ l al19 al19 1 1 l al18 al19 _ _ l al20 al20 1 1 l al20 al20 _ _ l al21 al21 1 1 l al21 al21 _ 1 r al22 al22 * * r al22 al22 x _ l al17 al23 1 1 l al23 al23 _ _ l al24 al24 1 1 l al23 al24 _ x l am0 am0 1 _ l am1 am0 _ _ l am9 am1 1 1 l am1 am1 _ _ l am2 am2 1 _ l am3 am2 _ _ r am7 am3 1 1 l am3 am3 _ _ l am4 am4 1 1 l am4 am4 _ 1 r am5 am5 1 1 r am5 am5 _ _ r am6 am6 1 1 r am6 am6 _ 1 l am2 am7 1 1 r am7 am7 _ _ r am8 am8 1 1 r am8 am8 _ _ l am0 am9 1 _ l am9 am9 _ 1 l al25 al25 1 1 l al25 al25 _ _ r al26 al26 1 _ r al27 al27 1 1 r al27 al27 _ 1 l al25 al27 x 1 l al28 al28 1 1 l al28 al28 _ _ r al29 al29 1 _ r al33 al33 1 _ r al30 al30 * * r al30 al30 x _ l al0 al31 _ _ r al31 al31 1 1 r al10 al31 x x l al32 al32 _ _ l al32 al32 1 x l al18 a25 _ _ l a25 a25 1 1 l a26 a26 1 1 l a26 a26 _ _ l a27 a27 1 1 l a26 a27 _ _ r a28 a28 _ _ r a29 a29 1 1 r a29 a29 _ _ r a30 a30 1 1 r a30 a30 _ x l an0 an0 1 _ l an1 an0 _ _ l an9 an1 1 1 l an1 an1 _ _ l an2 an2 1 _ l an3 an2 _ _ r an7 an3 1 1 l an3 an3 _ _ l an4 an4 1 1 l an4 an4 _ 1 r an5 an5 1 1 r an5 an5 _ _ r an6 an6 1 1 r an6 an6 _ 1 l an2 an7 1 1 r an7 an7 _ _ r an8 an8 1 1 r an8 an8 _ _ l an0 an9 1 _ l an9 an9 _ 1 l an10 an10 1 1 l an10 an10 _ _ r an11 an11 1 _ r an12 an12 1 1 r an12 an12 _ 1 l an10 an12 x _ r an16 an12 y _ r s0 an13 1 1 l an13 an13 _ _ r an14 an14 1 _ r an15 an15 * * r an15 an15 _ _ r an16 an16 1 1 r an17 an16 _ _ l an12 an17 1 1 r an17 an17 _ x l an0 s0 1 1 r s0 s0 _ _ l d0 d0 1 1 l d0 d0 *. l d3 d0' 1 _ r d1 d0' _ _ l d3 d1 _ 1 l d2 d1 1 1 r d1 d2 1 1 l d2 d2 _ 1 l d0' d3 x x l d3 d3 1 x r d4 d3 _ _ l d8 d4 x x r d4 d4 * * r d5 d5 1 1 r d5 d5 * * l d6 d6 1 x l d7 d6 x x l d6 d6 _ _ l d13 d6. . r d20 d7 1 1 l d7 d7 * * l d3 d8 * * l d8 d8 _ 1 r d9 d9 * * r d9 d9 _ _ r d10 d10 x 1 r d10 d10 _ _ r d11 d10. . r d18 d11 * * r d11 d11 _ _ l d12 d12 x _ l d12 d12 1 _ r d1 d12 _ _ l d17 d13 * 1 l d13 d13 _ _ l d14 d14 * * l d14 d14 _ 0 r d15 d15 * * r d15 d15 x 1 r d16 d16 x 1 r d16 d16 _ _ l d0' d17 1 _ l d17 d17 _ _ l halt d18 1 1 r d18 d18 x _ r d18 d18 _ _ l d19 d19 _ _ l d19 d19 1 1 l d0 d19. _ l d26 d20 x 1 r d20 d20 _ _ l d21 d21 * * l d21 d21 x 1 l d22 d22 * 1 l d22 d22 _ _ l d23 d23 1 1 l d23 d23 _. r d24 d24 * * r d24 d24. _ r d25 d25 1 1 r d25 d25 _ _ l d0' d26 1 _ l d26 d26 _ _ l halt

Odd perfect numbers
This machine runs until it finds odd perfect number (so possibly forever). It can start on blank tape, so is potential Busy Beaver. You can check that it works by starting with input of 8 1's and waiting until it finds 28 (less than half a million steps). ; This is part of divisor sum calculator responsible for finding divisors 0 1 1 l 1 0 x 1 r 0 0 _ 1 l 32 1 1 1 l 1 1 _ _ l 2 2 _ 1 r 3 3 _ _ l 4 4 x x l 4 4 1 x r 5 4 _ _ r 8 5 x x r 5 5 _ _ r 6 6 x x r 6 6 1 x l 7 6 _ _ l 25 7 x x l 7 7 _ _ l 4 8 x 1 r 8 8 _ _ r 9 9 x x r 9 9 1 1 l 7 9 _ _ l 10 10 x 1 l 10 10 _ y l 11 11 1 x l 12 11 x x l 11 11 _ _ l 15 12 1 1 l 12 12 _ _ l 13 13 x x l 13 13 _ x r 14 13 1 1 l 12 14 * * r 14 14 y y l 11 15 * * l 15 15 x x l 16 16 x x l 16 16 _ _ r 17 17 x 1 r 17 17 * * r 17 17 y y l 18 18 1 1 l 18 18 x 1 l 18 18 _ 1 l 19 19 1 _ l 18 19 _ _ r 20 20 * * r 20 20 y _ r c0 c0 1 1 r c0 c0 * * l c1 c1 1 x l c2 c1 _ _ l 26 c2 1 1 l c2 c2 * * l c3 c3 1 1 l c3 c3 * * r c4 c4 1 x r c5 c4 _ _ r 21 c5 1 1 r c5 c5 * * r c0 21 * * r 21 21 _ _ l 22 22 x 1 l 22 22 1 1 l 22 22 _ _ l 23 23 x x l 23 23 _ _ r 24 24 x 1 r 24 24 _ _ l 4 25 x 1 l 25 25 _ y l 18 ; We sum all divisors together 26 * * l 26 26 _ _ l 27 27 * * l 26 27 _ _ r 28 28 1 1 l 28 28 _ _ r 29 29 1 _ r 30 29 x _ r 29 29 _ _ r 31 30 1 1 r 30 30 _ 1 l 28 30 x x r d1 ; We check how sum of proper divisors compares to number d1 * * r d1 d1 _ _ l d2 d2 x _ l d3 d2 1 _ l d4 d3 x x l d4 d3 _ _ r halt ; If there is equality, done d3 1 _ l d5 d4 * * l d4 d4 _ _ r 29 d5 * _ l d5 d5 _ _ r 31 ; Otherwise we increase number by 2 and repeat 31 _ _ r 31 31 x 1 r 0 32 1 1 l 33 32 _ _ l 2 33 1 1 l 33 33 _ 1 l 1

Riesel numbers
This machine halts iff input number n isn't Riesel number, i.e. for some number k number \(n\cdot 2^k-1\) is prime. We can make this machine look through all 55 smaller Riesel number candidates such that machine halts iff none of them are Riesel, and 509203 is truly smallest one. 0 1 _ l 2 1 * 1 r 1 1 _ _ l 19 2 _ 1 l 3 3 _ 1 r 4 4 x x l 4 4 1 x r 5 4 _ _ r 8 5 x x r 5 5 _ _ r 6 6 x x r 6 6 1 x l 7 6 _ _ l 11 7 x x l 7 7 _ _ l 4 8 * 1 r 8 8 _ _ r 9 9 x x r 9 9 1 1 l 10 9 _ _ l 14 10 x x l 10 10 _ _ l 4 11 x 1 l 11 11 _ _ l 12 12 * * l 12 12 _ 1 r 8 13 x x r 13 13 * * l 14 14 * 1 l 15 14 _ _ r halt 15 * * l 15 15 _ _ l 16 16 * * l 16 16 _ _ r 17 17 * _ r 18 17 _ 1 r 1 18 * * r 18 18 _ _ r 13 19 1 1 l 19 19 _ _ r d0 d0 _ _ r 0 d0 1 _ r d1 d1 1 * r d1 d1 _ * r d2 d2 _ 1 r d3 d2 1 * r d2 d3 _ 1 l d4 d4 _ * l d5 d4 1 * l d4 d5 _ * r d0 d5 1 * l d5

Sierpiński numbers
This machine halts iff input number n isn't Sierpiński number, i.e. for some number k number \(n\cdot 2^k+1\) is prime. We can make this machine look through 6 smaller Sierpiński number candidates such that machine halts iff none of them are Sierpiński, and 78557 is truly smallest one. ​0 1 1 l 0 0 _ 1 l 0' 0' _ _ l 2 1 * 1 r 1 1 _ _ l 19 2 _ 1 l 3 3 _ 1 r 4 4 x x l 4 4 1 x r 5 4 _ _ r 8 5 x x r 5 5 _ _ r 6 6 x x r 6 6 1 x l 7 6 _ _ l 11 7 x x l 7 7 _ _ l 4 8 * 1 r 8 8 _ _ r 9 9 x x r 9 9 1 1 l 10 9 _ _ l 14 10 x x l 10 10 _ _ l 4 11 x 1 l 11 11 _ _ l 12 12 * * l 12 12 _ 1 r 8 13 x x r 13 13 * * l 14 14 * 1 l 15 14 _ _ r halt 15 * * l 15 15 _ _ l 16 16 * * l 16 16 _ _ r 17 17 * _ r 18 17 _ _ r 1 18 * * r 18 18 _ _ r 13 19 1 1 l 19 19 _ _ r d0 d0 _ _ r d6 d0 1 _ r d1 d1 1 * r d1 d1 _ * r d2 d2 _ 1 r d3 d2 1 * r d2 d3 _ 1 l d4 d4 _ * l d5 d4 1 * l d4 d5 _ * r d0 d5 1 * l d5 d6 1 _ l 2

Unary calculator
Ikosarakt constructed unary calculator which can be seen here, but it had unhandled expections, like 11-1+1=. Here is my machine, heavily using state recycling, e.g. state 8 is used for all operations, and state 2 is used for multiplication and subtraction. It solves everything left to right and allows operations: +, -, x 0 1 1 r 0 0 x x r 1 0 + 1 l 8 0 - - r 1 0 _ 1 r 0 0 = _ l halt 1 1 _ l 2 1 _ _ r 1 1 * * l 7 2 x x l 3 2 _ _ l 2 2 - _ l 11 3 _ _ l 3 3 1 _ l 4 3 + + r 0 4 1 1 l 4 4 * + l 5 5 1 1 l 5 5 _ 1 r 6 6 * * r 6 6 _ _ l 3 7 * _ l 7 7 + 1 l 8 7 - 1 l 8 8 1 1 l 8 8 _ _ r 9 9 1 _ r 10 10 1 1 r 10 10 _ 1 l 8 10 = _ l halt 10 x x r 1 10 + 1 l 8 10 - - r 1 11 1 - r 1 11 * _ r 11 11 = _ l 11 11 + _ r 0

Legendre's conjecture
It states that for every integer n there is prime p such that \(n^2<p<(n+1)^2\). This machine simply searches every interval for prime number and succeds. ; Initial input: 11__11111 ; We check if current number is prime 0 1 1 l 1 0 _ _ r 0 1 _ _ l 2 2 _ 1 l 3 3 _ 1 r 4 4 x x l 4 4 1 x r 5 4 _ _ r 8 5 x x r 5 5 _ _ r 6 6 x x r 6 6 1 x l 7 6 _ _ l 11 7 x x l 7 7 _ _ l 4 8 * 1 r 8 8 _ _ r 9 9 x x r 9 9 1 1 l 10 9 _ _ l 14 10 x x l 10 10 _ _ l 4 11 x 1 l 11 11 _ _ l 12 12 * * l 12 12 _ 1 r 8 13 * * r 13 13 1 1 l 14 14 * 1 l 15 14 _ _ r 19 15 * * l 15 15 _ _ l 16 16 * * l 16 16 _ _ r 17 17 * _ r 18 17 _ _ r 27 18 * * r 18 18 _ _ r 13 ; If it is, we replace interval ((n-1)^2,n^2) with (n^2,(n+1)^2) 19 1 1 r 19 19 _ 1 r 20 20 _ 1 r 20 20 1 _ r 21 20 x x r 24 21 1 1 r 21 21 * x r 22 22 1 1 r 22 22 _ 1 l 23 23 * * l 23 23 _ _ r 20 24 1 x r 24 24 _ 1 l 25 25 x 1 l 25 25 _ _ l 25 25 1 1 l 26 26 1 1 l 26 26 _ _ r 0 ; If it isn't, we try next number 27 * 1 r 27 27 _ 1 r 28 28 _ _ l 26 ; If we "hit ceiling" (n^2 for some n) Legendre's conjecture is false 28 1 1 l halt This is my 5th TM which is equivalent to some unsolved problem. I want to show that is so called RE-hard problem, i.e. every recursively enumerable problem is translateable to some halting instance. If we could solve halting problem, so we could every RE problem.

Catalan–Mersenne number conjecture
It says that numbers of form \(M_{M_{..._{M_2}}}\) are all primes up to a certain limit. I can prove that otherwise all such numbers are prime. This is what machine checks. ; Initial input: 11 ; We check if current number is prime 0 1 1 l 1 0 _ _ r 0 1 _ _ l 2 2 _ 1 l 3 3 _ 1 r 4 4 x x l 4 4 1 x r 5 4 _ _ r 8 5 x x r 5 5 _ _ r 6 6 x x r 6 6 1 x l 7 6 _ _ l 11 7 x x l 7 7 _ _ l 4 8 * 1 r 8 8 _ _ r 9 9 x x r 9 9 1 1 l 10 9 _ _ l 14 10 x x l 10 10 _ _ l 4 11 x 1 l 11 11 _ _ l 12 12 * * l 12 12 _ 1 r 8 13 * * r 13 13 1 1 l 14 14 * 1 l 15 14 _ _ r 19 15 * * l 15 15 _ _ l 16 16 * * l 16 16 _ _ r 17 17 * _ r 18 17 _ _ r halt 18 * * r 18 18 _ _ r 13 ; If it is, we check 2^n-1 19 1 _ l 24 19 _ _ l 25 20 1 1 l 20 20 _ 1 r 21 21 1 1 r 21 21 _ 1 r 22 22 1 _ l 20 22 _ 1 r 23 23 1 _ l 24 23 _ _ l 25 24 1 1 l 24 24 _ _ r 22 25 1 1 l 25 25 _ _ r 0

Fermat prime search
If there for some n>4 \(2^{2^n}\) is prime, machine halts. But this machine is very uneffective and checks all powers of 2. ; Initial input: 111_11111 ; We check if current numer is prime 0 1 1 l 1 0 _ _ r 0 1 _ _ l 2 2 _ 1 l 3 3 _ 1 r 4 4 x x l 4 4 1 x r 5 4 _ _ r 8 5 x x r 5 5 _ _ r 6 6 x x r 6 6 1 x l 7 6 _ _ l 11 7 x x l 7 7 _ _ l 4 8 * 1 r 8 8 _ _ r 9 9 x x r 9 9 1 1 l 10 9 _ _ l 14 10 x x l 10 10 _ _ l 4 11 x 1 l 11 11 _ _ l 12 12 * * l 12 12 _ 1 r 8 13 * * r 13 13 1 1 l 14 14 * 1 l 15 14 _ _ r 24 15 * * l 15 15 _ _ l 16 16 * * l 16 16 _ _ r 17 17 * _ r 18 17 _ _ r 19 18 * * r 18 18 _ _ r 13 ; No matter what is result, we replace n with 2n-1 ; This makes sure we check only numbers of form 2^m+1 19 * _ l 20 19 _ _ l 22 20 * 1 l 20 20 _ 1 r 21 21 * 1 r 21 21 _ 1 r 19 22 1 1 l 22 22 _ _ r 23 23 1 _ r 0 ; If number was prime, we decrement counter 24 1 1 r 24 24 _ _ r 25 25 _ _ l halt ; If counter was 0, we found new Fermat prime (yay!) 25 1 1 r 26 26 1 1 r 26 26 _ _ l 27 27 1 _ l 28 28 1 1 l 28 28 _ _ l 29 29 1 1 l 29 29 _ _ r 19

Regular paperfolding sequence
This machine isn't my idea, I've seen it on some Turing machine simulator some time ago. I just recreated it.

Input is \(2^n-1\) 1's for any \(n>0\), output is exactly that many characters of dragon curve sequence 0 1 R r 1 0 _ _ l halt 1 1 1 r 2 2 1 L r 3 3 1 1 r 0 * _ _ l 4 4 * * l 4 4 _ _ r 0 * * * r *

Direct simulation of binary TMs
This is first truly universal Turing machine made by me. This machine has stationary "program box", which is simply program of binary TM we want to simulate. On the left and right side of the box is input. Currently scanned cell is on right of box. Detailed construction of box below. Example: |X1>R 1>L 1L 1<<< 1>L 1R 0<< R r 11 10 < L l 14 10a * * r 10a 10a _ _ l 10b 10a Z Z r 10 10b * * l 10b 10b X X r 10 11 * * r 11 11 _ Y r 12 11 | | r halt 12 * * r 12 12 _ Y l 13 12 | | r halt 13 * * l 13 13 X X r 10a 14 * * l 14 14 _ Y l 15 14 | | r halt 15 * * l 15 15 _ Y r 16 15 | | r halt 16 * * r 16 16 X X r 10a 17 * * l 18 18 R > l 18 18 L < l 18 18 * * l 19 19 * * l 19 19 X Y l 19 19 Z Y l 19' 19 Y _ l 19 19 _ _ r 20 19 | | r 20 19' * * l 19' 19' X _ l 19 20 * * r 20 20 Y X r 22 20 _ X r 21 21 * * r 21 21 Y _ r 22 22 * * r 22 22 L L l L0 22 R R r R0 L0 * * l L0 L0 | | l L1 L0 Y _ l L0 L1 * * l L1 L1 _ _ r L2 L2 0 _ r L3 L2 1 _ r L4 L2 | | r L5 L3 0 0 r L3 L3 1 0 r L4 L3 | | r L6 L3 _ 0 l L8 L4 0 1 r L3 L4 1 1 r L4 L4 | | r L7 L4 _ 1 l L8 L5 * * r L5 L5 | | r L2 L6 * * r L6 L6 | | r L3 L7 * * r L7 L7 | | r L4 L8 * * l L8 L8 | | r 2 R0 * * r R0 R0 | | r R1 R1 * * r R1 R1 _ _ l R2 R2 0 _ l R3 R2 1 _ l R4 R2 | | l R5 R3 0 0 l R3 R3 1 0 l R4 R3 | | l R6 R3 _ 0 r R8 R4 0 1 l R3 R4 1 1 l R4 R4 | | l R7 R4 _ 1 r R8 R5 * * l R5 R5 | | l R2 R6 * * l R6 R6 | | l R3 R7 * * l R7 R7 | | l R4 R8 * * r R8 R8 | | r 0 23 * * l 24 24 R > l 24 24 L < l 24 24 * * l 24 24 Z Z l 23 24 X Y r 25 25 * * r 25 25 Z Y r 25' 25 Y _ r 25 25 _ _ l 26 25' * * r 25' 25' Y _ r 25' 25' _ _ l 26' 26 * * l 26 26 _ X l 27 26' * * l 26' 26' _ _ l 26 27 * * l 27 27 Y _ r 22 28 * * l 28 28 X X r 29 29 * * r 29 29 _ Z l 3

Program construction
For every state we have 2 transitions: transition for symbol 0 and for symbol 1. Say we are in state a and we want to transit to state b, where a and b  are natural numbers. First character of transition is symbol we want to write. Then, if a>b, we write a-b >'s. If a>>>>L. The program box is constructed as follows: first is |, then blank, then transition for state 0 symbol 0, blank, transition for state 0 symbol 1. blank, state 1 symbol 0, blank, state 1 symbol 1 etc. and end with |. If we want machine to halt, we give transition suffiscently many >'s or <'s to run out of states. Finally, we put X instead of blank before state n, symbol 0 where n is starting state. You can now add input for constructed machine to the left or to the right using 0's and 1's. Complicated to explain, easier to do.

Universality proof
We know that any Turing machine can be simulated by 2-color Turing machine. Such reduction is bounded by exponential function. Now that binary machine can be simulated by above machine, with reduction bounded by polynominal. So this reduction is do-able in recursive time, thus can't be universal. Machine universally simulating machines with non-universal reduction is universal, Q.E.D.

SKI combinator calculus (WIP)
Right now it works with all combinators, but can only execute I and K combinators. I'm not planning to implement \(\Omega\), but you can try yourself :P

It works with fully parenthesised expressions like ((SS)(KS)) as well as partially, like SS(KS) 0 _ I r halt 0 I _ r 0 0 ( _ r 1 0 K _ r 9' 0 O O l halt 0 S S r 9' 1 * * r 1 1 ( [ l 2 1 ) ] l 4 2 * * l 2 2 _ ( r 3 3 ( ( r 3 3 * * r 1 4 * * l 4 4 _ _ r 5 5 ( _ r 3 5 * * r 6 6 * * r 6 6 _ _ l 7 7 ) _ l 7) 7 ( _ l 7( 7 I _ l 7I 7 K _ l 7K 7 S _ l 7S 7 O _ l 7O 7 ] _ l 8 7) ) ) l 7) 7) l 7( 7) I ) l 7I 7) K ) l 7K 7) S ) l 7S 7) O ) l 7O 7) ] ) l 8 7 ( l 7) 7( ( ( l 7( 7( I ( l 7I 7( K ( l 7K 7( S ( l 7S 7( O ( l 7O 7( ] ( l 8 7I ) I l 7) 7I ( I l 7( 7I I I l 7I 7I K I l 7K 7I S I l 7S 7I O I l 7O 7I ] I l 8 7K ) K l 7) 7K ( K l 7( 7K I K l 7I 7K K K l 7K 7K S K l 7S 7K O K l 7O 7K ] K l 8 7S ) S l 7) 7S ( S l 7( 7S I S l 7I 7S K S l 7K 7S S S l 7S 7S O S l 7O 7S ] S l 8 7O ) O l 7) 7O ( O l 7( 7O I O l 7I 7O K O l 7K 7O S O l 7S 7O O O l 7O 7O ] O l 8 8 * * l 8 8 ] ) l 8 8 [ ( l 8 8 _ _ r 0 9' ( [ l 10 9' S ] l 9S 9' K ] l 9K 9' I ] l 9I 9' O ] l 9O 9' [ [ r 32 9' ] X l 27) 9' _ X r 30 9S _ S l 9[ 9S S S r 9[ 9S X S l 9' 9S Y Y r 9S 9S ] S l 35 9K _ K l 9[ 9K S K r 9[ 9K X K l 9' 9K Y Y r 9K 9K ] K l 35 9I _ I l 9[ 9I S I r 9[ 9I X I l 9' 9I Y Y r 9I 9I ] I l 35 9O _ O l 9[ 9O S O r 9[ 9O X O l 9' 9O Y Y r 9O 9O ] O l 35 9[ _ [ r 15 9[ ] _ l 9] 9] * * l 28 9 * * r 9 9 ( [ l 10 9 ) ] l 12 10 * * l 10 10 _ ) r 11 11 * * r 11 11 [ [ r 9 12 * * l 12 12 _ _ r 13 13 ) _ r 14 14 ) ) r 11 14 [ [ r 15 14 S _ r 26 14 X _ r 26 15 * * r 15 15 ( ( l 16 15 _ _ l 16 16 * * l 16 16 ] ] r 17 17 ( ( r 18 17 * [ l 22 17 _ K l halt 18 * * r 18 18 ) [ l 19 18 [ S r 18 19 * * l 19 19 ( S l 20 20 * * l 20 20 ( ( r 18 20 ] ] r 21 21 * _ r 21 21 [ [ l 22 22 _ _ l 22 22 ] ) l 23 23 * * l 23 23 ] ) l 23 23 [ ( l 23 23 _ _ r 24 24 ( _ r 24( 24 ) _ r 24) 24 I _ r 24I 24 K _ r 24K 24 S _ r 24S 24 O _ r 24O 24( ( ( r 24( 24 ( r 24) 24( I ( r 24I 24( K ( r 24K 24( S ( r 24S 24( O ( r 24O 24) r 24( 24) ) ) r 24) 24) I ) r 24I 24) K ) r 24K 24) S ) r 24S 24) O ) r 24O 24) _ ) l 25 24) [ ) l 8 24I ( I r 24( 24I ) I r 24) 24I I I r 24I 24I K I r 24K 24I S I r 24S 24I O I r 24O 24K ( K r 24( 24K ) K r 24) 24K I K r 24I 24K K K r 24K 24K S K r 24S 24K O K r 24O 24S ( S r 24( 24S ) S r 24) 24S I S r 24I 24S K S r 24K 24S S S r 24S 24S O S r 24O 24O ( O r 24( 24O ) O r 24) 24O I O r 24I 24O K O r 24K 24O S O r 24S 24O O O r 24O 25 * * l 25 25 _ _ r 24 26 * * r 26 26 _ _ l 27 26 Y X l 33 27 * * l 27 27 ] _ l 27) 27' ] _ l 27) 27' [ _ l 27( 27' I _ l 27I 27' K _ l 27K 27' S _ l 27S 27' O _ l 27O 27' _ X r 34 27' Y _ r 37 27) ] ] l 27) 27) [ ] l 27( 27) I ] l 27I 27) K ] l 27K 27) S ] l 27S 27) O ] l 27O 27( ] [ l 27) 27( [ [ l 27( 27( I [ l 27I 27( K [ l 27K 27( S [ l 27S 27( O [ l 27O 27( _ [ l 28 27( X [ l 27' 27( Y [ r 37 27I ] I l 27) 27I [ I l 27( 27I I I l 27I 27I K I l 27K 27I S I l 27S 27I O I l 27O 27I _ I l 28 27I X I l 27' 27I Y I r 37 27K ] K l 27) 27K [ K l 27( 27K I K l 27I 27K K K l 27K 27K S K l 27S 27K O K l 27O 27K _ K l 28 27K X K l 27' 27K Y K r 37 27S ] S l 27) 27S [ S l 27( 27S I S l 27I 27S K S l 27K 27S S S l 27S 27S O S l 27O 27S _ S l 28 27S X S l 27' 27S Y S r 37 27O ] O l 27) 27O [ O l 27( 27O I O l 27I 27O K O l 27K 27O S O l 27S 27O O O l 27O 27O _ O l 28 27O X O l 27' 27O Y O r 37 28 _ X r 29 29 * * r 29 29 _ X r 9' 30 * * r 30 30 ] X r 31 30 _ S l 30' 30' * * l 30' 30' X _ l 30' 30' Y _ l 30' 30' _ _ r halt 31 * * r 31 31 ] Y r 9' 32 * * r 32 32 _ Y r 9' 33 * * l 33 33 _ Y r 26 34 * * r 34 34 X X r 31 35 * * l 35 35 _ Y r 36 36 * * r 36 36 Y X r 27' Small modification - machine now supports O as instant halt command. Because oracle is impossible to do, when we hit a point where O must be used machine stops, and you can by hand execute next step.

Vector reduction
Let us have {a,b,...} as a vector to reduce as here. Then input is |(a)|(b)... where (n) is string of n 1's (n=0 is empty string). I think I got this one more compact than Ixfd's Python program. 0 * * r 0 0 _ _ l 1 1 * * l 1 1 _ _ l 5 1 1 x r 2 2 * * r 2 2 _ _ r 3 3 1 1 r 3 3 _ 1 l 4 4 1 1 l 4 4 _ _ l 1 5 1 1 l 5 5 _ 1 r 6 6 1 1 r 6 6 _ _ r 7 7 | | r 7 7 x 1 r 7 7 _ _ l 8 8 1 1 l 8 8 | | l 9 9 | | l 9 9 1 | r 10 9 _ _ r 24 10 | _ r 11 11 * * r 11 11 _ _ r 12 12 1 _ l 13 12 _ _ l 18 13 _ _ l 14 14 * * l 14 14 _ 1 r 15 15 | _ r 16 15 1 _ r 17 15 _ _ r 11 16 | | r 16 16 1 | r 17 16 _ | r 11 17 1 1 r 17 17 _ 1 r 11 18 _ _ l 18 18 1 _ l 19 18 | _ l 20 19 1 1 l 19 19 | 1 l 20 19 _ | r 21 20 | | l 20 20 _ | r 0 20 1 1 r 22 21 1 _ r 21 21 _ _ l 21 21 | _ l 0 22 1 | r 23 23 1 1 r 23 23 _ 1 r 0 24 * _ r 24 24 _ _ r 25 25 * _ r 25 25 _ _ l 26 26 _ _ l 26 26 1 _ l halt I'm not sure if it works correctly, any testing appreciated.

Laver tables (WIP)
Due to me being lazy, we require predefined input, e.g: (it has 4 {}'s, each with 4 spaces, each with 3=4-1 cells.)

{000|000|000|000}{000|000|000|000}{000|000|000|000}{000|000|000|000} Machine is, again, built in parts:

Setup
We know how the first column of Laver table looks like. Thus we must code it into machine (input as above): 0 * * r 0 0 1 | r 0 0 0 | r 1 1 * * r 1 1 { { r 2 2 1 1 r 2 2 0 1 l 3 2 | | l 8 3 * * l 3 3 { { l 4 4 * * l 4 4 { { r 5 5 1 1 r 5 5 | 1 r 6 6 0 0 r 7 6 | | r 1 7 * * r 7 7 { { r 0 8 1 0 l 8 8 { { r halt

Next table
If one table failed at being Laver, we check the lexicographically next one. 0 * * r 0 0 | | r 1 1 1 1 r 1 1 | | l 2 1 } } l 2 1 0 1 l halt 2 1 0 l 2 2 | | r 0 Example input: {100|111|111|111}{110|111|100|000}{111|000|000|000}{000|000|000|000} Not that machine handles no expection as if we run out of tables - according to theorem, there is always a Laver table, so we don't have to worry.

\(a*(b*c)\)
To the left of the table we write \(a,b,c\) in the same format as numbers are written in table. 0 * * r 0 0 { x l 1 1 * * l 1 1 _ _ l 2 2 * * l 2 2 _ _ l 3 3 0 0 l 3 3 1 0 r 4 3 _ _ r 5 3 x x r 5 4 * * r 4 4 x { r 0 5 0 0 r 5 5 _ _ r 6 6 1 1 r 6 6 0 0 l 7 6 _ _ l 7 7 0 0 l 7 7 1 0 r 8 7 _ _ r 11 8 * * r 8 8 x x r 9 9 * * r 9 9 | x l 10 10 * * l 10 10 _ _ l 7 11 * * r 11 11 x x r 12 12 * * r 12 12 | | l 13 12 } } l 13 13 0 0 l 13 13 1 0 l 14 13 x | l 17 14 * * l 14 14 _ _ l 15 15 0 0 l 15 15 1 1 r 16 15 _ _ r 16 16 0 1 r 11 17 * * l 17 17 x | l 17 17 } } r 18 17 _ _ l 19 18 | { l 18 18 { { l 18 18 } } l 17 19 * * l 19 19 _ _ l 20 20 * * l 20 20 _ _ l 21 20 x _ r 25 21 0 0 l 21 21 1 0 r 22 21 _ _ r 24 22 0 0 r 22 22 _ _ r 23 23 1 1 r 23 23 0 1 l 20 24 0 _ r 24 24 _ x r 0 25 0 _ r 25 25 _ _ r halt Example input: 110 100 110 {100|111|111|111}{110|111|100|000}{111|110|110|000}{000|000|000|000}

Direct simulation of 2-counter machines This is a project similar to my direct simulation of binary TMs.

6-color version
Here it is, my second ( finished ) computationally universal Turing machine! Look below for how-to-use guide. 0 | | r 0 0 + + r 1 0 - - r 32 0 _ _ l halt 1 _ _ r 2 1 + + r 8 1 - - r 12 2 * * r 2 2 _ _ r 3 3 _ _ r 4 3 * * r 2 4 + + r 5 4 _ + l 6 5 * * r 4 6 * * l 6 6 | _ r 7 7 * * r 7 7 _ | r 0 8 _ _ r 9 8 * * r 8 9 _ _ r 10 9 * * r 8 10 * * r 11 11 - - r 10 11 _ - l 6 12 + - r 13 12 - + l 23 12 _ _ l 1 13 * * r 13 13 _ | l 14 14 * * l 14 14 | | r 15 14 ! ! r 16 14 ? ? r 16 15 + + r 16 16 - - r 16 16 + - r 17 16 _ _ l 19 17 * * r 17 17 | _ r 18 18 * * r 18 18 _ | l 14 19 * + l 19 19 | _ r 20 19 ! _ r 21 19 ? _ r 21' 20 + + r 21 21 + - r 22 21' + - r 21 22 * * r 22 22 | | r 0 23 * + l 23 23 | | l 24 23 ! ! l 24 23 ? ? l 24 24 * * l 24 24 _ | r 25 25 * * r 25 25 | | r 26 25 ! ! r 26 25 ? ? r 26 26 + + r 26 26 - + l 27 26 _ _ l 29 27 * * l 27 27 | | l 28 27 ! ! l 28 27 ? ? l 28 28 * * l 28 28 | _ l 24 29 * - l 29 29 | _ r 30 29 ! _ r 30' 29 ? _ l 31 30' * * r 30 30 - + l 31 31 * * l 31 31 | | r 0 32 + + r 33 32 - - r 39 33 * * r 33 33 _ _ r 34 34 * * r 33 34 _ _ r 35 35 + + r 36 35 _ _ l 46 36 * * r 37 37 + + r 36 37 _ _ l 38 38 * * l 38 38 + _ l 6 39 * * r 39 39 _ _ r 40 40 * * r 39 40 _ _ r 41 41 * * r 42 42 - - r 43 42 _ _ l 49 43 * * r 44 44 - - r 43 44 _ _ l 45 45 * * l 45 45 - _ l 6 46 * * l 46 46 | ! r 47 47 - - r 48 48 * - r 12 49 * * l 49 49 | ? r 47

4-color version (WIP)
Coming... probably some day. Possibly never. But I hope for the best :P 0 | | r 0 0 + + r 1 0 - - r 32 0 _ _ l halt 1 _ _ r 2 1 + + r 8 1 - - r 12 2 * * r 2 2 _ _ r 3 3 _ _ r 4 3 * * r 2 4 + + r 5 4 _ + l 6 5 * * r 4 6 * * l 6 6 | _ r 7 7 * * r 7 7 _ | r 0 8 _ _ r 9 8 * * r 8 9 _ _ r 10 9 * * r 8 10 * * r 11 11 - - r 10 11 _ - l 6 12 + - r 13 12 - + l 23 13 * * r 13 13 _ | l 14 14 * * l 14 14 | | r 15 15 + + r 16 16 - - r 16 16 + - r 17 16 _ _ l 19 17 * * r 17 17 | _ r 18 18 * * r 18 18 _ | l 14 19 * + l 19 19 | _ r 20 20 + + r 21 21 + - r 22 22 * * r 22 22 | | r 0 23 * + l 23 23 | | l 24 24 * * l 24 24 _ | r 25 25 * * r 25 25 | | r 26 26 + + r 26 26 - + l 27 26 _ _ l 29 27 * * l 27 27 | | l 28 28 * * l 28 28 | _ l 24 29 * - l 29 29 | _ r 30 30 - + l 31 31 * * l 31 31 | | r 0 32 + + r 33 32 - - r 39 33 * * r 33 33 _ _ r 34 34 * * r 33 34 _ _ r 35 35 + + r 36 36 * * r 37 37 + + r 36 37 _ _ l 38 38 * * l 38 38 + _ l 6 39 * * r 39 39 _ _ r 40 40 * * r 39 40 _ _ r 41 41 * * r 42 42 - - r 43 43 * * r 44 44 - - r 43 44 _ _ l 45 45 * * l 45 45 - _ l 6

Program construction
There are 5 possible inctructions: increment + counter, increment - counter, decrement + counter or conditional jump, decrement - counter or conditional jump, unconditional jump. Programs for 2CM can be written in the following manner: INC+ INC- DEC+ N DEC- N GOTO N Where INC means "increment respective counter", DEC* N means "decrement respective counter, and jump to N-th instruction if 0", and GOTO N means "jump to N-th instruction". In my machine the coding is following: INC+    + INC-    ++ DEC+    -+ DEC-    -- GOTO    +- We also have to code N into last 3 instructions - this is done by adding +'s or -'s to the right of this instructions, depending on if we want to go to instruction earlier or later in program. This is fairly straightforward, e.g. +-+++ will jump to instruction 3 to the right, - will conditionally jump to instruction 3 to the left. Halt instruction "caps" the whole program, and it doesn't have to be coded in any way.

Input for my machine starts with a single |, which marks current instruction. Later we write instructions separated by single blanks. Then we write two blanks, and everything to the right codes counters in the following way:

1st, 3rd, 5th, 7th... cell of that part of tape codes + counter. All other cells code - counter. Number of +'s and -'s represent numbers stored in counters, e.g. the following stores 5 in + and 3 in - counter: +-+-+-+ + (NOTE: if - counter is not empty, but + is, then there will be 3 blanks between instructions and first -)

Example input: |-++++ ++ +--- --++++ + + + + + + This simply doubles number in + counter, which is 3 in this example.

Universality proof
First, we can encode any binary TM by a 3CM (original argument due to Minsky, iirc): in the first counter we store left side of the tape interpreted as binary number, in second we store right side. Third counter is used as scratch, to make all necessary operations on first two counters. I'm not going to go into great detail here.

Second, we can encode 3CM by a 2CM: first we code numbers apperent in 3 counters into one number using Godelization: if counters store numbers \(A,B,C\) then we code it using \(2^A3^B5^C\). Second counter is then, again, used as a scratch.

Last, but not least, my machine can simulate any 2CM, which ends universality proof.

Cyclic tag systems
I'm on universality hype now, so maybe I'll go and finish SKI machine later?

0 * | r 1 1 * * r 1 1 | | r 2 2 0 0 r 3 2 1 0 l 11 3 * * r 3 3 _ _ l 4 3 | _ l 16 4 0 _ l 5 4 1 _ l 6 5 0 0 l 5 5 1 0 l 6 5 | | l 7 6 0 1 l 5 6 1 1 l 6 7 * * l 7 7 | _ r 8 8 * * r 8 8 _ | r 1 8 | | l 9 9 * * l 9 9 _ _ l 10 10 * * l 9 10 _ _ r 0 11 * * r 11 11 _ | l 12 12 * * l 12 12 | | l 13 13 * * l 13 13 | | r 14 14 0 | r a0 14 1 | r b0 14 _ _ l 15 14 | | l 15 a0 * * r a0 a0 | | r a1 a1 * * r a1 a1 | 0 r a1 a1 _ | l a2 a2 * * l a2 a2 | | l a3 a3 * * l a3 a3 | 0 r 14 b0 * * r b0 b0 | | r b1 b1 * * r b1 b1 | 1 r b1 b1 _ | l b2 b2 * * l b2 b2 | | l b3 b3 * * l b3 b3 | 1 r 14 15 * * l 15 15 | | r 1 16 0 _ l 4 16 1 _ l halt

Program construction
(I assume you all know how cyclic tag systems work)

For every production tag system makes we have to add 0 at the end (I made it so that we can handle empty productions). Now input for the machine is as following: modified productions are separated by single blanks and we add |'s at the beginning and the end. After | on the left we put tag system data. Also, I allowed myself to implement halt command: if machine uses production ending with 1 (not 0, like all modified productions) Example: |0100 0 1 10100|1101001

Neary's binary tag systems
Yesterday I found particularily simple computationally universal model - certain restricted model of binary tag systems, which have only two characters (in paper denoted b,c and in my machine 0,1) and thus two prosuction rules. However, production rule for 0 is trivial (it just appends another 0 at the end), so it could be easily hard-coded into machine's program. Look below for how to create input for machine. 0 * * r 0 0 _ _ r 1 1 _ _ r 1 1 * 1 r 2 2 * 1 r 2 2 _ _ r 3 3 _ _ r 3 3 0 0 r 4 3 1 1 l 11 4 * * r 4 4 _ 0 l 5 5 * * l 5 5 _ _ l 6 6 * * l 6 6 0 0 l 7 6 1 0 r 8 7 0 0 l 7 7 1 0 r 8 7 _ _ r 1 8 * * r 8 8 _ _ r 9 9 _ _ r 9 9 * _ r 10 10 * * l 6 10 _ _ l halt 11 * * l 11 11 0 0 l 12 12 * * l 13 12 _ 0 r 16 13 * * l 13 13 _ _ r 14 14 0 _ l a0 14 1 _ l b0 15 * * l 15 15 _ _ l 11 a0 _ 0 r a1 a1 _ _ r a2 a2 * * r a2 a2 _ _ r a3 a3 _ _ r a3 a3 * * r a4 a4 1 1 r a4 a4 _ _ r a5 a5 _ _ r a5 a5 * * r a6 a6 * * r a6 a6 _ 0 l 15 b0 _ 1 r b1 b1 _ _ r b2 b2 * * r b2 b2 _ _ r b3 b3 _ _ r b3 b3 * * r b4 b4 1 1 r b4 b4 _ _ r b5 b5 _ _ r b5 b5 * * r b6 b6 * * r b6 b6 _ 1 l 15 16 0 _ r 16 16 _ _ r 16 16 1 1 r 17 17 1 1 r 17 17 _ _ l 6

Program construction
We have 3 variables for these tag systems - deletiong number \(\beta\), production rule \(u\) for when 1 is read, and dataword \(w\). Input is simply \(u\) with 0 added at the end followed by blank, followed by \(\beta\) 1's, followed by blank and dataword. Example: 11011100 11111 1 Here \(u=1101110\), \(w=1\), \(\beta=5\)

Universality proof
Someone has discovered a truly marvelous proof of this, which this blog post is too short to contain. So I'm gonna link it: boop

Boolean satisfiability
The question about proper halting of this machine is NP-complete - if formula is unsatisfiable, machine halts because of lack of corresponding instruction. Input coding below. 0 * * r 0 0 _ _ r 1 1 T _ l T0 1 F _ l F0 1 | | r 4 F0 _ F r F1 F1 * * r F1 F1 | | r F2 F2 0 0 r F2 F2 T T r F3 F2 F F r F4 F2 _ 0 r F1 F2 | | l 2 F3 0 0 r F2 F3 T T r F3 F3 F F r F4 F3 _ F r F1 F4 0 0 r F2 F4 T T r F3 F4 F F r F4 F4 _ T r F1 T0 _ T r T1 T1 * * r T1 T1 | | r T2 T2 0 0 r T2 T2 T T r T3 T2 F F r T4 T2 _ 0 r T1 T2 | | l 2 T3 0 0 r T2 T3 T T r T3 T3 F F r T4 T3 _ T r T1 T4 0 0 r T2 T4 T T r T3 T4 F F r T4 T4 _ F r T1 2 * * l 2 2 | | l 3 3 * * l 2 3 | | r 0 4 * * r 5 4 | | r 9 5 * * r 4 5 T T r 6 6 * * r 6 6 | | r 7 7 * * r 5 7 | | l halt 8 * * r 8 8 | | r 9 9 * * r 8 9 | | l 10 10 | | l 10 10 * _ l 11 10 _ _ l 12 11 * * l 10 12 F T l 13 12 T F l 12 13 * * l 13 13 | | r 14 14 F _ r 15F 14 T _ r 15T 15T F T r 15F 15T T T r 15T 15T _ T l 16 15F F F r 15F 15F T F r 15T 15F _ F l 16 16 * * l 16 16 | | r 0

Input construction
I will work on this example, coding \((x_1\lor x_2\lor\neg x_3)\land(\neg x_1\lor x_2\lor\neg x_3\lor x_4)\land(x_3\lor\neg x_4)\land(x_3\lor x_4)\): || FFFF|T T F 0 |F T F T |0 0 T F |0 0 T T || First, there are 4 variables in whole formula, so we start with  || FFFF|. Only number of F's varies here. After that we have to code clauses. In the first clause, first variable appears without negation, so we represent it with T. Same for 2nd variable. 3rd  variable appears negated, so F represents it. 4th variable doesn't appear, so we put 0 there. By enclosing it in |'s and putting spaces where they are needed, we get proper encoding of first clause:  |T T F 0 |. We repeat same for all other clauses. We end last clause with double, instead of single, |. Result is as above. Machine tests all assignments possible and halts with FTTF at the beginning, which indeed satisfies this formula.

OddMaxSAT
This is a variation of satfiability, and it's following question: given boolean formula, does lexicographically last satisfying assignment have least significant bit equal to 1? This problem is PNP-complete. 0 * * r 0 0 _ _ r 1 1 T _ l T0 1 F _ l F0 1 | | r 4 F0 _ F r F1 F1 * * r F1 F1 | | r F2 F2 0 0 r F2 F2 T T r F3 F2 F F r F4 F2 _ 0 r F1 F2 | | l 2 F3 0 0 r F2 F3 T T r F3 F3 F F r F4 F3 _ F r F1 F4 0 0 r F2 F4 T T r F3 F4 F F r F4 F4 _ T r F1 T0 _ T r T1 T1 * * r T1 T1 | | r T2 T2 0 0 r T2 T2 T T r T3 T2 F F r T4 T2 _ 0 r T1 T2 | | l 2 T3 0 0 r T2 T3 T T r T3 T3 F F r T4 T3 _ T r T1 T4 0 0 r T2 T4 T T r T3 T4 F F r T4 T4 _ F r T1 2 * * l 2 2 | | l 3 3 * * l 2 3 | | r 0 4 * * r 5 4 | | r 9 5 * * r 4 5 T T r 6 6 * * r 6 6 | | r 7 7 * * r 5 7 | | l 17 8 * * r 8 8 | | r 9 9 * * r 8 9 | | l 10 10 | | l 10 10 * _ l 11 10 _ _ l 12 11 * * l 10 12 T F l 13 12 F T l 12 13 * * l 13 13 | | r 14 14 F _ r 15F 14 T _ r 15T 15T F T r 15F 15T T T r 15T 15T _ T l 16 15F F F r 15F 15F T F r 15T 15F _ F l 16 16 * * l 16 16 | | r 0 17 * * l 17 17 _ _ l 18 18 T T r halt Input construction is as above, except we start with string of T's, not F's. Example: || TTTT|T T F 0 |F T F T |F F 0 0 |0 0 T T ||

Tautology problem
I've literally changed like 5 transitions in SAT machine to get tautology problem solver. Tautology problem asks if, given a formula in DNF (not in CNF like above machines) is it true for every choice of variables? This problem is co-NP complete. ​0 * * r 0 0 _ _ r 1 1 T _ l T0 1 F _ l F0 1 | | r 4 F0 _ F r F1 F1 * * r F1 F1 | | r F2 F2 0 0 r F2 F2 T T r F3 F2 F F r F4 F2 _ 0 r F1 F2 | | l 2 F3 0 0 r F2 F3 T T r F3 F3 F F r F4 F3 _ F r F1 F4 0 0 r F2 F4 T T r F3 F4 F F r F4 F4 _ T r F1 T0 _ T r T1 T1 * * r T1 T1 | | r T2 T2 0 0 r T2 T2 T T r T3 T2 F F r T4 T2 _ 0 r T1 T2 | | l 2 T3 0 0 r T2 T3 T T r T3 T3 F F r T4 T3 _ T r T1 T4 0 0 r T2 T4 T T r T3 T4 F F r T4 T4 _ F r T1 2 * * l 2 2 | | l 3 3 * * l 2 3 | | r 0 4 * * r 5 4 | | r 9 5 * * r 4 5 F F r 6 6 * * r 6 6 | | r 7 7 0 0 r 5 7 T T r 5 7 F F r 5 8 * * r 8 8 | | r 9 9 * * r 8 9 | | l 10 10 | | l 10 10 * _ l 11 10 _ _ l 12 11 * * l 10 12 F T l 13 12 T F l 12 12 | | l halt 13 * * l 13 13 | | r 14 14 F _ r 15F 14 T _ r 15T 15T F T r 15F 15T T T r 15T 15T _ T l 16 15F F F r 15F 15F T F r 15T 15F _ F l 16 16 * * l 16 16 | | r 0 Input just like for machines above.

Subset sum problem
The problem is: given a multiset (i.e. set in which elements can repeat) and a number N decide if there is some subset of this multiset such that sum of its elements is exactly N. This is another NP-complete problem. Machine below halts iff such subset exists. 0 * * r 0 0 x _ r 0 0 _ x l 1 1 * * l 1 1 | | r 2 2 * * r 2 2 x x r 3 2 | | l 4 3 1 0 r 3 3 _ _ r 2 3 x x r 3 3 | | l 4 4 * * l 4 4 | | r 5 5 0 0 r 5 5 1 0 r 6 5 x x r 8 5 _ _ r 8 6 * * r 6 6 0 1 l 4 6 | | l 7 7 * * l 7 7 0 1 l 7 7 | | r 0 8 * * r 8 8 0 1 r 9 8 | | l halt 9 * * r 9 9 0 1 r 9 9 | | l 7

Input construction
We simply write N, blank, and then all elements of the multiset separated by blanks. At the beginning and end we put |. Example: |1111111 1111 111 11 1111| It checks if some subset of {4,3,2,4} sums up to 8. The output is |00000000x1111 111 11x1111| With x's to the left of two 4's, which means these two fours give the sum of 8.

EXPTIME-complete problem
The following problem is EXPTIME-complete: given a Turing machine and number \(N\) (written in binary), will the machine halt in at most \(N+1\) steps? The following machine implements it: 0 * * r 0 0 Y _ r 0 0 X X r 1 1 * * r 1 1 Y _ r 1 1 | | r 2 2 _ 0 l 3 2 0 0 l 3 2 1 1 l 28 3 * * l 3 3 X X r 4 4 0 0 r 5 4 1 1 r 7 5 * * r 5 5 Z Z r 4 5 | | r 6 6 * 0 l 9 7 * * r 7 7 | | r 8 7 Z Z r 4 8 * 1 l 9 9 * * l 9 9 X X r 10a 10 _ _ l 17 10 Y Y l 23 10 | | l 17 10 * * r 10 10 > R r 11 10 < L l 14 10a * * r 10a 10a _ _ l 10b 10a Z Z r 10 10b * * l 10b 10b X X r 10 11 * * r 11 11 _ Y r 12 11 | | r halt 12 * * r 12 12 _ Y l 13 12 | | r halt 13 * * l 13 13 X X r 10a 14 * * l 14 14 _ Y l 15 14 | | r halt 15 * * l 15 15 _ Y r 16 15 | | r halt 16 * * r 16 16 X X r 10a 17 * * l 18 18 R > l 18 18 L < l 18 18 * * l 19 19 * * l 19 19 X Y l 19 19 Z Y l 19' 19 Y _ l 19 19 _ _ r 20 19 | | r 20 19' * * l 19' 19' X _ l 19 20 * * r 20 20 Y X r 22 20 _ X r 21 21 * * r 21 21 Y _ r 22 22 * * r 22 22 L L l L0 22 R R r R0 L0 * * l L0 L0 | | l L1 L0 Y _ l L0 L1 * * l L1 L1 _ _ r L2 L2 0 _ r L3 L2 1 _ r L4 L2 | | r L5 L3 0 0 r L3 L3 1 0 r L4 L3 | | r L6 L3 _ 0 l L8 L4 0 1 r L3 L4 1 1 r L4 L4 | | r L7 L4 _ 1 l L8 L5 * * r L5 L5 | | r L2 L6 * * r L6 L6 | | r L3 L7 * * r L7 L7 | | r L4 L8 * * l L8 L8 | | l L9 L9 * * l L9 L9 | | r 30 R0 * * r R0 R0 | | r R1 R1 * * r R1 R1 _ _ l R2 R2 0 _ l R3 R2 1 _ l R4 R2 | | l R5 R3 0 0 l R3 R3 1 0 l R4 R3 | | l R6 R3 _ 0 r R8 R4 0 1 l R3 R4 1 1 l R4 R4 | | l R7 R4 _ 1 r R8 R5 * * l R5 R5 | | l R2 R6 * * l R6 R6 | | l R3 R7 * * l R7 R7 | | l R4 R8 * * r R8 R8 | | r 30 23 * * l 24 24 R > l 24 24 L < l 24 24 * * l 24 24 Z Z l 23 24 X Y r 25 25 * * r 25 25 Z Y r 25' 25 Y _ r 25 25 _ _ l 26 25' * * r 25' 25' Y _ r 25' 25' _ _ l 26' 26 * * l 26 26 _ X l 27 26' * * l 26' 26' _ _ l 26 27 * * l 27 27 Y _ r 22 28 * * l 28 28 X X r 29 29 * * r 29 29 _ Z l 3 30 1 0 r 0 30 0 1 r 30 The input is exactly as here, expect right after first | we put binary expansion of \(N\), written backwards in binary, like here: |111111 X1>R 1>L 1L 1<<< 1>L 1R 0<<<R| It checks if 4-state Busy Beaver halts in at most 64 steps (which it doesn't).

Prime number generator
Quite simple machine - writes down, one by one, all prime numbers. 0 _ 1 r 1 1 1 1 r 1 1 _ 1 r q1 2 x x l 2 2 1 x r 3 2 _ _ r 6 3 x x r 3 3 _ _ r 4 4 1 1 r 4 4 _ 1 l 5 5 1 1 l 5 5 _ _ l 2 6 x 1 r 6 6 _ _ r 1 7 x 1 l 7 7 * * r 1 q0 1 1 r q1 q0 _ _ l q0 q1 _ _ r q2 q2 _ 1 r q3 q3 _ 1 l q4 q4 x x r q4 q4 1 x l q5 q4 _ _ l q8 q5 x x l q5 q5 _ _ l q6 q6 x x l q6 q6 1 x r q7 q6 _ _ r q11 q7 x x r q7 q7 _ _ r q4 q8 * 1 l q8 q8 _ _ l q9 q9 x x l q9 q9 1 1 r q10 q9 _ _ r q14 q10 x x r q10 q10 _ _ r q4 q11 x 1 r q11 q11 _ _ r q12 q12 * * r q12 q12 _ 1 l q8 q13 * * l q13 q13 _ _ r q14 q13 1 1 r q14 q14 * _ r q15 q14 x 1 r q15 q14 _ _ l 2 q15 * * r q15 q15 _ _ r q16 q16 * * r q16 q16 _ _ l q17 q17 * _ l q18 q17 _ _ l 7 q18 * * l q18 q18 _ _ l q13 Writes all primes below 30 in about 135000 steps.

st-connectivity
Also known as STCON or graph reachability. It's a decision problem asking, given directed graph \(G\) and verticies \(s,t\in G\), can we reach \(t\) from \(s\) by moving on edges of \(G\)? 0 * x l 0 0 _ | r 1 1 y y r 1 1 z z r 1 1 x y r 2 1 0 z r 2 1 1 y r 5' 2 * * r 2 2 _ | l 3 3 * * l 3 3 _ _ r 4 4 | | r 1 5' * * r 5' 5' x y r 5' 5' _ _ r 6 5' | _ r 6 5 * * r 5 5 _ _ r 6 5 | _ r 6 6 * * r 6 6 _ _ l 7 7 * * l 7 7 0 z l 8 7 1 y l 10 7 _ _ r 12 7 | | r 12 8 * * l 8 8 _ _ l 9 9 p p l 9 9 q q l 9 9 x x l 9 9 0 p r 5 9 1 q r 5 9 z p r 5 9 y x r 5 10 * * l 10 10 _ _ l 11 11 p p l 11 11 q q l 11 11 x x l 11 11 0 q r 5 11 1 q r 5 11 z q r 5 11 y x r 5 12 z 0 r 12 12 y 1 r 12 12 _ _ l 13 13 * * l 13 13 | _ l 13 13 _ _ l 14 14 q 1 r halt 14 p 0 l 15 15 q 1 l 15 15 p 0 l 15 15 x x l 15 15 | | r 1 This problem is \(NL\)-complete (nondeterministic logarithmic space).

Input construction
Suppose we have graph with \(n\) vertices numbered \(1,...,n\). Machine will tell us if there is path from \(1\) to \(n\).

We will write \(n\) blocks, each composed of \(n\) bits (i.e. 0 or 1). \(l\)th bit of \(k\)th block is 1 iff in our graph there is edge from \(k\) to \(l\). Example: 000110 001000 010001 110100 001010 000000 In this case, path exists, so machine halts. If there were no path, machine would lack transitions.

Partition problem
Yet another NP-complete problem. Like in subset sum, we have a list/multiset of numbers, and we have to decide if we can partition the list into two parts with equal sums. 0 1 x r 1 0 * * r 0 0 _ | r 5 1 * * r 1 1 1 x l 2 1 _ | r 1 2 * * l 2 2 _ _ l 3 3 1 1 l 3 3 _ 1 r 4 4 * * r 4 4 _ _ r 0 5 1 x r 1 5 _ | l 6 6 | | l 7 7 x 1 l 7 7 | _ l 7 7 _ | r 8 8 1 x l 9 8 x x r 8 8 _ _ r 13 8 | | r 26 9 * * l 9 9 _ _ l 10 10 _ _ r 11 10 * * l 9 11 _ _ r 11 11 1 x r 13 11 x x r 12 12 1 x r 13 12 x x r 12 12 | | r 24 12 _ _ r 24 13 * * r 13 13 | | r 14 14 x x r 8 14 1 x l 9 14 | | l 20 15 * * l 15 15 x 1 l 15 15 _ _ l 16 16 * * l 15 16 x 1 l 15 16 _ | r 17 16 | _ r 13 17 _ _ r 18 18 1 1 r 18 18 | _ r 19 18 _ | l 15 19 1 1 r 18 20 * * l 20 20 _ _ l 21 21 * * l 20 21 _ _ r 22 22 _ _ r 23 23 x x r 23 23 * * l 27 23 1 1 r 24 24 * * r 24 24 | | r 25 25 * * r 24 25 | | l 15 26 1 x l 9 26 x x r 8 26 | | l 20 27 x _ l 27 27 _ _ r halt Input is exactly as in subset sum problem. In output we have some numbers marked with x, and some left alone. This is our partition.

Actually, neither this or subset sum machine doesn't truly solve NP-complete problem. For that, numbers would have to be written in binary.

Graph 3-colorability
I am really surprised by how small this machine turned out to be. This is my second machine which solves truly NP-complete problem (cf. last paragraph under machine above). 0 0 a l 1 0 1 b l 1 0 _ _ l 4 0 * * r 0 1 * * l 1 1 _ _ l 2 2 * * l 2 2 _ a r 3 3 * * r 3 3 _ _ r 0 4 b 1 l 4 4 a 0 l 4 4 _ _ l 5 5 * * l 5 5 _ _ r 6 6 * * r 6 6 a A r 7 6 b B r 8 6 c C r 9 6 0 0 l 10 7 * * r 7 7 _ A l 5 8 * * r 8 8 _ B l 5 9 * * r 9 9 _ C l 5 10 * * l 11 11 A a l 11 11 B b l 11 11 C c l 11 11 _ _ r 12 12 a A r 13a 12 b B r 13b 12 c C r 13c 12 * * r 12 12 x x l 16a 13a * * r 13a 13a A A r 14a 13a B B r 14a 13a C C r 14a 13a _ _ l 15 14a * * r 14a 14a 0 x r 13a 14a 1 a r 13a 13b * * r 13b 13b A A r 14b 13b B B r 14b 13b C C r 14b 13b _ _ l 15 14b * * r 14b 14b 0 x r 13b 14b 1 b r 13b 13c * * r 13c 13c A A r 14c 13c B B r 14c 13c C C r 14c 13c _ _ l 15 14c * * r 14c 14c 0 x r 13c 14c 1 c r 13c 15 * * l 15 15 _ _ r 12 16a x 0 r 16a 16a a 1 r 18 16a b 1 r 16a 16a c 1 r 16a 16a A _ r 16a 16a B _ r 16b 16a C _ r 16c 16a _ _ l halt 16b x 0 r 16b 16b a 1 r 16b 16b b 1 r 18 16b c 1 r 16b 16b A _ r 16a 16b B _ r 16b 16b C _ r 16c 16b _ _ l halt 16c x 0 r 16c 16c a 1 r 16c 16c b 1 r 16c 16c c 1 r 18 16c A _ r 16a 16c B _ r 16b 16c C _ r 16c 16c _ _ l halt 18 x 0 r 18 18 a 1 r 18 18 b 1 r 18 18 c 1 r 18 18 A _ r 18 18 B _ r 18 18 C _ r 18 18 _ _ l 19 19 * * l 19 19 A b l 20 19 B c l 20 19 C a l 21 20 A a l 20 20 B b l 20 20 C c l 20 20 _ _ r 6 21 A b l 20 21 B c l 20 21 C a l 21 Input and halting conditions as in st-connectivity machine. This machine also returns what the coloring is.

Also note that this machine might not work for directed graphs, even though input construction allows these.

Dominating set problem
Turns out that working with adjacency matrices is quite annoying, but not that difficult. Dominating set of a graph is a subset of set of its vertices such that every vertex is either in dominating set or one of its neighbours is. Dominating set problem is question: given number \(k\), is there a dominating set of size \(\leq k\)? 0 1 x r 1 0 0 y r 2 0 | | r 4 0 * * r 0 1 * * r 1 1 _ x l 3 2 * * r 2 2 _ y l 3 3 * * l 3 3 _ _ r 0 4 * * r 4 4 _ _ l 5 5 * * l 5 5 y _ l 5 5 x | l 5 5 | | l 6 6 y 0 l 6 6 x 1 l 6 6 _ _ r 7 7 1 x r 8 7 0 y r 10 7 * * r 7 7 | | r 15 8 * * r 8 8 _ _ r 9 9 0 z r 8 9 1 x r 8 9 _ _ l 12 9 * * r 9 10 * * r 10 10 _ _ r 11 11 0 z r 10 11 1 y r 10 11 * * r 11 11 _ _ l 12 12 _ _ l 13 12 * * l 12 13 _ _ r 14 13 * * l 12 14 _ _ r 7 15 | _ r 15 15 * * r 15 15 _ _ r 16 16 z 0 r 16 16 y 1 r 16 16 x 1 r 17 16 _ _ r 18 16 | _ r 18 16' z 0 r 16 16' y 1 r 16 16' x 1 r 17 16' _ _ l halt 17 z 0 r 17 17 y 1 r 17 17 x 1 r 17 17 _ _ r 16' 17 | _ r 15 18 * * r 18 18 | _ r 18 18 _ _ r 19 18 x 1 r 18 18 y 1 r 18 18 z 0 r 18 19 _ _ l 20 19 x 1 r 18 19 y 1 r 18 19 z 0 r 18 20 * * l 20 20 | | l 21 21 0 0 l 22 21 1 0 l 24 21 y 0 l 22 21 x 0 l 24 22 0 0 l 22 22 1 0 r 23 22 y 0 l 22 22 x 0 r 23 23 0 1 l 28 23 y 1 l 28 24 1 1 l 24 24 0 1 l 25 24 x 1 l 24 24 y 1 l 25 25 0 0 r 26 25 1 0 r 27 25 y 0 r 26 25 x 0 r 27 26 1 1 r 26 26 0 0 l 21 26 x 1 r 26 26 y 0 l 21 27 1 1 r 27 27 0 1 l 28 27 x 1 r 27 27 y 1 l 28 28 * * l 28 28 x 1 l 28 28 y 0 l 28 28 _ _ r 0 It uses the fact that if there is dominating set of size \(l\leq k\), then there is one of size exactly \(k\) (it can be proved in one or two sentences).

Btw, dominating set problem is NP-complete.

Input consturction
To make machine small I've used following input format: first we write block of \(k\) ones and \(n-k\) zeroes, where \(n\) is size of the graph. It's immediately followed by a |, blank, and then an adjacency matrix of the graph (i.e. the graph coded like in other graph machines). Example input for Petersen graph and \(k=3\): 1110000000| 0111000000 1000101000 1000000011 1000010100 0100010001 0001100010 0100000110 0001001001 0010011000 0010100100 It halts in less than 100000 steps with affirmative result. By changing \(k\) to \(2\) you can find that Petersen graph has no dominating set of size 2 in 190000 steps. I'm quite surprised by speed of this machine.

Web browser
Before you start thinking it's a joke, I can assure you this is how a real web browser might work! (based upon Google Chrome). Anyway, here it goes: 0 * * r 0 0 _ _ l 17 1 * _ r 14 2 * _ r 7 3 * a r 15 4 * a r 1 5 * c r 11 6 * d r halt 7 * d r 3 8 * e r 6 9 * e r 5 10 * e r 16 11 * i r 10 12 * N r 13 13 * o r 2 14 * r r 9 15 * t r 4 16 * v r 8 17 * _ l 17 17 _ _ r 12 As an input, give it any web address. Or search query. Or anything else.

EXPSPACE-complete problem
Minor modifications to EXPTIME-complete machine results in machine solving EXPSPACE-complete problem - given binary expansion of \(N\), does machine's work ever exceed \(N+1\) cells? Machine also is disallowed to move to the left of its starting position. 0 * * r 0 0 Y _ r 0 0 X X r 1 1 * * r 1 1 Y _ r 1 1 | | r 2 2 _ 0 l 3 2 0 0 l 3 2 1 1 l 28 3 * * l 3 3 X X r 4 4 0 0 r 5 4 1 1 r 7 5 * * r 5 5 Z Z r 4 5 | | r 6 6 * 0 l 9 7 * * r 7 7 | | r 8 7 Z Z r 4 8 * 1 l 9 9 * * l 9 9 X X r 10a 10 _ _ l 17 10 Y Y l 23 10 | | l 17 10 * * r 10 10 > R r 11 10 < L l 14 10a * * r 10a 10a _ _ l 10b 10a Z Z r 10 10b * * l 10b 10b X X r 10 11 * * r 11 11 _ Y r 12 11 | | r halt 12 * * r 12 12 _ Y l 13 12 | | r halt 13 * * l 13 13 X X r 10a 14 * * l 14 14 _ Y l 15 14 | | r halt 15 * * l 15 15 _ Y r 16 15 | | r halt 16 * * r 16 16 X X r 10a 17 * * l 18 18 R > l 18 18 L < l 18 18 * * l 19 19 * * l 19 19 X Y l 19 19 Z Y l 19' 19 Y _ l 19 19 _ _ r 20 19 | | r 20 19' * * l 19' 19' X _ l 19 20 * * r 20 20 Y X r 22 20 _ X r 21 21 * * r 21 21 Y _ r 22 22 * * r 22 22 L L l L0 22 R R r R0 L0 * * l L0 L0 | | l L1 L0 Y _ l L0 L1 * * l L1 L1 _ _ r L2 L2 0 _ r L3 L2 1 _ r L4 L2 | | r L5 L3 0 0 r L3 L3 1 0 r L4 L3 | | r L6 L3 _ 0 l L8 L4 0 1 r L3 L4 1 1 r L4 L4 | | r L7 L4 _ 1 l L8 L5 * * r L5 L5 | | r L2 L6 * * r L6 L6 | | r L3 L7 * * r L7 L7 | | r L4 L8 * * l L8 L8 | | l L9 L9 * * l L9 L9 | | r 31 R0 * * r R0 R0 | | r R1 R1 * * r R1 R1 _ _ l R2 R2 0 _ l R3 R2 1 _ l R4 R2 | | l R5 R3 0 0 l R3 R3 1 0 l R4 R3 | | l R6 R3 _ 0 r R8 R4 0 1 l R3 R4 1 1 l R4 R4 | | l R7 R4 _ 1 r R8 R5 * * l R5 R5 | | l R2 R6 * * l R6 R6 | | l R3 R7 * * l R7 R7 | | l R4 R8 * * r R8 R8 | | r 30 23 * * l 24 24 R > l 24 24 L < l 24 24 * * l 24 24 Z Z l 23 24 X Y r 25 25 * * r 25 25 Z Y r 25' 25 Y _ r 25 25 _ _ l 26 25' * * r 25' 25' Y _ r 25' 25' _ _ l 26' 26 * * l 26 26 _ X l 27 26' * * l 26' 26' _ _ l 26 27 * * l 27 27 Y _ r 22 28 * * l 28 28 X X r 29 29 * * r 29 29 _ Z l 3 30 1 0 r 0 30 0 1 r 30 31 1 0 r 31 31 0 1 r 0 Input exactly the same as for EXPTIME machine.

Positive 1-in-3SAT
So here is how it goes: in normal SAT, we have clauses like \(x\lor\neg y\lor\neg z\), and for a clause to be true we need at least one out of three literals in it to be true. For 1-in-3SAT we have clauses like \(R(x,\neg y,\neg z)\), and for \(R\) to be true we need exactly one of three literals to be true. Furthermore, in positive 1-in-3SAT \(\neg\) is disallowed, i.e. no negated variables. Under these restrictions, satisfiability is still NP-complete. 0 0 _ l F0 0 1 _ l T0 0 _ _ r 6 F0 _ 0 r F1 F1 _ _ r F2 F2 * * r F2 F2 _ _ r F3 F3 * * r F3 F3 _ 0 r F4 F4 * * r F5 F4 _ _ r F6 F5 _ _ r F4 F6 * * r F3 F6 _ _ l 1 T0 _ 1 r T1 T1 _ _ r T2 T2 * * r T2 T2 _ _ r T3 T3 * * r T3 T3 1 1 r T3' T3 _ 0 r T4 T3' _ 1 r T4 T3' * * r T3 T4 * * r T5 T4 _ _ r T6 T5 _ _ r T4 T6 * * r T3 T6 _ _ l 1 1 _ _ l 2 1 * * l 1 2 _ _ l 3 2 * * l 1 3 _ _ r 4 3 * * l 1 4 _ _ r 4 4 * * r 5 5 * * r 5 5 _ _ r 0 6 * * r 7 6 _ _ r 10 7 0 _ r 6 7 1 _ r 8 8 * * r 9 8 _ _ r 21 9 0 _ r 8 9 1 _ r 10 10 _ _ r 12 10 * * r 11 11 * _ r 10 12 _ _ l 13 12 * * r 11 13 * * l 13 13 _ _ l 14 14 * * l 13 14 _ _ l 14' 14' * * l 13 14' _ _ l 15 15 * * l 13 15 _ _ r 16 16 _ _ r 16 16 0 _ r 17 16 1 _ r 18 17 _ 1 l 20 17 0 0 r 17 17 1 0 r 18 18 _ 0 l 19 18 0 1 r 17 18 1 1 r 18 19 1 0 l 19 19 0 1 l 20 20 * * l 20 20 _ _ r 0 21 _ _ l halt 21 * * r 7 Compared to normal SAT machine, I've cut this machine to 3 tape symbols, so input is different. First we write as many zeroes as there are variables. Then we put a single space and we start coding clauses. Clauses are strings of zeroes and ones, with each bit separated by blank. \(n\)th bit is 1 if \(n\)th variable is in clause, 0 otherwise. For example, \(R(x_1,x_2,x_3)\land R(x_2,x_3,x_5)\land R(x_1,x_4,x_5)\) is coded as 00000 1 1 1 0 0 0 1 1 0 1  1 0 0 1 1