一种中间层格雷码的恒时算法
A constant-time algorithm for middle levels Gray codes
摘要:
对于任何整数$n\geq 1$,中间层格雷码是$\{1,2,\ldots,2n+1\}$的所有$n$ -元素和$(n+1)$ -元素子集的循环列表,使得任何两个连续子集在添加或移除单个元素方面不同。对于任何$n\geq 1$是否存在这样一个格雷码的问题,在过去的30年里一直是深入研究的主题,直到最近才得到肯定的回答[T. Mütze.中间层猜想的证明。Proc. London Math. Soc.,112(4):677- 713,2016]。在后续的论文[T。Mütze和J. Nummenpalo。一种计算中间层格雷码的有效算法。出现在ACM算法交易中,2018]这个存在性证明被转化为一个算法,该算法平均在时间$\mathcal{O}(n)$上计算格雷码中的每个新集合。在这项工作中,我们提出了一种在最佳时间和空间中计算中层格雷码的算法:每个新集合平均在时间$\mathcal{O}(1)$上生成,所需空间为$\mathcal{O}(n)$。
英文摘要:
For any integer $n\geq 1$ a middle levels Gray code is a cyclic listing of all $n$-element and $(n+1)$-element subsets of $\{1,2,\ldots,2n+1\}$ such that any two consecutive subsets differ in adding or removing a single element. The question whether such a Gray code exists for any $n\geq 1$ has been the subject of intensive research during the last 30 years, and has been answered affirmatively only recently [T. Mütze. Proof of the middle levels conjecture. Proc. London Math. Soc., 112(4):677--713, 2016]. In a follow-up paper [T. Mütze and J. Nummenpalo. An efficient algorithm for computing a middle levels Gray code. To appear in ACM Transactions on Algorithms, 2018] this existence proof was turned into an algorithm that computes each new set in the Gray code in time $\mathcal{O}(n)$ on average. In this work we present an algorithm for computing a middle levels Gray code in optimal time and space: each new set is generated in time $\mathcal{O}(1)$ on average, and the required space is $\mathcal{O}(n)$.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。