Sparse Kneser graphs are Hamiltonian

For integers $k\geq 1$ and $n\geq 2k+1$, the Kneser graph $K(n,k)$ is the graph whose vertices are the $k$-element subsets of $\{1,\ldots,n\}$ and whose edges connect pairs of subsets that are disjoint. The Kneser graphs of the form $K(2k+1,k)$ are also known as the odd graphs. We settle an old problem due to Meredith, Lloyd, and Biggs from the 1970s, proving that for every $k\geq 3$, the odd graph $K(2k+1,k)$ has a Hamilton cycle. This and a known conditional result due to Johnson imply that all Kneser graphs of the form $K(2k+2^a,k)$ with $k\geq 3$ and $a\geq 0$ have a Hamilton cycle. We also prove that $K(2k+1,k)$ has at least $2^{2^{k-6}}$ distinct Hamilton cycles for $k\geq 6$. Our proofs are based on a reduction of the Hamiltonicity problem in the odd graph to the problem of finding a spanning tree in a suitably defined hypergraph on Dyck words.


Introduction
The question whether a given graph has a Hamilton cycle is one of the oldest and most fundamental problems in graph theory and computer science, shown to be NP-complete in Karp's seminal paper [Kar72]. The problem originates from the 19th-century "Hamilton puzzle", which involves finding a Hamilton cycle along the edges of a dodecahedron. Efficient methods of generating Hamilton cycles in highly symmetric graphs (in particular, so-called Gray codes) are particularly important from the point of view of practical applications [Knu11,Sav97]. Still, for various natural and extensively studied families of graphs, it is conjectured that a Hamilton cycle always exists, but finding one is a notoriously hard problem; see for instance [MN20,SW20]. In this paper, we focus on a well-known instance of this phenomenon-the so-called Kneser graphs.
1.1. Kneser graphs. For any two integers k 1 and n 2k + 1, the Kneser graph K(n, k) has the k-element subsets of [n] := {1, . . . , n} as vertices and the pairs of those subsets that are disjoint as edges. These graphs were introduced by Lovász in his celebrated proof of Kneser's conjecture [Lov78]. The proof uses topological methods to show that the chromatic number of K(n, k) is equal to n − 2k + 2. Lovász's result initiated an exciting line of research [Bár78,Gre02,Mat04,Zie02] and gave rise to the nowadays flourishing fields of topological combinatorics and computational topology, see e.g. [ČKM + 13, ČKM + 14]. Apart from the above, Kneser graphs have many other interesting properties. For instance, the maximum size of an independent set in K(n, k) is equal to n−1 k−1 , by the famous Erdős-Ko-Rado theorem [EKR61]. 1.2. Hamilton cycles in Kneser graphs. As indicated before, it has long been conjectured that Kneser graphs have Hamilton cycles. Apart from one obvious exception, namely the Petersen graph K(5, 2) shown in Figure 1, no other negative instances are apparent. Observe that Kneser graphs are vertex-transitive, that is, they look the same from the point of view of any vertex. This makes them an excellent test case for a famous and vastly more general conjecture due to Lovász [Lov70], which asserts that any connected and vertex-transitive graph has a Hamilton cycle, apart from the Petersen graph and four other exceptional instances.
We proceed by giving an account of the long history of finding Hamilton cycles in Kneser graphs. The degree of every vertex in K(n, k) is n−k k , so for fixed k, increasing n also increases the vertex degrees, which intuitively makes the task of finding a Hamilton cycle easier. The density is also witnessed by cliques of size c 3, which are present for n ck and absent for n < ck. The sparsest case, for which finding a Hamilton cycle is intuitively hardest, is when n = 2k + 1. The corresponding graphs O k := K(2k + 1, k), for k 1, are known as odd graphs. They include the Petersen graph O 2 = K(5, 2). The odd graphs O 2 and O 3 are illustrated in Figures 1 and 2, respectively. Note that all vertices in the odd graph O k have degree k + 1, which is only logarithmic in the number of vertices. The conjecture that the odd graph O k has a Hamilton cycle for every k 3 originated in the 1970s, in papers by Meredith and Lloyd [ML72,ML73] and by Biggs [Big79]. A stronger version of the conjecture asserts that O k even has (k + 1)/2 edge-disjoint Hamilton cycles. Already Balaban [Bal72] exhibited a Hamilton cycle for the cases k = 3 and k = 4, and Meredith and Lloyd described one for k = 5 and k = 6. Later, Mather [Mat76] also solved the case k = 7. With the help of computers, Shields and Savage [SS04] found Hamilton cycles in O k for all values of k up to 13. They also found Hamilton cycles in K(n, k) for all n 27 (except for the Petersen graph).
There is a long line of research devoted to proving that sufficiently dense Kneser graphs have a Hamilton cycle. Heinrich and Wallis [HW78] showed that K(n, k) has a Hamilton cycle if n 2k + k/( k √ 2 − 1) = (1 + o(1))k 2 / ln 2. This was improved by B. Chen and Lih [CL87], whose results imply that K(n, k) has a Hamilton cycle if n (1 + o(1))k 2 / log k, see [CI96]. In another breakthrough, Y. Chen [Che00] showed that K(n, k) is Hamiltonian when n 3k. A particularly nice and clean proof for the cases where n = ck, c ∈ {3, 4, . . .}, was obtained by Y. Chen and Füredi [CF02]. Their proof uses Baranyai's well-known partition theorem for complete hypergraphs [Bar75] to partition the vertices of K(ck, k) into cliques of size c. This proof method was extended by Bellmann and Schülke to any n 4k [BS19]. The asymptotically best result currently known, again due to Y. Chen [Che03], is that K(n, k) has a Hamilton cycle if n (3k + 1 + √ 5k 2 − 2k + 1)/2 = (1 + o(1))2.618 . . . · k. Another line of attack towards proving Hamiltonicity is to find long cycles in K(n, k). To this end, Johnson [Joh04] showed that there exists a constant c > 0 such that the odd graph O k has a cycle that visits at least a 1 − c/ √ k proportion of all vertices, which is almost all vertices as k tends to infinity. This was generalized and improved in [MS17], where it was shown that K(n, k) has a cycle visiting a 2k/n proportion of all vertices. The last result implies that O k has a cycle visiting a 1 − 1/(2k + 1) proportion of the vertices (e.g., the Petersen graph O 2 has a cycle that visits 8 of its 10 vertices).
A different relaxation of proving Hamiltonicity is to construct a cycle factor, that is, a collection of vertex-disjoint cycles that together cover all vertices of the graph. From this point of view, a Hamilton cycle is a cycle factor consisting of a single cycle. In this direction, Johnson and Kierstead [JK04] showed that the edges of O k can be partitioned into cycle factors for odd k and into cycle factors and one matching for even k. A different cycle factor in O k , which turns out to be crucial for our present result, was constructed in [MSW18]. It is shown in Figure 2 for the case k = 3.
1.3. Bipartite Kneser graphs. Bipartite Kneser graphs form another family of vertex-transitive graphs closely related to Kneser graphs. The bipartite Kneser graph H(n, k) has all k-element and all (n − k)-element subsets of [n] as vertices and all pairs of these subsets such that one is contained in the other as edges. It has been a long-standing problem to show that H(n, k) has a Hamilton cycle. A detailed account of the historic developments is given in [MS17]. Also here, the sparsest case H(2k + 1, k) resisted all attacks for more than three decades, and the question whether H(2k + 1, k) has a Hamilton cycle became known as the middle levels conjecture. This conjecture has been recently solved affirmatively in [Müt16] (see also [GMN18]), and the general case, the Hamiltonicity of H(n, k), has been settled subsequently in [MS17]. Note that proving Hamiltonicity for the Kneser graph K(n, k) is arguably harder than for the bipartite Kneser graph H(n, k). In particular, proving that the odd graphs O k = K(2k + 1, k) are Hamiltonian is harder than the middle levels conjecture. Specifically, from a Hamilton cycle (x 1 , . . . , x N ) in K(n, k), where N = n k , we can easily construct a Hamilton cycle or a Hamilton path in H(n, k), as follows. Consider the sequences C 1 := (x 1 , x 2 , x 3 , x 4 , . . .) and C 2 := (x 1 , x 2 , x 3 , x 4 , . . .), where x i := [n] \ x i . If N is odd, then C 1 and C 2 together form a Hamilton cycle in H(n, k). If N is even, then C 1 and C 2 are two cycles in H(n, k) that can be joined to form a Hamilton path. In fact, the arguments given in this paper easily give a Hamilton cycle in H(2k + 1, k) for all k 1, providing an alternative proof of the middle levels conjecture; see Section 6.
1.4. Our results. We prove that the odd graphs O k = K(2k +1, k) with k 3 contain Hamilton cycles. That is, we resolve the sparsest case of the conjecture on the Hamiltonicity of Kneser graphs in the affirmative.
Theorem 1. For any integer k 3, the odd graph O k = K(2k + 1, k) has a Hamilton cycle.
Using the conditional results proved by Johnson [Joh11], Theorem 1 immediately yields the following more general statement.
Theorem 2. For any integers k 3 and a 0, the Kneser graph K(2k + 2 a , k) has a Hamilton cycle.

SPARSE KNESER GRAPHS ARE HAMILTONIAN
We also establish the following counting version of Theorem 1.
The double-exponential growth of the number of Hamilton cycles guaranteed by Theorem 3 is essentially best possible: since O k has 2k+1 k vertices, the number of Hamilton cycles in O k is at most 2k+1 k ! = 2 2 O(k) . Note also that applying automorphisms of O k to a a single Hamilton cycle yields at most (2k + 1)! = 2 Θ(k log k) distinct Hamilton cycles, substantially fewer than guaranteed by Theorem 3. In other words, Theorem 3 is not an immediate consequence of Theorem 1.
1.5. Gray code algorithms. Hamilton cycles in Kneser graphs and bipartite Kneser graphs are closely related to Gray codes. A combinatorial Gray code is the algorithmic problem of generating all objects in a combinatorial class, such as bitstrings, permutations, combinations, partitions, trees, or triangulations, etc., in some well-defined order. Gray codes have found widespread use in areas such as circuit testing, signal encoding, data compression, graphics, and image processing etc.-see the survey [Sav97] and the references therein. The ultimate goal for Gray code algorithms is to generate each new object from the previous one in constant time, which entails that consecutive objects may differ only by a constant amount. A Gray code thus corresponds to a Hamilton cycle in a graph whose vertices are the combinatorial objects and whose edges connect objects that differ only by such an elementary transformation. More than half of the most recent volume of Knuth's seminal series The Art of Computer Programming [Knu11] is devoted to this fundamental subject. The two hardest Gray code problems mentioned in Knuth's book (Problem 71 in Section 7.2.1.2 and Problem 56 in Section 7.2.1.3), including the middle levels conjecture, have been solved in the meantime, and efficient algorithms to generate these Gray code have been developed in [MN20] and [SW20]. Recall from Section 1.3 that Hamiltonicity of the odd graphs is arguably harder than the middle levels conjecture.
Our proof of Theorem 1 is constructive and translates straightforwardly into an algorithm to compute a Hamilton cycle in the odd graph O k in polynomial time (polynomial in the size of the graph, which is exponential in k). We can identify each k-element subset of [2k + 1] with a bitstring of length 2k + 1, where the ith bit is set to 1 if the element i is contained in the set and it is set to 0 otherwise; see Figure 1. A Hamilton cycle in the odd graph thus corresponds to a Gray code listing of all bitstrings of length 2k + 1 with exactly k many 1-bits, such that consecutive bitstrings differ in all but one position. It remains open whether our proof can be translated into a constant-time algorithm to generate this Gray code, that is, an algorithm that in each step computes the bit that is not flipped in constant time, using only O(k) memory space and polynomial initialization time. To avoid costly complementation operations, such an algorithm could maintain two bitstrings, one the complement of the other, along with a flag indicating which of the two bitstrings is the current one; then, in each step, only a single bit in both bitstrings and the flag would need to be flipped.
1.6. Proof idea. We construct a Hamilton cycle in the odd graph O k as follows; see Figure 2. We start with the cycle factor C k in the odd graph O k described in [MSW18]. It has the property that all of its cycles have the same length 2k + 1 and the number of cycles is the kth Catalan number. Furthermore, the cycles in C k can be identified with so-called Dyck words of length 2k, that is, bitstrings of length 2k with the property that every prefix has at least as many 1-bits as 0-bits. It is well known that the number of such Dyck words is equal to the kth Catalan number [Sta99].
Given the cycle factor C k , we modify it locally to join its cycles into a single Hamilton cycle in O k . Each such modification involves cycles C 1 , . . . , C from the factor C k and a 2 -cycle C that shares exactly one edge with each of C 1 , . . . , C . Specifically, C shares every second of its edges with one of the cycles, and every other edge of C goes between two different cycles. Consequently, taking the symmetric difference of the edge set of C with the edge sets of C 1 , . . . , C yields a single cycle on the vertex set of all C 1 , . . . , C . We call a cycle C with this property a flipping cycle. In Figure 2, two flipping 6-cycles are highlighted with dashed and dotted lines. We perform this operation simultaneously with an appropriate set of mutually edge-disjoint flipping cycles so as to join all cycles in C k into a single cycle. Although the joining operation can work with flipping 2 -cycles for any 2, we will use only 6-cycles ( = 3) and 8-cycles ( = 4). We cannot use flipping 4-cycles ( = 2), because the odd graph O k has no 4-cycles at all.
This approach can be formalized as follows. We construct a hypergraph H k whose vertices are the Dyck words of length 2k representing the cycles of the factor C k . Each -edge (3-edge or 4-edge) of H k represents a flipping 2 -cycle (6-cycle or 8-cycle, respectively) that can be used to join cycles from C k as described before. In the example illustrated in Figure 2, the hypergraph H 3 consists of three hyperedges labeled α, β, and δ of cardinalities 3, 3, and 4, respectively. Here is the key insight about the hypergraph H k : in order to prove that the odd graph O k has a Hamilton cycle, it suffices to prove that the hypergraph H k has a spanning tree, that is, a connected and acyclic set of hyperedges covering all vertices. In such a spanning tree, any two hyperedges intersect in at most one element. For instance, the hypergraph H 3 in Figure 2 has a spanning tree {α, β}. The hypergraph H k that we construct has the property that the flipping cycles represented by the hyperedges in any spanning tree are mutually edgedisjoint. Consequently, every spanning tree in H k corresponds to a collection of flipping cycles such that the symmetric difference of their edge sets and the edges of the cycles in C k results in a Hamilton cycle in the odd graph O k .
The proof of Theorem 3 exploits the degrees of freedom that are inherent in the construction above to provide double-exponentially many distinct spanning trees in H k , which give rise to double-exponentially many distinct Hamilton cycles in O k . This general approach of reducing a Hamilton cycle problem to a spanning tree problem in a suitably defined auxiliary (hyper)graph has also been exploited in several other papers; see e.g. [GMN18, GSWW18, Hol17, HRW12, Joh09, Joh11, Müt16, SW20]. 1.7. Outline of the paper. In Section 2, we introduce notation and terminology that will be used throughout this paper, and we recall the construction of the cycle factor C k given in [MSW18]. In Section 3, we describe how the cycles in C k are joined to form a Hamilton cycle in O k , and we present the proofs of Theorems 1-3. The proofs of some technical lemmas are deferred to Sections 4 and 5. In Section 6, we give an alternative proof of the middle levels conjecture. We conclude with some open problems in Section 7.

Bitstrings and Dyck paths.
A bitstring is a finite sequence of digits 0 and 1 called the bits of the bitstring. The empty bitstring is denoted by . The concatenation of two bitstrings x and y is denoted by xy. For every bitstring x, we define x 0 := and x n := x n−1 x for n 1. The length of a bitstring x is denoted by |x|. The complement of a bitstring x, denoted by x, is the bitstring obtained from x by flipping every bit, that is, by replacing every 1-bit by a 0-bit and vice versa.
The weight of a bitstring x is the number of 1-bits in x. We let B 0 k and B 1 k denote the sets of bitstrings of length 2k with weights k and k + 1, respectively, and we let B k : We let D k denote the set of bitstrings of length 2k with weight k and with the property that in every prefix, the number of 1-bits is at least the number of 0-bits. It is a well known fact that , which is the kth Catalan number. We also define D := ∞ k=0 D k , and we call every bitstring in D a Dyck word. It is sometimes convenient to represent a Dyck word x ∈ D k by a Dyck path of length 2k in the integer lattice Z 2 . Every 1-bit in the Dyck word x is represented by an up-step, which changes the current coordinates by (+1, +1), and every 0-bit is represented by a down-step, which changes the current coordinates by (+1, −1); see Figure 3. The prefix property from the definition of D k corresponds to the property that the lattice path never goes below the abscissa.
For a Dyck word That is, # " x is the complement of the reverse of x, which is itself a Dyck word in D k . For example, if x = 110010, then # " x = 101100. We call the operation x → # " x mirroring. In terms of Dyck path representation, it corresponds to taking the mirror image with respect to the vertical line x = k.
2.2. Graphs G k and G + k . We use standard graph-theoretic terminology, where the edges of every graph that we consider are unordered pairs of vertices of the form {u, v}. We define G k SPARSE KNESER GRAPHS ARE HAMILTONIAN 7 π(x) = (14, 8, 12, 10, 11, 9, 13, 6, 7, 2, 4, 3, 5, 1, 16, 15, 20, 18, 19, 17)  . Dyck path representation of a Dyck word x ∈ D 10 and the permutation π(x). The numbers on top of the Dyck path edges represent the order in which its up-steps and down-steps occur in the sequence π(x), i.e., they are equal to the inverse permutation (π(x)) −1 when read from left to right.
as the graph with vertex set B k and with edges that connect pairs of bitstrings that differ by exactly one bit. In other words, G k is the subgraph of the 2k-dimensional hypercube induced by the bitstrings with weights k and k + 1. For k 1, we also define G + k as the graph obtained from G k by adding all edges of the form {x, x} where x ∈ B 0 k . This construction is illustrated on the right hand side of Figure 1, where the edges {x, x} are highlighted in black. Observe that while the graph G k is bipartite, the graph G + k is not. Lemma 4. For every k 1, the graph G + k is isomorphic to the odd graph O k . Proof. A natural isomorphism between G + k and O k is obtained by mapping every x ∈ B 0 k to x0 and every x ∈ B 1 k to x1 and by interpreting the resulting bitstrings of length 2k + 1 and weight k as characteristic vectors of k-element subsets of [2k + 1]. It is straightforward to verify that this mapping preserves edges and non-edges.
To prove Theorems 1 and 3, we will use Lemma 4 and construct Hamilton cycles in G + k for all k 3.

Cycle factor
A cycle factor in a graph is a collection of vertex-disjoint cycles that together cover all vertices of the graph. The cycle factor C k in G + k , which we will define shortly, was introduced and analyzed in [MSW18]. The cycles in C k correspond to Dyck words in D k as follows. For every Dyck word x ∈ D k , we define a permutation π(x) of the set [2k]. Then, we define a path P (x) in G k whose subsequent vertices are obtained by starting from x and flipping the bits one by one at positions determined by the sequence π(x) = (a 1 , . . . , a 2k ), ending at x. Finally, we add the edge {x, x} to P (x), obtaining a cycle C(x) in G + k that becomes a member of C k .
It is clear that every non-empty Dyck word x ∈ D has a unique decomposition of the form x = 1u0v, where u, v ∈ D; see Figure 3. Using this fact, for every Dyck word x ∈ D, we define an integer sequence π(x) of length |x| as follows, by induction on |x|: (1)

SPARSE KNESER GRAPHS ARE HAMILTONIAN
The sequence π(x) for x ∈ D k satisfies the following properties: (a 1 , . . . , a 2k ), then the bit of x at position a i is 0 for i odd and 1 for i even.
To see why, we apply induction on |x|. The base case x = clearly satisfies both (i) and (ii). If only if i is even, as claimed in (ii). We leave the analysis of the remaining cases to the reader. In terms of Dyck path representation, we can interpret π(x) as the alternating order of downsteps and up-steps of the Dyck path x; see Figure 3. The first term of π(x) represents the first down-step that touches the abscissa-it goes from (|u| + 1, 1) to (|u| + 2, 0). The next part of π(x) represents the up-steps and down-steps of the part u of the Dyck path between (1, 1) to (|u| + 1, 1) in the order obtained recursively on the mirror image of u. The next term of π(x) represents the first up-step, which goes from (0, 0) to (1, 1). The final part of π(x) represents the down-steps and up-steps of the part v of the Dyck path between (|u| + 2, 0) to (|x|, 0) ordered recursively. Now, let x ∈ D k and π(x) = (a 1 , . . . , a 2k ). Using the properties (i) and (ii) above, we define a path P (x) = (x 0 , x 1 , . . . , x 2k ) in the graph G k so that x 0 = x and x i is obtained from x i−1 by flipping the bit at position a i for every i ∈ [2k], whence it follows that x 2k = x. We call π(x) the bit-flip sequence for P (x). We define the set of paths P k by The set of paths P 3 with the corresponding bit-flip sequences is illustrated in Figure 4.
The following lemma is a consequence of the results of [MSW18]. For the reader's convenience, we provide a short direct proof of it in Section 4.

Lemma 5 ([MSW18]). For every k
1, the paths in P k are mutually vertex-disjoint, and together they cover all vertices of G k .
For every Dyck word x ∈ D k and every bit position i ∈ [2k], we let e(x, i) denote the edge of the path P (x) along which the ith bit is flipped. That is, if π(x) = (a 1 , . . . , a 2k ), then the path P (x) contains edges e(x, a 1 ), . . . , e(x, a 2k ) in this order along the path from x to x. For example, for x 1 as in Figure 4, we have e(x 1 , 3) = {101101, 100101} and e(x 1 , 1) = {100111, 000111}.
For every Dyck word x ∈ D k with k 1, the first vertex x and the last vertex x of P (x) are adjacent in G + k . We let C(x) denote the cycle in G + k obtained by adding the edge {x, x} to the path P (x). We define It follows from Lemma 5 that the set of cycles C k is a cycle factor in G + k . Figure 2 illustrates the cycles in C 3 , which are obtained by closing the paths in P 3 illustrated in Figure 4 and applying the isomorphism between G + k and O k described in the proof of Lemma 4.
A flipping cycle on D k is a cycle in G k of length 2 that has exactly edges in common with distinct paths in the set P k (one common edge with each path), and along the cycle these common edges alternate with edges that go between pairs of distinct paths. Recall that each path P (x) ∈ P k in G k extends to the cycle C(x) in the graph G + k by adding the edge {x, x}, so a flipping cycle has exactly edges in common with distinct cycles in the set C k .
A marked Dyck word is a non-empty Dyck word in which exactly one bit has been marked. More formally, a marked Dyck word is a pair (x, m) with x ∈ D k and m ∈ [2k] for some k 1, where m is the position of the marked bit in x. We simplify notation of marked Dyck words by underlining the marked bit. For instance, 101100 denotes the marked Dyck word (101100, 5). We define prepending to, appending to, and mirroring a marked Dyck word (x, m) in a natural way, as follows: u (x, m) v := (uxv, |u| + m) for any bitstrings u and v such that uv ∈ D,  (x 1 , m 1 ), . . . , e(x , m ) of the paths P (x 1 ), . . . , P (x ), respectively. We say that such a flipping cycle witnesses the flippable tuple τ .
To get an intuition for these definitions, consider the Dyck words x 1 , x 2 , and x 3 in the first three columns in Figure 4. Then τ = {111000, 110100, 110010} is a marked triple on D 3 with support supp τ = {x 1 , x 2 , x 3 }. In fact, it is a flippable triple on D 3 witnessed by a flipping 6-cycle W = (100101, 100111, 100110, 110110, 110100, 110101) that contains the edges e(x 1 , 5) of P (x 1 ), e(x 2 , 6) of P (x 2 ), and e(x 3 , 2) of P (x 3 ), indicated in Figure 4 by dashed frames. By taking the symmetric difference with W , the cycles C(x 1 ), C(x 2 ), and C(x 3 ) become joined into a single cycle. This observation motivates the definitions that follow.
Let X ⊆ D k (where k 2), let X be a set of flippable tuples on X, and let H = (X, X). We call such a structure H a flippability hypergraph on X, and we apply a few standard hypergraphtheoretic terms to H (as follows), although the reader should realize that the members of X convey the marks as extra information in addition to the standard hypergraph structure. Thus, the subhypergraph of H induced by a non-empty set U ⊆ X is defined as A spanning tree of H is a subset of X defined as follows, by induction on |X|. If |X| = 1, then the only spanning tree of H is the empty set. If |X| 2, then a set T ⊆ X is a spanning tree of H if and only if there are a flippable -tuple τ ∈ T, a partition of X into non-empty subsets X 1 , . . . , X , and spanning trees T 1 , . . . , T of H[X 1 ], . . . , H[X ] (respectively) such that T = {τ } ∪ T 1 ∪ · · · ∪ T and |supp τ ∩ X i | = 1 for each i ∈ [ ]. For instance, a one-element set T = {τ } ⊆ X is a spanning tree of H if and only if supp τ = X, and a two-element set T = {τ 1 , τ 2 } ⊆ X is a spanning tree of H if and only if supp τ 1 ∪ supp τ 2 = X and |supp τ 1 ∩ supp τ 2 | = 1. In general, straightforward induction shows that the supports of any two flippable tuples in a spanning tree have at most one element of X in common. A conflict-free set in H is a subset U of X such that the following two conditions are satisfied: (i) the supports of any two flippable tuples in U have at most one element of X in common; (ii) for any two distinct flippable tuples τ 1 , τ 2 ∈ U whose supports have a common element x ∈ X, the mark of x in τ 1 is different from the mark of x in τ 2 .
As it is mentioned above, every spanning tree satisfies condition (i), and thus a conflict-free spanning tree is a spanning tree that additionally satisfies condition (ii). The following lemma is the cornerstone behind our proofs of Theorems 1 and 3. It reduces the problem of finding a Hamilton cycle in the graph G + k (which is isomorphic to the odd graph O k ) to the problem of finding a conflict-free spanning tree in a flippability hypergraph on D k . Lemma 6. Let H be a flippability hypergraph on D k , where k 3. If H has a conflict-free spanning tree, then the graph G + k has a Hamilton cycle. Moreover, distinct conflict-free spanning trees of H give rise to distinct Hamilton cycles in G + k . Proof. For every flippable tuple τ on D k , fix a flipping cycle W (τ ) in G + k that witnesses τ . For a non-empty set X ⊆ D k , let G + k [X] denote the subgraph of G + k induced by the set of all vertices of the cycles C(x) with x ∈ X. For a non-empty set X ⊆ D k and a conflict-free set U in H[X], let S(X, U) denote the symmetric difference of the edge sets of the cycles C(x) with x ∈ X and the cycles W (τ ) with τ ∈ U. We prove the following statement, which immediately yields the lemma: The proof of the claim goes by induction on |X|. If |X| = 1, then the empty set is the unique conflict-free spanning tree in H[X], and S(X, ∅) = C(x) for the unique x ∈ X. For the rest of the proof, suppose that |X| 2 and that the claim holds for all subsets of D k smaller than X.
Let T be a conflict-free spanning tree in H[X]. By the definition of a spanning tree, there are a flippable -tuple τ ∈ T, a partition of X into non-empty subsets X 1 , . . . , X , and spanning trees T 1 , . . . , T of H[X 1 ], . . . , H[X ] (respectively) such that T = {τ } ∪ T 1 ∪ · · · ∪ T and |supp τ ∩ X i | = 1 for each i ∈ [ ]. Since T 1 , . . . , T ⊂ T, the spanning trees T 1 , . . . , T are conflictfree. Therefore, by the induction hypothesis, the sets S(X 1 , T 1 ), . . . , S(X , T ) form Hamilton The set S(X, T) is the symmetric difference of S(X 1 , T 1 ), . . . , S(X , T ) and W (τ ), which is therefore a single cycle-a Hamilton cycle in G + k [X]. Now, suppose that H[X] has another conflict-free set U such that S(X, T) = S(X, U) =: S. For each i ∈ [ ], since the only edges in S that connect X i with X \ X i are those that precede and follow e(x i , m i ) on W (τ ), these two edges along with e(x i , m i ) belong to the same cycle witnessing some flippable tuple in U. It follows that the entire flipping cycle W (τ ) witnesses one of the flippable tuples in U, which implies τ ∈ U. The symmetric difference of S and W (τ ) is the disjoint union of S(X 1 , T 1 ), . . . , S(X , T ). This implies that every flippable tuple in U \ {τ } is a flippable tuple on one of X 1 , . . . , X . Therefore, we have This and the induction hypothesis yield T i = U i for each i ∈ [ ] and therefore T = U.
To apply Lemma 6, we need to define a flippability hypergraph on D k that admits a conflictfree spanning tree. In other words, we need to construct a sufficiently large set of flippable tuples. Our construction works inductively and is based on the next lemma, which allows us to generate more flippable tuples from existing ones by prepending and appending certain bitstrings to them. We introduce the following auxiliary notation for every flippable tuple for any bitstrings u and v such that uv ∈ D, (3)

Lemma 7. If τ is a flippable tuple, then
(i) uτ v is a flippable tuple for any bitstrings u and v such that uv ∈ D and |u| is even, (ii) u # " τ v is a flippable tuple for any bitstrings u and v such that uv ∈ D and |u| is odd.
The proofs of Lemma 7 and of all subsequent lemmas stated in this section are deferred to Sections 4 and 5.
We now specify the base case for our inductive construction of flippable tuples. We found the following tuples on D 3 and D 4 with the help of a computer. In fact, the computer search gave many more flippable tuples, and we carefully selected a subset that can be used to create a conflict-free spanning tree on The Dyck path representation of these tuples is shown in Figure 5. The next lemma asserts that these definitions indeed yield flippable tuples.
Lemma 8. Every pattern in Φ defined by (4) is a flippable tuple. Figure 4 shows three flipping cycles that witness the patterns α( ), β, and δ. We use Lemmas 7 and 8 to construct a set Ψ of flippable tuples. Namely, we define Ψ := {uϕv | ϕ ∈ Φ, uv ∈ D, and |u| is even} ∪ {u # " ϕv | ϕ ∈ Φ, uv ∈ D, and |u| is odd}. (5) By Lemmas 7 and 8, every marked tuple in Ψ is flippable. Observe that the set of flippable tuples Ψ is already closed with respect to the operation described in Lemma 7, that is, and |u| is odd}. (6) Next, for each k 2, we define a set Ψ k by extracting only the flippable tuples on D k from Ψ: Finally, we define a flippability hypergraph H k := (D k , Ψ k ) for k 2.
Lemma 9. For every k 3, the set Ψ k of flippable tuples defined by (7) has the property that for any τ 1 , τ 2 ∈ Ψ k , if supp τ 1 ∩ supp τ 2 = {x} where x ∈ D k , then the mark of x in τ 1 is different from the mark of x in τ 2 . In particular, every spanning tree of the hypergraph H k is conflict-free.
In view of Lemmas 6 and 9, it remains to prove that the hypergraph H k has a spanning tree (many distinct spanning trees) to complete the proofs of Theorems 1 and 3.
Lemma 10. For every k 3, the hypergraph H k has a spanning tree.
Lemma 11. For every k 6, the hypergraph H k has at least 2 2 k−6 distinct spanning trees.
Proof of Theorem 1. Combine Lemma 6, Lemma 9, and Lemma 10. Proof of Lemma 5. We extend the mirroring notation to arbitrary bitstrings: for a bitstring We have P ( ) = ( ) by definition. When k 1 and x ∈ D k , the path P (x) = (x 0 , x 1 , . . . , x 2k ) can be described recursively as follows. Let x = 1u0v be the unique decomposition of x with u, v ∈ D that is used in (1). Let = 1 2 |u| + 1, so that u ∈ D −1 and v ∈ D k− . Then we have x i = 1u0v for i = 0, Conversely, for every bitstring y ∈ B k with k 1, exactly one of the following three cases holds: (iii) y has a unique decomposition y = 0u1w with u ∈ D −1 and w ∈ B k− where ∈ [k].
We prove that for every bitstring y ∈ B k with k 0, there is exactly one pair (x, i) such that x ∈ D k , i ∈ {0, . . . , 2k}, and y = x i given that P (x) = (x 0 , x 1 , . . . , x 2k ). The proof goes by induction on k. The base case k = 0 trivial. For the induction step, let y ∈ B k with k 1, and suppose the statement holds for all bitstrings in B 0 ∪ · · · ∪ B k−1 .
Proof of Lemma 7. We will prove the following three special cases of the statements claimed in the lemma: if τ is a flippable tuple, then (iii) uτ is a flippable tuple for every u ∈ D, (iv) τ v is a flippable tuple for every v ∈ D, (v) 1 # " τ 0 is a flippable tuple.
Statements (i) and (ii) then follow by straightforward induction, because the operations described therein can be obtained by repeated application of the operations described in (iii)-(v). We will need the following simple observation.
For the proof of (iv), let v ∈ D. The claim implies that for each i ∈ [ ], the initial part of the path P (x i v) looks as follows: Therefore, (y 1 v, . . . , y 2 v) is a flipping cycle that witnesses τ v. This proves (iv).
It is easy to verify that each of these sequences is a cycle in G k for the appropriate value of k. We claim that for each pattern ϕ ∈ Φ, the cycle C ϕ from (9) is a flipping cycle that witnesses ϕ. For ϕ ∈ {β, δ} this can be verified directly from Figure 4, as follows. The bitstrings on the 14 SPARSE KNESER GRAPHS ARE HAMILTONIAN cycles C β and C δ are indicated in the figure by dotted and solid frames, respectively. Both cycles have exactly one edge in common with each of the paths that start at the respective vertices in the tuples β and δ. Furthermore, the bits flipped along the indicated edges are precisely those that are marked in β and δ.
The cycle C γ defined by (9) intersects every path from (11) exactly at the last edge explicitly shown in (11), and the bits flipped along the intersection edges are exactly the marked bits of the members of γ as defined by (4).
Since x ∈ supp τ i , we have x = u i x i v i for some Dyck word x i ∈ supp ϕ i . Let m i be the mark of x i in ϕ i . It follows that |u i | + m i is the mark of x in τ i . Suppose for the sake of contradiction that the mark of x in τ 1 is the same as the mark of x in τ 2 , that is, |u 1 |+m 1 = |u 2 |+m 2 =: m. Let p := max(1−m 1 , 1−m 2 ) and q := min(|x 1 |−m 1 , |x 2 |−m 2 ). Thus we have p 0 q. The fact that u 1 x 1 v 1 = u 2 x 2 v 2 and |u 1 | + m 1 = |u 2 | + m 2 implies that for each i ∈ {p, p + 1, . . . , q}, the (m 1 + i)th bit of x 1 is equal to the (m 2 + i)th bit of x 2 . We claim that this is possible only when (x 1 , m 1 ) = (x 2 , m 2 ). The proof of this claim involves consideration of all possible cases of ϕ 1 and ϕ 2 satisfying (12) and all possible cases of marked Dyck words (x 1 , m 1 ) ∈ ϕ 1 and (x 2 , m 2 ) ∈ ϕ 2 . To avoid tedious case distinctions, we propose a visual argument using the Dyck path representation of x. Figure 5 presents the Dyck paths of the members of the patterns in Φ in which the steps representing the marked bits have been marked white or black according to the following marking rule: steps at odd positions are marked white, and steps at even positions are marked black.
Consider the Dyck path x in which the mth step has been marked white or black according to this rule. Let i ∈ {1, 2}. The common part of such a marked Dyck path x with the infinite vertical strip [|u i |, |u i x i |] × R is a translated copy of the Dyck path x i in which the m i th step has been marked according to the marking rule above. That is, it has the form of one of the  marked Dyck paths in Figure 5 if |u i | is even or the form of the mirror image of one of the marked Dyck paths in Figure 5 if |u i | is odd. Note that the mirroring does not change the mark colors-even though the parity of the relative position of the mark from the left within the Dyck path changes, this is compensated by the opposite parity of |u i |. The two translated marked Dyck paths x 1 and x 2 must coincide on the common part of the two vertical strips. Figure 6 presents every Dyck path from Figure 5 or its mirror image, so that the marked step is a down-step. It shows them aligned horizontally with respect to the marked down-steps, separately for each color. It can be checked in the figure that no two of these marked Dyck paths can coincide on the common part of the two vertical strips considered in the argument above, unless they are the same marked Dyck path. Specifically, a mismatch between any two distinct Dyck paths is indicated by a double arrow in the figure. The situation when the marked step is an up-step is analogous, by symmetry.
The second statement of Lemma 9 is an immediate consequence of the first statement and the definition of a conflict-free spanning tree.

Proofs of Lemmas 10 and 11
Before proceeding with the proofs, we generalize the notation (2) and (3). For every k 2 and every set X ⊆ D k , we define uXv := {uxv | x ∈ X} for any bitstrings u and v such that uv ∈ D, Similarly, for every k 2 and every set X of flippable tuples on D k , we define uXv := {uτ v | τ ∈ X} for any bitstrings u and v such that uv ∈ D, As a direct consequence of the definitions above and (6), if X ⊆ D k and X is a spanning tree of H k [X], then the following holds for any bitstrings u and v such that uv ∈ D: (i) if |u| is even, then uXv is a spanning tree of H k+|uv|/2 [uXv]; We will use this property extensively in the proofs below.
Proof of Lemma 10. For the reader's convenience, this proof is illustrated in Figure 7.
For k 2, we partition the set of Dyck words D k into two sets E k and F k as follows: In particular, we have the following, for k 2: We prove the following more general statement, which directly implies the lemma: Claim. There are a spanning tree T k of H k for k 3, a spanning tree E k of H k [E k ] for k 2, and a spanning tree F k of H k [F k ] for k 2.
We prove the claim by induction on k.
For k = 4, we let They belong to Ψ k by construction. Moreover, we have supp τ 1 ∪ supp τ 2 ∪ supp τ 3 ∪ supp τ 4 = F 4 , |supp τ 1 ∩ supp τ i | = 1 for every i ∈ {2, 3, 4}, and supp τ i ∩ supp τ j = ∅ for any distinct i, j ∈ {2, 3, 4}. This shows that F 4 is indeed a spanning tree of H 4 [F 4 ]. Finally, we proceed by induction on k to construct T k and E k for k 4, and F k for k 5. The construction of E k makes use of T k−1 . The construction of F k (for k 5) makes use of E 2 , . . . , E k−1 , F 2 , . . . , F k−1 , and T k−2 (this is why the case k = 4 needs to be considered separately, as H 2 has no spanning tree). Finally, the construction of T k makes use of F k , E k−1 , and F k−1 .
Constructing E k from T k−1 for k 4 is straightforward: since E k = 10D k−1 , it suffices to take E k := 10T k−1 , which is a spanning tree of For j = 2, we have F k,2 = {1100v | v ∈ D k−2 } = 1100D k−2 , so we let F k,2 := 1100T k−2 . Now, suppose 3 j k. The fact that E j−1 and F j−1 form a partition of D j−1 yields the following partition of the set F k,j : For every v ∈ D k−j , consider the following marked triple on F k,j : It belongs to Ψ k by construction. We have where the first two memberships follow from (14). We take the spanning trees of the subhypergraphs of H k induced by the sets of the partition of F k,j given by (15) and connect them into a single spanning tree of H k [F k,j ] using the triples τ (v) for all v ∈ D k−j . That is, we let Finally, we show how to construct T k from F k , E k−1 and F k−1 . Consider the following marked triple on D k : τ := {111000(10) k−3 , 101100(10) k−3 , 101010(10) k−3 = β(10) k−3 .
It belongs to Ψ k by construction. We have where the first membership is by the definition of F k for k 4 and the other two follow from (14). The sets F k , 10E k−1 , and 10F k−1 form a partition of D k . We take the spanning trees of the subhypergraphs induced by these partition sets and connect them into a single spanning tree of H k using the triple τ . That is, we let Proof of Lemma 11. The proof proceeds along the same lines as the proof of Lemma 10, so we only highlight the differences. Apart from the partition of D 4 into two sets E 4 and F 4 defined by (13), we will use another one-a partition into sets E 4 and F 4 defined as follows: It has the following property analogous to (14): We define spanning trees We have supp τ 1 ∪ · · · ∪ supp τ 5 = E 4 , |supp τ i−1 ∩ supp τ i | = 1 for i ∈ {2, 3, 4, 5}, and supp τ i ∩ supp τ j = ∅ whenever |i − j| 2, which shows that E 4 is indeed a spanning tree of H 4 [E 4 ], and F 4 is a spanning tree of H 4 [F 4 ] because |F 4 | = 1.
To obtain many spanning trees of H k for k 6, we proceed as in the proof of Lemma 10 except that we introduce variants to the construction of the spanning tree F k,5 of H k [F k,5 ]. Consider an arbitrary partition of D k−5 into two sets X and Y . The fact that E 4 and F 4 as well as E 4 and F 4 form partitions of D 4 yields the following partition of F k,5 analogous to (15): Consider the following triples on F k,5 , where the first one is a special case of (16):

SPARSE KNESER GRAPHS ARE HAMILTONIAN
They belong to Ψ k by construction. We have where the first two memberships follow from (14) and (17), respectively. We take the spanning trees of the subhypergraphs of H k induced by the sets of the partition of F k,5 given by (18) and connect them into a single spanning tree of H k [F k,5 ] using the triples τ (v) for all v ∈ X and the triples τ (v) for all v ∈ Y . That is, we let which is a spanning tree of H k [F k,5 ]. Then, we continue with the constructions of F k and T k exactly as in the proof of Lemma 10.
Clearly, distinct choices of the partition of D k−5 into two sets X and Y in the procedure above give rise to distinct spanning trees F k,5 of H k [F k,5 ], which consequently give rise to distinct spanning trees F k of H k [F k ] and T k of H k . Since |D k−5 | = 1 k−4 2k−10 k−5 2 k−6 for k 6, there are at least 2 2 k−6 distinct partitions of D k−5 into sets X and Y , which give rise to at least 2 2 k−6 distinct spanning trees of H k .
6. Alternative proof of the middle levels conjecture As we explained in Section 1.3, Theorem 1 implies that the bipartite Kneser graph H(2k + 1, k) has a Hamilton path for every k 1. We proceed to prove that it even has a Hamilton cycle, yielding an alternative proof of the middle levels conjecture, first proved in [Müt16]. Plugging in Theorem 3 instead of Theorem 1, we obtain an alternative proof of the fact that H(2k + 1, k) contains double-exponentially many distinct Hamilton cycles, also first proved in [Müt16].
Proof. For any graph G whose vertices are bitstrings, we let Gx denote the graph obtained by appending a bitstring x to all vertices of G, and we let G denote the graph obtained from G by taking the complement of each vertex. The graph H(2k + 1, k) is isomorphic to the graph M k obtained as the disjoint union of G k 0 and G k 1 plus the matching edges {x0, x1} with x ∈ B 0 k . The isomorphism is given by interpreting all bitstrings of length 2k + 1 as characteristic vectors of k-element and (k + 1)-element subsets of [2k + 1].
For k = 1 and k = 2, the theorem can be verified directly. For k 3, Theorem 1 yields a Hamilton cycle in the graph G + k . Moreover, it follows from the proof of Theorem 1 that this Hamilton cycle is obtained as the symmetric difference of the cycle factor C k in G + k with some set of flipping cycles. The cycle factor C k is obtained from a collection of paths P k in G k by adding the edges {x, x} with x ∈ D k , where the path P (x) ∈ P k connects x and x. The flipping cycles are cycles in G k . Therefore, the resulting Hamilton cycle C in G + k contains some edges of G k plus the edges {x, x} with x ∈ D k . We remove the latter edges from C, thus obtaining a collection of paths Q in G k . Then, to obtain a Hamilton cycle in M k , we take the paths in Q0 and P k 1 and add the matching edges {x0, x1} and {x0, x1} with x ∈ D k . This is indeed a Hamilton cycle in M k , obtained from the Hamilton cycle C0 in G + k 0 by removing every edge of the form {x0, x0} (with x ∈ D k ) and replacing it by the path going from x0 to x1, then along P (x)1 from x1 to x1, and then to x0.
For k 6, Theorem 3 yields at least 2 2 k−6 distinct Hamilton cycles in G + k with the properties discussed above, which give rise to at least 2 2 k−6 distinct Hamilton cycles in H(2k + 1, k) by the construction described above.

Open problems
As mentioned in Section 1.5, our construction of a Hamilton cycle in the odd graph O k translates straightforwardly into an algorithm to compute this cycle in polynomial time, that is, polynomial in the size of the graph. It remains open whether this can be improved to an algorithm whose running time is polynomial in k, ideally, constant for each generated vertex. This might even yield a simpler algorithmic solution for the middle levels conjecture (recall Section 6 and [MN20]).
As Hamiltonicity of the odd graphs O k is now settled, one may turn to Biggs' more general conjecture that O k has (k + 1)/2 edge-disjoint Hamilton cycles for k 3 [Big79]. Clearly, edge-disjointness is a much stronger requirement than distinctness guaranteed by Theorem 3. A starting point for such a construction may be the factorizations of O k into cycles described by Johnson and Kierstead [JK04]. Our construction of a cycle factor is unrelated to these factorizations, and we do not even see how to extend it to a construction of two edge-disjoint cycle factors.
Another intriguing open problem is whether all Kneser graphs K(n, k) except the Petersen graph O 2 = K(5, 2) are Hamiltonian. Despite serious attempts, we have not been able to generalize the methods presented in this paper, nor the inductive decomposition technique of Johnson [Joh04], to the general case. In light of Theorem 2, the sparsest open case is n = 2k + 3.
A strengthening of the concept of containing a Hamilton cycle is to contain the rth power of a Hamilton cycle. To this end, Katona [Kat05] conjectured that the vertices of K(n, k) can be ordered so that any r + 1 consecutive vertices for r := n/k − 2 are disjoint sets, which he proved for k = 2 using Walecki's theorem. It seems plausible that Katona's conjecture holds even for r := n/k − 2. Theorem 1 confirms this for the case n = 2k + 1 (where r = 1).