
arXiv: 1607.08806
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.
combination, FOS: Computer and information sciences, Eulerian and Hamiltonian graphs, Combinatorial codes, loopless algorithm, Discrete Mathematics (cs.DM), Enumeration in graph theory, 004, 510, hypercube, Graph algorithms (graph-theoretic aspects), Computer Science - Data Structures and Algorithms, FOS: Mathematics, subset, Mathematics - Combinatorics, Data Structures and Algorithms (cs.DS), Combinatorics (math.CO), Gray code, Computer Science - Discrete Mathematics, ddc: ddc:004
combination, FOS: Computer and information sciences, Eulerian and Hamiltonian graphs, Combinatorial codes, loopless algorithm, Discrete Mathematics (cs.DM), Enumeration in graph theory, 004, 510, hypercube, Graph algorithms (graph-theoretic aspects), Computer Science - Data Structures and Algorithms, FOS: Mathematics, subset, Mathematics - Combinatorics, Data Structures and Algorithms (cs.DS), Combinatorics (math.CO), Gray code, Computer Science - Discrete Mathematics, ddc: ddc:004
| selected citations These citations are derived from selected sources. This is an alternative to the "Influence" indicator, which also reflects the overall/total impact of an article in the research community at large, based on the underlying citation network (diachronically). | 5 | |
| popularity This indicator reflects the "current" impact/attention (the "hype") of an article in the research community at large, based on the underlying citation network. | Top 10% | |
| influence This indicator reflects the overall/total impact of an article in the research community at large, based on the underlying citation network (diachronically). | Average | |
| impulse This indicator reflects the initial momentum of an article directly after its publication, based on the underlying citation network. | Average |
