arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 1607.08806math.COcs.DMcs.DS
收藏

Gray码的裁剪和粘合

Trimming and gluing Gray codes

Petr Gregor, Torsten Mütze

摘要:

我们考虑的算法问题,产生的每个子集的$[n]:=\{1,2,\ldots,n\}$的大小是在一些区间$[k,l]$,$0\leq k\leq l\leq n$,正是一次(循环)通过反复添加或删除一个单一的元素,或通过交换一个单一的元素。对于$k=0$和$l=n$,这是通过元素添加/移除生成$[n]$的所有$2^n$子集的经典问题,而对于$k=l$,这是通过元素交换生成$[n]$的所有$\binom{n}{k}$子集的经典问题。我们证明了存在这样的循环最小变化枚举值$n$,$k$和$l$的大范围内,改进和推广以前的几个结果。对于所有这些存在的结果,我们提供了最佳的算法来计算相应的格雷码在恒定的$\mathcal{O}(1)$时间每个生成集和$\mathcal{O}(n)$空间。用图论的方法重新表述,我们的结果证明了由所有水平$[k,l]$诱导的$n$维立方体$Q_n$的子图中存在(几乎)Hamilton圈。我们减少了所有剩余的开放情况下,一个广义版本的中间水平猜想,它断言的子图的$Q_{2k+1}$诱导的所有水平$[k-c,k+1+c]$,$c\in\{0,1,\ldots,k\}$,有一个Hamilton圈。我们还证明了这个广义猜想的一个近似版本,表明这个图有一个周期,访问所有顶点的$(1-o(1))$分数。

英文摘要:

We consider the algorithmic problem of generating each subset of $[n]:=\{1,2,\ldots,n\}$ whose size is in some interval $[k,l]$, $0\leq k\leq l\leq n$, exactly once (cyclically) by repeatedly adding or removing a single element, or by exchanging a single element. For $k=0$ and $l=n$ this is the classical problem of generating all $2^n$ subsets of $[n]$ by element additions/removals, and for $k=l$ this is the classical problem of generating all $\binom{n}{k}$ subsets of $[n]$ by element exchanges. We prove the existence of such cyclic minimum-change enumerations for a large range of values $n$, $k$, and $l$, improving upon and generalizing several previous results. For all these existential results we provide optimal algorithms to compute the corresponding Gray codes in constant $\mathcal{O}(1)$ time per generated set and $\mathcal{O}(n)$ space. Rephrased in terms of graph theory, our results establish the existence of (almost) Hamilton cycles in the subgraph of the $n$-dimensional cube $Q_n$ induced by all levels $[k,l]$. We reduce all remaining open cases to a generalized version of the middle levels conjecture, which asserts that the subgraph of $Q_{2k+1}$ induced by all levels $[k-c,k+1+c]$, $c\in\{0,1,\ldots,k\}$, has a Hamilton cycle. We also prove an approximate version of this generalized conjecture, showing that this graph has a cycle that visits a $(1-o(1))$-fraction of all vertices.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑