The well-known middle levels conjecture asserts that for every integer $n\geq 1$, all binary strings of length $2(n+1)$ with exactly $n+1$ many 0s and 1s can be ordered cyclically so that any two consecutive strings differ in swapping the first bit with a complementary bit at some later position. In his book `The Art of Computer Programming Vol. 4A' Knuth raised a stronger form of this conjecture (Problem 56 in Chapter 7, Section 2.1.3), which requires that the sequence of positions with which the first bit is swapped in each step of such an ordering has $2n+1$ blocks of the same length, and each block is obtained by adding $s=1$ (modulo $2n+1$) to the previous block. In this work, we prove Knuth's conjecture in a more general form, allowing for arbitrary shifts $s\geq 1$ that are coprime to $2n+1$. We also present an algorithm to compute this ordering, generating each new bitstring in $\mathcal{O}(n)$ time, using $\mathcal{O}(n)$ memory in total.
翻译:众所周知的中层猜想显示,对于每整数$n\geq 1美元,所有长度为2(n+1)美元的二进制字符串的长度为2(n+1)美元,其数额为1美元+1美元,其长度为0和1美元,可以周期性地订购,这样,任何两个连续的字符串都可以在较晚的某个位置将第一个位点与补充点互换时出现差异。在他的著作“计算机编程艺术卷4A”中,Knuth提出了一种更强的这种猜想形式(第七章第2.1.3节第56号问题),它要求第一个位交换的位置序列的顺序为2n+1美元,每个区块的长度相同,每个区块的顺序可以通过在上块上加上1美元=1美元(modulo 2n+1美元)获得。在这项工作中,我们用更笼统的形式证明了Knuth的推算法,允许任意移动$\q美元1美元,即合起来为2n+1美元。我们还提出一种算法来计算这一顺序,每次进行新的比特字符总以$=美元=Ox时间计算。