5

This question relates to a version of a problem that's already been discussed at least twice before on MSE, namely here, and here. The version of the problem I'm interested in is the following:

Let $\ R_N\ $ be the right circular shift by one place of strings of bits of length $\ N=2^r\ $: $$ (R_NS)_i=S_{(i-2)\pmod{N}+1}\ , $$ $\ S_0\ $ be a random string of bits of length $\ N\ $, $\ X_1$$\,X_2,$$\,\dots,X_j,$$\,\dots\ $ a sequence of independent random integers distributed uniformly over the set $\ \{0,$$\,1,$$\,2,$$\,\dots,$$\,N-1\}\ $ and $\ C_1,C_2,\dots,C_j,\dots\ $ any sequence of strings of bits of length $\ N\ $. Define the sequence $\ S_1$$\,S_2,$$\,\dots,S_j,$$\,\dots\ $ recursively by $$ S_j=R_N^{X_j}\big(S_{j-1}\oplus C_j\big)\ , $$ where $\ \oplus\ $ represents the operation of bitwise XOR between two strings of bits. The problem is to determine a finite sequence $\ C_1,C_2,\dots,C_M\ $ such that at least one of the strings $\ S_1$$\,S_2,$$\,\dots,S_M\ $ is guaranteed to be zero.

The origin of the problem is a more general one appearing as question $7$ of the senior A-level Tournament of the Towns paper of autumn $2009$. In the solution sheet for that paper it is proved by induction that such a finite sequence always exists.

While preparing an answer to this question (now closed), I discovered the following solution for $\ N=4\ $: \begin{align} C_1&=0000\\C_2&=1111\\C_3&=0101\\C_4&=1111\\C_5&=0011\\C_6&=1111\\C_7&=0101\\C_8&=1111\\C_9&=0001\\C_{10}&=1111\\C_{11}&=0101\\C_{12}&=1111\\C_{13}&=0011\\C_{14}&=1111\\C_{15}&=0101\\C_{16}&=1111 \end{align} My initial proof that this sequence works comprised an unenlightening collection of casework. As I was tidying it up, however, I noticed some relations between the order of the appearance of the terms in the solution and the lengths of their orbits under the action of the group of circular shifts, and I eventually came up with the following proof:

First note that length of the orbit of a string $\ S\ $ of bits of length $\ N\ $ is $\ \ell\ $ under the action of the group $\ G_N\ $ of circular shifts if and only if

  • $\ \ell=2^k\ $ for some $\ k\in\{0,1,2,\dots,r\}\ $; and
  • $S\ $ is periodic with period $\ \ell\ $.

If the string $\ C\ $ has an orbit of length $\ p<\ell\ $ (and is hence periodic with period $\ p=2^j\ $ for some $\ j<k\ $) then the length of the orbit of $\ C\oplus S\ $ is $\ \ell\ $.

If the length of $\ S_0$'s orbit is $1$, then either $\ S_0=0000\ $ or $\ S_0=1111\ $, and so either $\ S_1=1111\ $ or $\ S_2=0000\ $. If the length of $\ S_0$'s orbit is $2$ then so are those of $\ S_1\ $ and $\ S_2\ $. Therefore either $\ S_2=0101\ $ or $\ S_2=1010\ $, the only $4$-long bit strings with period $2$. In the first case, $\ S_3=0000\ $, while in the second, $\ S_3=1111\ $ and $\ S_4=0000\ $.

If the length of $\ S_0$'s orbit is $4$ and it has even parity, then the length of the orbits of $\ S_1,S_2,S_3\ $ and $\ S_4\ $ will also be $4$ and they will also all have even parity. Therefore $\ S_4\in\{0011,0110,1100,1001\}\ $, the set of all $4$-long bit strings of even parity with an orbit of length $4$. Therefore $\ S_5\in\{0000,$$\,0101,$$\,1111,$$\,1010\}\ $ and has an orbit of length $1$ or $2$. If $\ S_5\ne0000\ $ and we repeat steps $2$ to $4$ as steps $6$ to $9$, then at least one of $\ S_6, S_7\ $ or $\ S_8\ $ must be $\ 0000\ $ by the same argument as above. This shows that if $\ S_0\ $ has even parity, then at least one of $\ S_1\ $ to $\ S_8\ $ must be $\ 0000\ $.

If $\ S_0\ $ has odd parity, then so do $\ S_1\ $ to $\ S_8\ $, and therefore $\ S_9\ $ must have even parity. If $\ S_9\ne0000\ $, we simply repeat steps $2$ to $8$ as steps $10$ to $16$, and the same argument as above shows that at least one of $\ S_{10}\ $ to $\ S_{16}\ $ must be $\ 0000\ $. This completes the proof.

My question is "Can this solution be generalised to a construction of one for any $\ N=2^r\ $?"

Progress

Some of the progress I've made towards a solution for an arbitrary $\ N=2^r\ $ is included in the above proof for $\ N=4\ $, in the form of statements that are more general than are actually needed for that special case.

Yesterday, I made a key observation which I think will now allow me to generalise the above solution to one for any $\ N=2^r\ $, and prove that it works. If nobody beats me to it, I'll post the solution in a few days.

0 Answers0