User blog:LittlePeng9/Color reducing for Turing machines

I'm going to present method designed by myself which allows to reduce number of colors of a Turing machine to any prime or composite number. I'm going to explain carefully reducing to 2-colors, but after that it should be pretty obvious how to change it to any number of colors.

Overview
Given machine with c colors we are going to reduce to d colors, we have to replace tape characters with numbers written in d-ary counting system. Every cell is going to be part of macro cell, which size is smallest number we need to represent c different numbers using d-ary system. When machine enters macro cell, it will read content of it and then, according to original machine's transition, rewrites macro cell and moves to another one.

2-color macro cells
If d=2, then macro cell contains a number written in binary. We need c different macro cells, so its size must be at least \(n=\lfloor log_2(c)+1 \rfloor\).

Reading macro cell
For every state s in first machine we have large set of corresponding states in 2-color machine. First subset consists of reading states. We always move right and leave character on tape unchanged, unless otherwise stated. Basic state, \(s\), appears always on left end of macro cell. If this cell has 0 on it, we transit to \(s_0\) and otherwise we transit to \(s_1\). Now, in any of reading states, we extend subscript in state name by character we just read, e.g. \(s_{01101}\) can transit to \(s_{011010}\) or \(s_{011011}\). When state subscript's length is n-1, we reached end of macro cell and we move left. We append sub-subscript 1 to state name, i.e. \(s_{011_1}\)

How many states is that? Well, we have 1 state with no subscript, 2 states with length 1 subscript, 4 states with length 2 subscript... and \(2^{n-1}\) states with length n-1. Summing gives \(2^n-1) reading states per machine state.

Changing macro cell
Second subset consists of ''writting states. ''Now we can be in one of c states (unless tape on the beginning wasn't properly coded). Say we are in state \(s_{x_1}\). While transiting to that state we can already start rewritting. Now we always move left, transiting from \(s_{x_a}\) to \(s_{x_{a+1}}\). We replace characters in macro cell one-by-one. We have states ranging from \(s_{x_1}\) to \(s_{x_{n-1}}\), which gives n-1 writting states per color, that is, \(c(n-1)\) writting states per machine state

Moving to another macro cell
Now we are at left end of current macro cell. We have to move to the left end of adjacent macro cell, which is n cells apart. Depending on direction of movement, we use left or right states. First state we are at is writting state and at the end we transit to another basic state, so for any direction we need n-1 states. That gives \(2(n-1)\) move states.

Number of states
Totally we need \(2^n-1+c(n-1)+2(n-1)\) states to represent given state on original machine. To get full count we need to multiply it by s (number of states): \(S=s\times (2^n-1+c(n-1)+2(n-1))\). For 2-state 3-color machine (like Wolfram's UTM) it gives 16 states, and best universal machine uses 7 states to emulate rule 110.

Given that \(n\approx log_2(c)\) we have \(S\approx s\times(c+c\times log(c)+2log(c))\), so it grows linearily in number of states and subquadratically in number of colors. So this is pretty good result, but can be certainly better