Abstract
We say that a Hamilton cycle \(C=(x_1,\ldots ,x_n)\) in a graph G is ksymmetric, if the mapping \(x_i\mapsto x_{i+n/k}\) for all \(i=1,\ldots ,n\), where indices are considered modulo n, is an automorphism of G. In other words, if we lay out the vertices \(x_1,\ldots ,x_n\) equidistantly on a circle and draw the edges of G as straight lines, then the drawing of G has kfold rotational symmetry, i.e., all information about the graph is compressed into a \(360^\circ /k\) wedge of the drawing. The maximum k for which there exists a ksymmetric Hamilton cycle in G is referred to as the Hamilton compression of G. We investigate the Hamilton compression of four different families of vertextransitive graphs, namely hypercubes, Johnson graphs, permutahedra and Cayley graphs of abelian groups. In several cases, we determine their Hamilton compression exactly, and in other cases, we provide close lower and upper bounds. The constructed cycles have a much higher compression than several classical Gray codes known from the literature. Our constructions also yield Gray codes for bitstrings, combinations and permutations that have few tracks and/or that are balanced.
Similar content being viewed by others
1 Introduction
A Hamilton cycle in a graph is a cycle that visits every vertex of the graph exactly once. This concept is named after the Irish mathematician and astronomer Sir William Rowan Hamilton (1805–1865), who invented the Icosian game, in which the objective is to find a Hamilton cycle along the edges of the dodecahedron. The figure above shows the dodecahedron with a Hamilton cycle on the circumference. Hamilton cycles have been studied intensively from various different angles, such as graph theory (necessary/sufficient conditions, packing, covering, etc. [19,20,21, 30]), optimization (shortest tours, approximation [1]), algorithms (complexity [18], exhaustive generation [36, 43]) and algebra (Cayley graphs [6, 27, 40, 51]). In this work, we introduce a new graph parameter that quantifies how symmetric a Hamilton cycle in a graph can be. For example, the cycle in the dodecahedron shown above is 2symmetric, as the drawing has 2fold (i.e., \(360^\circ /2=180^\circ \)) rotational symmetry.
1.1 Hamilton Cycles with Rotational Symmetry
Formally, let \(G=(V,E)\) be a graph with n vertices. We say that a Hamilton cycle \(C=(x_1,\ldots ,x_n)\) is ksymmetric if the mapping \(f:V\rightarrow V\) defined by \(x_i\mapsto x_{i+n/k}\) for all \(i=1,\ldots ,n\), where indices are considered modulo n, is an automorphism of G. In this case, we have
The idea is that the entire cycle C can be reconstructed from the path P, which contains only a 1/kfraction of all vertices, by repeatedly applying the automorphism f to it. In other words, if we lay out the vertices \(x_1,\ldots ,x_n\) equidistantly on a circle, and draw edges of G as straight lines, then we obtain a drawing of G with kfold rotational symmetry, i.e., f is a rotation by \(360^\circ /k\); see Fig. 1 for more examples. We refer to the maximum k for which the Hamilton cycle C of G is ksymmetric as the compression factor of C, and we denote it by \(\kappa (G,C)\).
1.2 Connection to LCF Notation
There is yet another interesting interpretation of the compression factor in terms of the LCF notation of a graph, which was introduced by Lederberg as a concise method to describe 3regular Hamiltonian graphs (such as the dodecahedron). It was later improved by Coxeter and Frucht (see [16]), and dubbed LCF notation, using the initials of the three inventors. The idea is to describe a 3regular Hamiltonian graph by considering one of its Hamilton cycles \(C=(x_1,\ldots ,x_n)\). Each vertex \(x_i\) has the neighbors \(x_{i1}\) and \(x_{i+1}\) (modulo n) in the graph, plus a third neighbor \(x_j\), which is \(d_i:=ji\) (modulo n) steps away from \(x_i\) along the cycle. The LCF sequence of G is the sequence \(d=(d_1,\ldots ,d_n)\), where each \(d_i\) is chosen so that \(n/2<d_i\le n/2\). Clearly, we also have \(d_i\notin \{1,0,+1\}\). Note that if C is ksymmetric, then the LCF sequence d of G is kperiodic, i.e., it has the form \(d=(d_1,\ldots ,d_{n/k})^k\), where the k in the exponent denotes kfold repetition; see Fig. 1. While LCF notation is only defined for 3regular graphs, we can easily extend it to arbitrary graphs with a Hamilton cycle \(C=(x_1,\ldots ,x_n)\), by considering a sequence of sets \(D=(D_1,\ldots ,D_n)\), where \(D_i\) is the set of distances to all neighbors of \(x_i\) along the cycle except \(x_{i1}\) and \(x_{i+1}\); see Fig. 2a+d. As before, if C is ksymmetric, then the corresponding sequence D is kperiodic, i.e., it has the form \(D=(D_1,\ldots ,D_{n/k})^k\). Frucht [16] writes:
‘What happens with the LCF notation if we replace one hamiltonian circuit by another one? The answer is: nearly everything can happen! Indeed the LCF notation for a graph can remain unaltered or it can change completely [...] In such cases we should choose of course the shortest of the existing LCF notations.’
This observation is illustrated in Fig. 1, which shows four different Hamilton cycles of the same graph G that have different LCF sequences and compression factors.
1.3 Hamilton Compression
Frucht’s suggestion is to search for a Hamilton cycle C in G whose compression factor \(\kappa (G,C)\) is as large as possible. Formally, for any graph G we define
and we refer to this quantity as the Hamilton compression of G. If G has no Hamilton cycle, then we define \(\kappa (G):=0\). While the maximization in (2) is simply over all Hamilton cycles in G, and the automorphisms arise as possible rotations of those cycles, this definition is somewhat impractical to work with. In our arguments, we rather consider all automorphisms of G, and then search for a Hamilton cycle that is ksymmetric under the chosen automorphism. Specifically, proving a lower bound of \(\kappa (G)\ge k\) amounts to finding an automorphism f of G and a ksymmetric Hamilton cycle under this f. To prove an upper bound of \(\kappa (G)<k\), we need to argue that there is no ksymmetric Hamilton cycle in G, for any choice of automorphism f.
By what we said in the beginning, the quantity \(\kappa (G)\) can be seen as a measure for the nicest (i.e., most symmetric) way of drawing the graph G on a circle. Thus, our paper contains many illustrations that convey the aesthetic appeal of this problem.
1.4 Easy Observations and Bounds
We start to collect a few basic observations about the quantity \(\kappa (G)\). Trivially, we have \(0\le \kappa (G)\le n\), where n is the number of vertices of G. The upper bound n can be improved to
where \({{\,\textrm{Aut}\,}}(G)\) is the automorphism group of G, and \({{\,\textrm{ord}\,}}(f)\) is the order of f. An immediate consequence of (1) is that all orbits of the automorphism f must have the same size n/k, and the path \(P=(x_1,\ldots ,x_{n/k})\) visits every orbit exactly once. This can be used to improve (3) further by restricting the maximization to automorphisms from \({{\,\textrm{Aut}\,}}(G)\) whose orbits all have the same size. Furthermore, as k must divide n, we obtain that \(\kappa (G)\in \{0,1,n\}\) for prime n.
Clearly, every Hamilton cycle of a graph G is 1symmetric, by taking the identity mapping \(f={{\,\textrm{id}\,}}\) as automorphism. Consequently, we have \(\kappa (G)\ge 1\) for any Hamiltonian graph. On the other hand, if G is Hamiltonian and highly symmetric, i.e., if it has a rich automorphism group, then intuitively G should have a large value of \(\kappa (G)\), i.e., it should admit highly symmetric Hamilton cycles. For example, for the cycle \(C_n\) on n vertices and the complete graph \(K_n\) on n vertices we have \(\kappa (C_n)=\kappa (K_n)=n\). More generally, note that \(\kappa (G)=n\) if and only if G is a special circulant graph, namely a Cayley graph of a cyclic group \({\mathbb {Z}}_n\) for which the generating set contains at least one element coprime with n.
1.5 Our Results
Vertextransitive graphs are a prime example of highly symmetric graphs. A graph is vertextransitive if for any two vertices there is an automorphism that maps the first vertex to the second one. In other words, the automorphism group of the graph acts transitively on the vertices. In this paper, we investigate the Hamilton compression \(\kappa (G)\) of four families of vertextransitive graphs G, namely hypercubes, Johnson graphs, permutahedra, and Cayley graphs of abelian groups. Note that in the following definitions and the rest of the paper we use the letter n to denote a graph parameter instead of the number of vertices used in Sects. 1.1–1.4. The ndimensional hypercube \(Q_n\), or ncube for short, has as vertices all bitstrings of length n, and an edge between any two strings that differ in a single bit; see Fig. 2a. The Johnson graph \(J_{n,k}\) has as vertices all bitstrings of length n with fixed Hamming weight k, and an edge between any two strings that differ in a transposition of a 0 and 1; see Fig. 2c. The npermutahedron \(\Pi _n\), has as vertices all permutations of \([n]:=\{1,\ldots ,n\}\), and an edge between any two permutations that differ in an adjacent transposition, i.e., a swap of two neighboring entries of the permutations in oneline notation; see Fig. 1. Cayley graphs of abelian groups will be introduced formally in Sect. 2.7; see Fig. 2d. Note that the hypercube is isomorphic to a Cayley graph of the abelian group \({\mathbb {Z}}_2^n\).
Hamilton cycles with various additional properties in the aforementioned families of graphs have been the subject of a long line of previous research under the name of combinatorial Gray codes [36, 43]. We will see that some classical constructions of such cycles have a nontrivial small compression factor, and we construct cycles with much higher compression factor that we show to be optimal or nearoptimal. Along the way, many interesting numbertheoretic and algebraic phenomena arise.
1.5.1 Hypercubes
One of the classical constructions of a Hamilton cycle in \(Q_n\) is the wellknown binary reflected Gray code (BRGC) [22]. This cycle in \(Q_n\) is defined inductively by \(\Gamma _0:=\varepsilon \) and for all \(n\ge 1\), where \(\varepsilon \) is the empty sequence and denotes the reversal of the sequence \(\Gamma _{n1}\); see Figs. 2a and 4a. In words, the cycle \(\Gamma _n\) is obtained by concatenating the vertices of \(\Gamma _{n1}\) prefixed by 0 with the vertices of \(\Gamma _{n1}\) in reverse order prefixed by 1. It turns out that the BRGC \(\Gamma _n\) has only compression \(\kappa (Q_n,\Gamma _n)=4\) for \(n\ge 2\), which is not optimal (Proposition 3.1). We construct new Hamilton cycles in \(Q_n\) with compression \(\kappa (Q_n)=2^{\lceil \log _2 n\rceil }\) for \(n\ge 3\), which is the optimal value (Theorem 3.8); see Fig. 4b. Note that \(n\le \kappa (Q_n)<2n\), in particular \(\kappa (Q_n)=\Theta (n)\), i.e., the optimal compression grows linearly with n.
1.5.2 Johnson Graphs and Relatives
Our definition of Hamilton compression is inspired by a variant of the wellknown middle levels problem raised by Knuth in Problem 56 in Section 7.2.1.3 of his book [29]. Let \(M_{2n+1}\) denote the subgraph of \(Q_{2n+1}\) induced by all bitstrings with Hamming weight n or \(n+1\). In other words, \(M_{2n+1}\) is the subgraph of the cover graph of the Boolean lattice of dimension \(2n+1\) induced by the middle two levels. There is a natural automorphism of \(M_{2n+1}\) all of whose orbits have the same size, namely cyclic leftshift of the bitstrings by one position. Knuth asked whether \(M_{2n+1}\) admits a \((2n+1)\)symmetric Hamilton cycle under this automorphism, and he rated this the hardest open problem in his book, with a difficulty rating of 49/50. Such cycles are shown in Figs. 2b and 5a for the graphs \(M_5\) and \(M_7\), respectively. Knuth’s problem was answered affirmatively in full generality in [34], which establishes the lower bound \(\kappa (M_{2n+1})\ge 2n+1\). We show that this is at most a factor of 2 away from optimality, by proving the upper bound \(\kappa (M_{2n+1})\le 2(2n+1)\) (Theorem 4.4). Interestingly, it seems that both bounds can be improved.
For the Johnson graph \(J_{n,k}\), we show that \(\kappa (J_{n,k})=n\) if n and k are coprime (Theorem 4.8). In the other cases we establish bounds for \(\kappa (J_{n,k})\) that are at most by a factor of 4 apart, and for large n, we obtain \(\kappa (J_{n,k})=(1o(1))n\) for \(n\ne 2k\).
1.5.3 Permutahedra
Another classical Gray code is produced by the Steinhaus–Johnson–Trotter (SJT) algorithm, which generates permutations by adjacent transpositions. This algorithm computes a Hamilton cycle in \(\Pi _n\), which can be described inductively as follows: \(\Lambda _1:=1\) and for all \(n\ge 2\) the cycle \(\Lambda _n\) is obtained from \(\Lambda _{n1}\) by replacing each permutation of length \(n1\) by the n permutations given by inserting n in every possible position, alternatingly from right to left or vice versa; see Figs. 1a and 7a. It turns out that the SJT cycle \(\Lambda _n\) has only compression \(\kappa (\Pi _n,\Lambda _n)=3\) for \(n\ge 5\), which is not optimal (Proposition 5.1). We construct new Hamilton cycles in \(\Pi _n\) whose compression is at most a factor of 2 away from the optimum compression \(\kappa (\Pi _n)=e^{(1+o(1))\sqrt{n\ln n}}\) (Theorem 5.6); see Fig. 7b+c. The growth of the optimum compression is determined by Landau’s function, and it is mildly exponential. Moreover, we achieve the optimal compression in infinitely many cases, in particular for the following values of \(n\le 100\): \(n=3,4,5,15,22,46,49,51,52,53,55,68,69,72,73,74,75,80,82,85,87,88,89,91,92,93,96,97,99,100\).
1.5.4 Abelian Cayley Graphs
A classical folklore result asserts that every Cayley graph of an abelian group has a Hamilton cycle. The ChenQuimpo theorem [7] asserts that in fact much stronger Hamiltonicity properties hold. It is thus natural to ask whether Cayley graphs of abelian groups have highly symmetric Hamilton cycles. It turns out that not all abelian Cayley graphs admit a Hamilton cycle with nontrivial compression. In particular, we show that toroidal grids \({\mathbb {Z}}_p\times {\mathbb {Z}}_q\) for two distinct odd primes p, q have only compression 1 (Theorem 6.4 (i)). In contrast to that, we prove that if the order of the abelian group is even or divisible by a square greater than 1, then the Cayley graph admits a Hamilton cycle with compression at least 2 (Theorems 6.4 (ii) and 6.6).
1.6 Related Problems
We proceed to discuss some applications of our results to closely related problems.
1.6.1 Lovász’ Conjecture
A wellknown question of Lovász’ [32] asks whether there are infinitely many vertextransitive graphs that do not admit a Hamilton cycle. So far, only five such graphs are known, namely \(K_2\), the Petersen graph, the Coxeter graph, and the graphs obtained from the latter two by replacing every vertex by a triangle. Vertextransitive graphs have a lot of automorphisms, and we may take the quantity \(\kappa (G)\) as a measure of how strongly G is Hamiltonian. In particular, Lovász’ question may be rephrased as ‘Are there infinitely many vertextransitive graphs G with \(\kappa (G)=0\)?’ More generally, we may ask: ‘Are there infinitely many vertextransitive graphs G with \(\kappa (G)=k\), for each fixed integer k?’ We may ask the same question more restrictively for Cayley graphs or nonCayley graphs. From our results mentioned in Sect. 1.5.4, we obtain an infinite family of Cayley graphs G with \(\kappa (G)=1\). In a followup work to this paper, Kutnar, Marušič, and Razafimahatratra [28] answered this question affirmatively for Cayley graphs and any fixed integer \(k\ge 2\), and also for nonCayley graphs and \(k=1\).
Computer experiments show that the smallest vertextransitive nonCayley graphs G with \(\kappa (G)=1\) have 26 vertices, and one of them is shown in Fig. 3 (its ID in the House of Graphs database is 36346).
The path P in (1) is a Hamilton path in the quotient graph G/f obtained by collapsing each orbit of f into a single vertex. The idea of constructing a Hamilton cycle in G by constructing a Hamilton cycle in the much smaller graph G/f that is then ‘lifted’ to the full graph is well known in the literature, and has been used to solve some special cases of Lovász’ problem affirmatively; see e.g. [2, 9, 27, 34, 45]. It is particularly useful for computer searches, as it reduces the search space dramatically.
1.6.2 ttrack and Balanced Gray Codes
We say that a sequence C of strings of length n consists of t tracks if in the \(C\times n\) matrix corresponding to C there are t columns such that every other column is a cyclically shifted copy of one of these columns. For example, the Gray code shown in Fig. 4c has two tracks, each consisting of four cyclically shifted columns of bits. This property is relevant for applications, as it saves hardware when implementing Graycoded rotary encoders. Instead of using n tracks and n reading heads aligned at the same angle (each reading one track), one can use only t tracks, and place some of the n reading heads at appropriately rotated positions.
Hiltgen, Paterson, and Brandestini [24] showed that the length of any 1track cycle in \(Q_n\) must be a multiple of 2n. In particular, such a cycle cannot be a Hamilton cycle unless n is a power of 2. For the case \(n=2^r\), \(r\ge 3\), Etzion and Paterson [13] showed that there is 1track cycle of length \(2^n2n\), and Schwartz and Etzion [44] subsequently showed that the length \(2^n2n\) is best possible. Taken together, these results show that there is no 1track Hamilton cycle in \(Q_n\) for any \(n\ge 3\).
We complement this negative result by constructing a 2track Hamilton cycle in \(Q_n\), for every n that is a sum of two powers of 2 (Theorem 3.9); see Fig. 4c. More generally, we obtain ttrack Hamilton cycles in \(Q_n\) for every n that is a sum of \(t\ge 2\) powers of 2 (Theorem 3.10). In particular, \(Q_n\) admits a Hamilton cycle with at most logarithmically many tracks for all n.
From our construction in the Johnson graph \(J_{n,k}\) when n and k are coprime, we obtain 1track Hamilton cycles that are also balanced (Theorem 4.5), i.e., each bit is flipped equally often (cf. [4, 15]).
We also construct a 1track Hamilton cycle in \(\Pi _n^+\), for every odd n, where \(\Pi _n^+\) is obtained from \(\Pi _n\) by adding edges that correspond to transpositions of the first and last entry of a permutation (i.e., cyclically adjacent transpositions). This cycle has the additional property that every transposition appears equally often. In other words, we obtain a balanced 1track Gray code for permutations of odd length that uses cyclically adjacent transpositions (Theorem 5.7).
1.7 Outline of This Paper
In Sect. 2, we provide definitions and auxiliary results that will be used later in the paper. In Sects. 3–6, we prove our results about the Hamilton compression of hypercubes, Johnson graphs and relatives, permutahedra, and abelian Cayley graphs, in that order. The Hamilton compression \(\kappa (G)\) is a newly introduced graph parameter, so many natural followup questions arise. We collect some of those open problems in Sect. 7. The proofs of some technical lemmas that interfere with the main exposition are deferred to the appendix.
2 Preliminaries
We collect definitions, preliminary observations and various results from the literature that we will use in our proofs later.
2.1 Graphs, Groups and Permutations
For a graph G, we write V(G) and E(G) for the vertex set and edge set of G, respectively. For a sequence \(\Gamma \), we write for the reversed sequence.
All groups considered in this paper are finite. For standard terminology regarding groups, we refer to the textbook [8]. We denote the group operation of a general group G multiplicatively, and we write e for its identity element. On the other hand, we denote abelian groups additively, writing 0 for the identity element and for \(k \in \mathbb {N}, g\in G\) we define \(kg:=\underbrace{g+\cdots +g}_{k \text { times}}\).
Let G be a finite group acting on a set X. For \(f \in G\) let \(\langle f \rangle \) denote the (cyclic) subgroup of G generated by f and let \({{\,\textrm{ord}\,}}(f):=\langle f \rangle \) denote the order of f. The orbit of an element \(x\in X\) under f is denoted by \(\langle x \rangle _f:=\{f^i(x) \mid i=0,1,\ldots \}\) where the index f may be omitted whenever it is clear from the context. We write O(f) for the set of all orbits of f.
Abelian groups are direct sums of cyclic groups \({\mathbb {Z}}_n\), which is captured by the following wellknown structure theorem.
Theorem 2.1
[8, Theorem 5.2] For any finite abelian group G, there are primes \(p_1,\ldots , p_\ell \ge 2\) and integers \(e_1,\ldots ,e_\ell \ge 1\) such that \(G \cong {\mathbb {Z}}_{p_1^{e_1}} \oplus \cdots \oplus {\mathbb {Z}}_{p_\ell ^{e_\ell }}\).
For any ordered set X let \(S_X\) denote the symmetry group on X. For the set \([n]=\{1,\ldots ,n\}\) we write \(S_n:=S_{[n]}\). Permutations \(x\in S_X\), \(X=\{i_1<\cdots <i_n\}\), are denoted in oneline notation \(x=x_{i_1}\cdots x_{i_n}\) without commas and parentheses, and in cycle notation with commas and parentheses, for example \(342165=(1,3,2,4)(5,6)\in S_6\).
The parity of a permutation \(x=x_{i_1}\cdots x_{i_n}\) is the number of its inversions, i.e., the number of pairs \((x_a,x_b)\) with \(a<b\) and \(x_a>x_b\). Equivalently, the parity of x is given by the parity of the number of inversions whose product is x. As odd cycles are products of an even number of inversions, the parity is also equal to the parity of the number of even cycles in x. A permutation is even or odd, if its parity is even or odd, respectively.
2.2 Hypercubes and Cartesian Products
Given two graphs G and H, the Cartesian product \(G\Box H\) has the vertex set \(V(G)\times V(H)\) and edges between pairs (u, v) and \((u',v')\) if and only if \(u=u'\) and \(vv'\in E(H)\), or \(uu'\in E(G)\) and \(v=v'\).
We define a ‘zigzag’ path \(P\sqcup Q\) in a Cartesian product \(G\Box H\) as follows. For a path \(P=(u_1,\ldots ,u_r)\) in G and a vertex v in H, we define
Furthermore, for a path \(Q=(v_1,\ldots ,v_s)\) in H, where s is even, we define
Clearly, the path \(P\sqcup Q\) is a subgraph of \(G\Box H\). Furthermore, it starts at \((u_1,v_1)\), ends at \((u_1,v_s)\), and it visits all vertices of \(P\Box Q\).
The hypercube \(Q_{n+m}\) defined in Sect. 1.5 can be viewed as the Cartesian product \(Q_n\Box Q_m\).
It is well known that for every automorphism f of \(Q_n\), there is a unique \(\pi \in S_n\) and a unique \(z\in {\mathbb {Z}}_2^n\) such that
for every \(x\in \{0,1\}^n\), where \(+\) is the addition from \({\mathbb {Z}}_2^n\) (bitwise XOR). In fact, the automorphism group of the hypercube is \({{\,\textrm{Aut}\,}}(Q_n)\cong S_n \ltimes {\mathbb {Z}}_2^n\), the hyperoctahedral group (\(\ltimes \) denotes the inner semidirect product).
We will also need the following result about the automorphism group of certain Cartesian products of graphs. This result is a special case of Theorem 6.13 from [23].
Lemma 2.2
Let \(G_1,\ldots ,G_\ell \) be graphs such that \(V(G_1),\ldots , V(G_\ell )\) are all distinct primes, then , where the multiplication on the righthand side denotes the direct product.
2.3 Johnson Graphs and Relatives
For integers \(n>k>0\), an (n, k)combination is a bitstring of length n with Hamming weight k. Recall that the Johnson graph \(J_{n,k}\) has as vertices all (n, k)combinations, and an edge between any two strings that differ in a transposition of a 0 and 1. We defined the middle levels graph \(M_{2n+1}\) as the subgraph of \(Q_{2n+1}\) induced by all bitstrings with Hamming weight n or \(n+1\), so these are all \((2n+1,n)\)combinations and \((2n+1,n+1)\)combinations.
If \(n\ne 2k\), the automorphism group of \(J_{n,k}\) is the symmetric group \({{\,\textrm{Aut}\,}}(J_{n,k})\cong S_n\); see [25, 41]. Every automorphism \(f=\pi \) of \(J_{n,k}\) permutes the entries of a vertex x, i.e., \(f(x_1\cdots x_n)=x_{\pi (1)}\ldots x_{\pi (n)}\).
If \(n=2k\), the automorphism group of \(J_{n,k}\) is \({{\,\textrm{Aut}\,}}(J_{n,k})\cong S_n\times {\mathbb {Z}}_2\) with \({\mathbb {Z}}_2\cong \{{{\,\textrm{id}\,}},{{\,\textrm{cpl}\,}}\}\), where \({{\,\textrm{id}\,}}\) is the identity map and \({{\,\textrm{cpl}\,}}\) complements all bits; see [17, 25]. Every automorphism of \(J_{n,k}\) is a pair \(f=(\pi ,\alpha )\) with \(\pi \in S_n\) and \(\alpha \in \{{{\,\textrm{id}\,}},{{\,\textrm{cpl}\,}}\}\), and f acts on a vertex x by \(f(x_1\cdots x_n)=\alpha (x_{\pi (1)}\cdots x_{\pi (n)})\).
The automorphism group of the middle levels graph \(M_{2n+1}\) is also \({{\,\textrm{Aut}\,}}(M_{2n+1})\cong S_{2n+1}\times {\mathbb {Z}}_2\) with \({\mathbb {Z}}_2\cong \{{{\,\textrm{id}\,}},{{\,\textrm{cpl}\,}}\}\); see [41].
To construct symmetric Hamilton cycles in Johnson graphs, we will use the automorphism \(f=(\pi ,{{\,\textrm{id}\,}})\) that cyclically shifts all bits to the left by one position (no complementation is applied). Formally, f maps \(x=x_1\cdots x_n\) to \(f(x)=x_2 x_3\cdots x_n x_1\). The orbits of f are known as necklaces. Note that if n and k are coprime, then every necklace has the same size n.
We will use the following result due to Wang and Savage [52] (see also [49]).
Theorem 2.3
[52] For all \(n1>k>1\), there is a path in \(J_{n,k}\) from \(1^k0^{nk}\) to \(1^{k1}010^{nk1}\) that visits every necklace exactly once.
Note that the end vertices of this path are adjacent, so the path can be completed to a cycle.
2.4 Permutahedra
As mentioned before, an adjacent transposition in \(S_n\) is a permutation that flips two adjacent positions, in cycle notation it is \(t_i:=(i,i+1)\) for some \(1\le i <n\). Two permutations \(x,y \in S_n\) differ by an adjacent transposition if \(x=t_iy\) (equivalently \(y=t_ix\)) for some \(1\le i<n\) where the composed permutations are applied from left to right, i.e., \(x_j=y_{t_i(j)}\); see Fig. 1. The permutahedron of order n is the graph \(\Pi _n\) with vertex set \(S_n\) and edge set \(\{\{x,t_ix\} \mid x\in S_n, 1\le i <n\}\); that is, the vertices are all permutations of [n] and the edges are between any two permutations that differ by an adjacent transposition. Equivalently, \(\Pi _n\) is the Cayley graph of \(S_n\) generated by adjacent transpositions. Note that our definition of \(\Pi _n\) is equivalent to another definition of the permutahedron sometimes used in geometry where edges connect permutations that differ in a transposition of adjacent values (consider the inverse permutations). Our definition of \(\Pi _n\) extends straightforwardly to the symmetric group \(S_X\) on any ordered ground set X, and we write \(\Pi _X\) for this graph with vertex set \(S_X\) and edges between pairs of permutations on X that differ by an adjacent transposition.
Clearly, the graph \(\Pi _n\) is bipartite with partition classes given by the parity of permutations, into sets of equal size for all \(n\ge 2\). Tchuente established the following strong Hamiltonicity property of \(\Pi _n\).
Theorem 2.4
[47] For any \(n\ge 4\) or \(n=2\), the permutahedron \(\Pi _n\) has a Hamilton path between any two permutations of opposite parity (i.e., it is Hamiltonlaceable). For \(n=3\), it has a Hamilton path between any two permutations that differ by an adjacent transposition.
It is known [14] that \({{\,\textrm{Aut}\,}}(\Pi _n)\cong {\mathbb {Z}}_2\ltimes S_n\) with \({\mathbb {Z}}_2\cong \{{{\,\textrm{id}\,}},{{\,\textrm{rev}\,}}\}\) where \({{\,\textrm{id}\,}}\) is the identity permutation and \({{\,\textrm{rev}\,}}(x_1\cdots x_n):=x_n\cdots x_1\) is the reversal permutation. So any \(f \in {{\,\textrm{Aut}\,}}(\Pi _n)\) can be uniquely written as a pair \(f=(\alpha ,\pi )\) of \(\alpha \in \{{{\,\textrm{id}\,}},{{\,\textrm{rev}\,}}\}\) and \(\pi \in S_n\). However, for our purposes we let \(\alpha \) act on positions and \(\pi \) on values, formally
that is, \((\alpha ,\pi )(x)=\alpha x\pi \) under composition (applied in the order from left to right) where \(\alpha \) is the identity or the reversal of positions and \(\pi \) is a permutation of values. The automorphism group \({{\,\textrm{Aut}\,}}(\Pi _n)\) with this action is therefore a direct product of \({\mathbb {Z}}_2\) and \(S_n\) since
using the commutativity of \({\mathbb {Z}}_2\).
2.5 Multiset Permutations
A composition of an integer \(n\ge 1\) is a sequence \(\textbf{a}=(a_1,\cdots ,a_m)\) of positive integers with \(\sum _{i=1}^m a_i=n\). The partition of the set [n] associated to \(\textbf{a}\) is \(A_1\cup \cdots \cup A_m=[n]\) with \(A_i=a_i\) and \(x<y\) if \(x\in A_i\) and \(y\in A_j\) with \(i<j\). For example, \(A_1=\{1,2,3\}\) and \(A_2=\{4,5\}\) for \(\textbf{a}=(3,2)\). A multiset permutation with frequencies \(\textbf{a}\), or \(\textbf{a}\)permutation for short, is a sequence \(u=u_1\cdots u_n\) of values from [m] with exactly \(a_i\) occurrences of the value i for all \(1\le i \le m\). The set of all \(\textbf{a}\)permutations is denoted by \(\left( {\begin{array}{c}[n]\\ \textbf{a}\end{array}}\right) \), their number is the multinomial coefficient \(\left( {\begin{array}{c}n\\ a_1,\ldots ,a_m\end{array}}\right) \). The lexicographically smallest \(\textbf{a}\)permutation is called the identity \(\textbf{a}\)permutation and is denoted by \({{\,\textrm{id}\,}}(\textbf{a})\). For example, for \(\textbf{a}=(3,2)\) we have \({{\,\textrm{id}\,}}(\textbf{a})=11122\). Let \(u=u_1\cdots u_n\) be an \(\textbf{a}\)permutation and for each \(1\le i \le m\), let \(x^i=x^i_1\cdots x^i_{a_i}\) be a permutation of \(A_i\), where the sets \(A_i\) form the partition of [n] associated to \(\textbf{a}\). The mix of u with \(x^1,\ldots ,x^m\) is the permutation of [n] denoted by \(u \otimes (x^1, \ldots , x^m)\) obtained from u by replacing the jth occurrence of the value i with \(x^i_j\). For example, \(12211 \otimes (213,54)=25413\).
Let \(G(\textbf{a})\) denote the graph with vertex set \(\left( {\begin{array}{c}[n]\\ \textbf{a}\end{array}}\right) \) and edges between any two \(\textbf{a}\)permutations that differ by an adjacent transposition of distinct values. We will use the following two results on Hamilton paths and cycles in \(G(\textbf{a})\).
Theorem 2.5
[5, 12, 42]. Let \(\textbf{a}=(a_1,a_2)\) be a composition of n such that both \(a_1\) and \(a_2\) are odd. Then, the graph \(G(\textbf{a})\) has a Hamilton path between \(1^{a_1}2^{a_2}\) and \(2^{a_2}1^{a_1}\).
Note that the vertices \(1^{a_1}2^{a_2}\) and \(2^{a_2}1^{a_1}\) mentioned in Theorem 2.5 have degree 1 in \(G(\textbf{a})\), so there is no Hamilton cycle in this case. However, for \(\textbf{a}\)permutations on at least three distinct values with at least two odd multiplicities \(a_i\), Stachowiak [46] proved there is a Hamilton cycle in \(G(\textbf{a})\), apart from one exception.
Theorem 2.6
[46]. Let \(\textbf{a}=(a_1,\ldots ,a_m)\), \(m\ge 3\), be a composition of n such that at least two of the \(a_i\) are odd. Then, \(G(\textbf{a})\) has a Hamilton cycle, unless \(m=3\) and n is even and \(\{a_1,a_2,a_3\}=\{n2,1,1\}\).
2.6 Landau’s Function
A partition of an integer \(n\ge 1\) is a sequence \(\textbf{a}=(a_1,\ldots ,a_m)\) of positive integers with \(\sum _{i=1}^m a_i=n\) and \(a_1\ge a_2\ge \cdots \ge a_m\). The maximal order of an element of \(S_n\) is called Landau’s function [31], and we denote it by \(\lambda (n)\). It is determined by
where the maximum ranges over all partitions of n, and \({{\,\textrm{lcm}\,}}(a_1,\ldots ,a_m)\) denotes the least common multiple of \(a_1,\ldots ,a_m\). The first values of \(\lambda (n)\) are shown in Table 1 (see also the appendix); this is OEIS sequence A000793 [39].
Concerning the asymptotic growth of \(\lambda (n)\), Landau showed that
For our arguments, we will need two variants of Landau’s function that we define in the following. For any partition \((a_1,\ldots ,a_m)\) write \(e(a_1,\ldots ,a_m)\) for the number of even entries of the partition. We define
The maximizations in (9) are over all integer partitions of n that have 0 even parts (i.e., only odd parts), or exactly \(2,4,6,\ldots \) even parts, respectively. The only difference of these definitions to (7) are the additional requirements about the parity of the \(a_i\). The sequences \((\lambda _0(n))_{n\ge 1}\) and \((\lambda _2(n))_{n\ge 1}\) appear not to have been studied before.
The first few values of \(\lambda _0(n)\) and \(\lambda _2(n)\) are shown in Table 1, comparing them with the corresponding values for \(\lambda (n)\). We clearly have \(\lambda _0(n)\le \lambda (n)\) for all \(n\ge 1\), with equality e.g. for \(n=1,3,8,15\). Similarly, we have \(\lambda _2(n)\le \lambda (n)\) for all \(n\ge 1\), with equality e.g. for \(n=21,22,45,46,51,52,55,56,74,75,81,82,87,88,91,92,99,100\). On the other hand, \(\lambda _0(n)\) can be much smaller than \(\lambda (n)\). For example, for \(n=19,20\) we have \(\lambda (n)/\lambda _0(n)=28/11=2.54\ldots \), for \(n=30,31\) we have \(\lambda (n)/\lambda _0(n)=44/13=3.38\ldots \) and for \(n=53,54\) we have \(\lambda (n)/\lambda _0(n)=72/17=4.23\ldots \). One can also see that \(\lambda _0(n)\le \alpha (n)\le \lambda (n)\), where \(\alpha (n)\) is the maximal order of an element of the alternating group \(A_n\) (OEIS sequence A051593). More numerical experiments about the Landau function and its variants are reported in the appendix.
Lemma 2.7
The functions \(\lambda (n)\), \(\lambda _0(n)\) and \(\lambda _2(n)\) have the following properties:

(i)
The maximum in (7) is attained for a partition of n into powers of distinct primes and 1s.

(ii)
The maximum in (9a) is attained for a partition of n into powers of distinct odd primes and 1s.

(iii)
The maximum in (9b) is attained for a partition of n into powers of distinct odd primes, a positive power of 2, a 2 and 1s. For \(n\ge 12\), this partition has at least \(m\ge 4\) parts.

(iv)
We have \(\max \{\lambda _0(n),\lambda _2(n)\}\ge \lambda (n)/2\).

(v)
We have \(\lambda (n)/\lambda _0(n)\ge 4\) for \(n\ge 739\) and \(\lim _{n\rightarrow \infty }\lambda (n)/\lambda _0(n)=+\infty \), and we have \(\lambda (n)/\lambda _2(n)\le 2\) for \(n\ge 18\). Consequently, we have \(2\lambda _0(n)\le \lambda _2(n)\) for \(n\ge 739\) and \(\lim _{n\rightarrow \infty }2\lambda _0(n)/\lambda _2(n)=0\).

(vi)
There are arbitrarily long intervals with \(\lambda (n)=\lambda _2(n)\).
For example, \(\lambda (11)=30\) is attained by the partition (6, 5) but also by the partition (5, 3, 2, 1). Similarly, \(\lambda _2(10)=12\) is attained by the partition (6, 4) but also by the partition (4, 3, 2, 1). The proof of Lemma 2.7 is deferred to the appendix.
2.7 Cayley Graphs
For a group G and a generating set \(S\subseteq G\), we define the Cayley graph \(\Gamma (G,S)\) as the graph with vertex set G and undirected edges \(\{x,y\}\) for all \(x,y\in G\) and \(s\in S\) with \(y=xs\). As the edges are undirected, the graphs \(\Gamma (G,S)\) and \(\Gamma (G,S\cup S^{1})\) are the same, where \(S^{1}:=\{s^{1}\mid s\in S\}\), so we can assume w.l.o.g. that if \(s\in S\), then also \(s^{1}\in S\). If \(P=(x_1,\ldots ,x_n)\) is a path in the Cayley graph \(\Gamma (G,S)\), then for any \(g\in G\) the sequence \(g P:=(g x_1,\ldots ,g x_n)\) is also a path.
It has long been conjectured that all Cayley graphs admit a Hamilton cycle, but despite considerable effort and many partial results (see the surveys [6, 27, 40, 51]), this problem is still very much open in general. On the other hand, for Cayley graphs of abelian groups several results are known. A classical folklore result (see e.g. [51, Sec. 3]) states that every Cayley graph of an abelian group has a Hamilton cycle.
Theorem 2.8
Let G be an abelian group with \(G\ge 3\) and \(S\subseteq G\) a generating set. Then the Cayley graph \(\Gamma (G,S)\) has a Hamilton cycle.
In fact, this result can be generalized considerably using the following stronger notions of Hamiltonicity. A graph is called Hamiltonconnected if for any two vertices there is a Hamilton path starting and ending at these two vertices. Similarly, a bipartite graph is called Hamiltonlaceable if for any two vertices in different partition classes there is a Hamilton path joining these two vertices. The following theorem of Chen and Quimpo asserts that Cayley graphs of abelian groups possess the strongest possible of these two Hamiltonicity notions.
Theorem 2.9
[7]. Let G be an abelian group and \(S\subseteq G\) a generating set. If the Cayley graph \(\Gamma =\Gamma (G,S)\) has minimum degree at least 3, then we have the following:

(i)
If \(\Gamma \) is bipartite, then \(\Gamma \) is Hamiltonlaceable.

(ii)
If \(\Gamma \) is not bipartite, then \(\Gamma \) is Hamiltonconnected.
We will also need the fact that Cayley graphs are highly connected.
Lemma 2.10
[50, Theorem 3]. If \(\Gamma \) is a connected dregular Cayley graph, then the vertexconnectivity of \(\Gamma \) is at least 2d/3.
3 Hypercubes
In this section, we consider the family of hypercubes \(Q_n\) introduced in Sect. 1.5 (recall also Sect. 2.2). We first show that the binary reflected Gray code has constant compression 4. We then establish a general linear (in n) upper bound for \(\kappa (Q_n)\), and a matching lower bound construction, i.e., an automorphism and a Hamilton cycle in \(Q_n\) whose compression equals this upper bound. Lastly, we apply our constructions to derive ttrack Hamilton cycles in \(Q_n\).
3.1 The Binary Reflected Gray Code (BRGC)
Recall the definition of the BRGC \(\Gamma _n\) given in Sect. 1.5.1.
Proposition 3.1
The BRGC \(\Gamma _n\) has compression \(\kappa (Q_n,\Gamma _n)=4\) for \(n\ge 2\).
The BRGC \(\Gamma _n\) is illustrated in Figs. 2a and 4a for \(n=4\) and \(n=8\), respectively, and those two pictures indeed have 4fold rotational symmetry.
Proof
For \(n=2\) the graph \(Q_2\) is a 4cycle, so the claim is trivially true. For the rest of the proof, we assume that \(n\ge 3\). Unrolling the inductive definition two more times gives
and
From (11), we see that \(\Gamma _n\) has compression at least 4 under the automorphism \(x_1 x_2 x_3 \mapsto x_2 \overline{x_1} \overline{x_3}\) (the bits \(x_4,\ldots ,x_n\) are not modified), which maps each line in (11) to the next line.
To show that the compression is at most 4, let \(x_1,\ldots ,x_N\), \(N:=2^n\), be the sequence of bitstrings of \(\Gamma _n\). From (10) we see that \(x_i\) differs from \(x_{i+N/2}\) by complementing the first two bits, for all \(i=1,\ldots ,N\), where indices are considered modulo N. It follows that if \(x_i\) and \(x_{i+1}\) have the same first two bits, then \(S_i:=(x_i,x_{i+1},x_{i+N/2},x_{i+1+N/2})\) is not a 4cycle. On the other hand, if \(x_i\) and \(x_{i+1}\) differ in one of the first two bits, then \(S_i\) is a 4cycle. From (10) we see that this happens precisely for \(i=N/4,2N/4,3N/4,N\), proving that the compression is at most 4. \(\square \)
3.2 An Upper Bound
Recall from Sect. 2.2 that \({{\,\textrm{Aut}\,}}(Q_n)\cong S_n \ltimes {\mathbb {Z}}_2^n\), so from (3) we obtain \(\kappa (Q_n)\le 2\lambda (n)\), where \(\lambda (n)\) is Landau’s function. We now improve this upper bound drastically to a function that is linear in n (cf. (8)).
Lemma 3.2
Let \(n\ge 3\). If \(Q_n\) has a ksymmetric Hamilton cycle, then \(k=2^i<2n\) for some i.
Proof
Consider an automorphism f of \(Q_n\) and a path P such that
is a ksymmetric Hamilton cycle in \(Q_n\) for some k (recall (1)). It follows that k must divide \(2^n\), i.e., we have \(k=2^i\) for some \(i\le n\). Let \(\pi \in S_n\) and \(z\in {\mathbb {Z}}_2^n\) be such that (5) holds. Suppose that \(\pi \) is a product of cycles of lengths \(a_1\ge \cdots \ge a_m\), and note that \({{\,\textrm{ord}\,}}(\pi )={{\,\textrm{lcm}\,}}(a_1,\ldots ,a_m)\). As \(\pi ^k={{\,\textrm{id}\,}}\), each \(a_j\) divides \(k=2^i\), implying that \({{\,\textrm{ord}\,}}(\pi )={{\,\textrm{lcm}\,}}(a_1,\ldots ,a_m)=a_1\le n\). We conclude that \({{\,\textrm{ord}\,}}(f)=k=2^i\le 2{{\,\textrm{ord}\,}}(\pi )\le 2n\), in particular \(i<n\) for \(n\ge 3\).
To complete the proof, it remains to rule out the possibility \(k=2n\). In this case, \(\pi \) has just a single cycle of length \(a_1=n=2^{i1}>2\). As \(P=2^{ni}\) is even (because of \(i<n\)), the first and last vertex of P have opposite parity. Observe that z must have odd parity, otherwise we would have \(f^n={{\,\textrm{id}\,}}\) (contradicting \({{\,\textrm{ord}\,}}(f)=k=2n\)), implying that the first vertices of P and f(P) have opposite parity. Combining these observations shows that the last vertex of P and the first vertex of f(P) have the same parity, so they cannot be adjacent, contradicting (12). We conclude that \(k=2^i<2n\), which completes the proof. \(\square \)
3.3 An Optimal Construction
We consider the automorphism
of \(Q_n\), i.e., g cyclically shifts all bits to the left by one position and then complements the last bit. The mapping g is an auxiliary automorphism and the automorphism f that determines \(\kappa (Q_n)\) will be defined below in Lemma 3.6. Clearly \(g^{2n}={{\,\textrm{id}\,}}\), so all orbits have size at most 2n. We will see that if n is a power of 2, i.e., \(n=2^r\) for some \(r\ge 1\), then all orbits have the same size 2n.
For every \(n=2^r\), \(r\ge 1\), we inductively define a set \(R_n\) of vertices of \(Q_n\) that are representatives of orbits of g, i.e., from every orbit precisely one vertex is in \(R_n\). First, we define a function that interleaves the bits of two bitstrings \(u=u_1\cdots u_n\) and \(v=v_1\cdots v_n\) of equal length by
i.e., the result is a bitstring of length 2n that alternately contains the bits of u and v, starting by the first bit of u. Observe that
for every \(0\le i <2n\) and \(u,v\in \{0,1\}^n\). For \(n=2^r\), \(r\ge 1\), we define the set \(R_n\) inductively by
For example, we have \(R_4=\{0000,0010\}\) and
\(u=0000\)  \(u=0010\)  

\(v=0000\)  \(v=0010\)  \(v=0000\)  \(v=0010\)  
\(R_8=\{\)  00000000,  00000100,  00001000,  00001100,  \(k=0\)  
00000010,  00000110,  00100010,  00100110,  \(k=1\)  
00001010,  00001110,  10001010,  10001110,  \(k=2\)  
00101010,  00101110,  00101000,  00101100  \(\}.\)  \(k=3\) 
Lemma 3.3
For every \(n=2^r\), \(r\ge 1\), \(0\le j <2n\), and \(x,y\in R_n\), we have \(g^{j}(x) \ne y\) unless \(x=y\) and \(j=0\).
Proof
We proceed by induction on r. The statement holds trivially for \(r=1\). For the induction step from r to \(r+1\) let \(0\le j <4n\) and \(x,y \in R_{2n}\). By (16b), \(x=g^k(u) \circ v\) and \(y=g^{k'}(u')\circ v'\) for some \(u,v,u',v' \in R_{n}\) and \(0\le k,k' < n\). We distinguish two cases based on the parity of j.
If \(j=2i\) where \(0\le i <2n\) then from (15a), we have
which equals \(y=g^{k'}(u')\circ v'\) only if
By the induction hypothesis, this holds only if
equivalently, \(x=y\) and \(j=0\).
Similarly, if \(j=2i+1\) where \(0\le i <2n\) then from (15b) we have
which equals \(y=g^{k'}(u')\circ v'\) only if
By the induction hypothesis, this holds only if
However, it cannot be that \(k+k'+1=0 \bmod 2n\) since \(0\le k,k'<n\). So in this case, \(g^j(x)\ne y\). \(\square \)
Lemma 3.4
For every \(n=2^r\), \(r\ge 1\), all orbits of g have the same size 2n and \(R_n\) is a set of representatives for all \({2^n}/(2n)=2^{nr1}\) orbits.
Proof
Lemma 3.3 shows that no two elements of \(R_n\) are in the same orbit, and that every such orbit has size 2n. It remains to argue that there is no other orbit, simply because \(R_n\cdot 2n=2^n\), which is equivalent to \(R_n=2^{nr1}\). Indeed from (16) we have \(R_2=1=2^{nr1}\) for \(r=1\) and
by induction for all \(r\ge 1\). \(\square \)
Lemma 3.5
For every \(n=2^r\), \(r\ge 2\), there is a path \(P_n\) in \(Q_n\) that visits all vertices \(R_n\) and that starts in \(0^n\) and ends in \(0^{n2}10\).
Proof
For \(r=2\), we set \(P_4:=(0000,0010)\). It is straightforward to verify from (16) that \(0^n,0^{n2}10 \in R_n\). Note that \(g^2\) is an automorphism of \(Q_n\) with orbits of size n, and \(0^{n2}10\) is adjacent in \(Q_n\) to \(g^2(0^n)=0^{n2}11\). For the induction step \(r\rightarrow r+1\), we construct the path \(P_{2n}\) recursively from \(P_n\). Specifically, by the observations from before
are vertexdisjoint paths in \(Q_n\) that start in \(0^{n}\) and \(0^{n1}1\), respectively. Consider the path
in \(Q_{2n}=Q_n\Box Q_n\), where \(\sqcup \) is defined in (4) and \(h(u,v):=u\circ v\), for \(u,v\in \{0,1\}^n\), is the interleaving function defined in (14), applied to all vertices along the paths.
As \(P_n=R_n=2^{nr1}\) is even and the first vertices of \(P'\) and \(P''\) differ in a single bit, the transition between the two halves of (18) flips a single bit, as desired. Specifically, \(P'\sqcup P_n\) ends in \(0^n \circ 0^{n2}10\) and starts in \(0^{n1}1 \circ 0^{n2}10\). Observe furthermore that \(P_{2n}\) starts in \(0^n \circ 0^n=0^{2n}\) and ends in \(0^{n1}1\circ 0^n=0^{2n2}10\). By induction, we know that \(P_n\) visits every vertex of \(R_n\) exactly one. Using this with (16b) and (17) shows that \(P_{2n}\) visits every vertex of \(R_{2n}\) exactly once.
To illustrate the construction, for \(n=4\) we have \(P_4=(0000,0010)\), so
and
\(P_8=(\)  00000000,  00001000,  00001010,  10001010,  \(h(P',0000)\)  \(h(P'\sqcup P_4)\) 
10001110,  00001110,  00001100,  00000100,  \(h(P',0010)\)  
00000110,  00100110,  00101110,  00101100,  \(h(P'',0010)\)  
00101000,  00101010,  00100010,  00000010 ).  \(h(P'',0000)\) 
\(\square \)
Note that the end vertex \(0^{n2}10\) of \(P_n\) is not adjacent to \(g(0^n)=0^{n1}1\) in \(Q_n\), so \(P_n\) with g does not directly produce a 2nsymmetric Hamilton cycle in \(Q_n\) (recall (1)). However, in the following, we show that \(P_n\) can produce a 2nsymmetric Hamilton cycle in \(Q_{n+m}\) for any \(m\ge 1\).
Lemma 3.6
Let g be an automorphism of a graph G with orbits of the same size \(k\ge 2\) and let P be a path in G on orbit representatives R starting at some vertex u that is adjacent to g(u) in G. Let h be an automorphism of a graph H on an even number of vertices such that \({{\,\textrm{ord}\,}}(h)\) divides k and let Q be a Hamilton path of H between v and h(v) for some vertex v. Then the Cartesian product \(G\Box H\) has a ksymmetric Hamilton cycle
where \(f:=(g,h)\) is the (product) automorphism of \(G\Box H\).
Proof
Since \(f^k={{\,\textrm{id}\,}}\), all orbits of f have size at most k. Furthermore, for any (u, v) and \((u',v')\) from the set
and any \(0\le i,i' <k\) we have that \(f^i(u,v)=f^{i'}(u',v')\) only if
which holds only if \(u=u'\), \(i=i'\), and \(v=v'\) since \(u,u'\) are orbit representatives for g. Thus no two elements of A are from the same orbit of f and since
the set A contains representatives of all orbits of f and they all have the same size k.
As Q has even length, the path \(P\sqcup Q\) starts in (u, v), ends in (u, h(v)), and it contains exactly the vertices of A. Furthermore, (u, h(v)) is adjacent to \(f(u,v)=(g(u),h(v))\), so C defined in (19) is a ksymmetric Hamilton cycle in \(G\Box H\). \(\square \)
Theorem 3.7
For every \(n=2^r\), \(r\ge 2\), and \(m\ge 1\), the hypercube \(Q_{n+m}\) has a 2nsymmetric Hamilton cycle.
The 8symmetric Hamilton cycle in \(Q_8\) obtained from Theorem 3.7 for \(n=m=4\) is illustrated in Fig. 4b.
Proof
Let g be the automorphism of \(Q_n\) given by (13). All orbits of g have the same size \(k:=2n\) and by Lemmas 3.4 and 3.5, there is a path \(P_n\) on orbit representatives \(R_n\) that starts in \(u:=0^n\), which is adjacent to \(g(u)=0^{n1}1\). Let h be the automorphism of \(Q_m\) that flips the first bit. Clearly, \({{\,\textrm{ord}\,}}(h)=2\) divides k, and there is a Hamilton path in \(Q_m\) between \(v:=0^m\) and \(h(v)=10^{m1}\); take for example the BRGC \(\Gamma _m\) defined in Sect. 1.5.1. Applying Lemma 3.6, we obtain that the graph \(Q_{n+m}=Q_n\Box Q_m\) has the 2nsymmetric Hamilton cycle defined in (19). \(\square \)
Combining the previous results, we obtain the following closed formula for the Hamilton compression of \(Q_n\).
Theorem 3.8
We have \(\kappa (Q_2)=4\) and \(\kappa (Q_n)=2^{\lceil \log _2 n \rceil }\) for all \(n\ge 3\).
Note that \(n\le \kappa (Q_n)<2n\) for \(n\ge 2\), in particular \(\kappa (Q_n)=\Theta (n)\).
Proof
\(Q_2\) is a 4cycle, which has optimal compression \(\kappa (Q_2)=4\). Note that \(2^{\lceil \log _2 n \rceil }\) is the largest power of 2 that is less than 2n. By Lemma 3.2, this is a valid upper bound for \(\kappa (Q_n)\) for all \(n\ge 3\). For \(n=3\) and \(n=4\), this upper bound is 4, and it is attained by the BRGC \(\Gamma _n\), which has compression \(\kappa (Q_n,\Gamma _n)=4\) by Proposition 3.1. For any \(n\ge 5\) we define \(r:=\lceil \log _2 n\rceil 1\), \(n':=2^r\), and \(m:=n2^r\), and Theorem 3.7 yields a \(2n'\)symmetric Hamilton cycle in \(Q_{n'+m}=Q_n\), and since \(2n'=2^{r+1}=2^{\lceil \log _2 n\rceil }\), this matches the upper bound, so it is best possible. \(\square \)
3.4 Application to tTrack Gray Codes
Recall the definition of ttrack Hamilton cycles given in Sect. 1.6.2. As discussed before, there is no 1track Hamilton cycle in \(Q_n\). We now provide a construction of a 2track Hamilton cycle for every n that is a sum of two powers of 2.
Theorem 3.9
For every \(n=2^r\) and \(m=2^s\), where \(r\ge 2\) and \(r\ge s\ge 0\), there is a 2nsymmetric Hamilton cycle in \(Q_{n+m}\) that has 2 tracks.
The 2track Hamilton cycle in \(Q_8\) obtained from Theorem 3.9 for \(n=m=4\) is illustrated in Fig. 4c.
Proof
Since 2m divides 2n, we may apply Lemma 3.6 with the automorphism g of \(Q_n\) given by (13) and the automorphism h of \(Q_m\) given by \(h(x):=g(x)\). Furthermore, as a Hamilton path Q in \(Q_m\) between \(v:=0^m\) and \(h(v)=0^{m1}1\) we can take the listing \(\Gamma _m'\) obtained from the BRGC \(\Gamma _m\) by reversing every bitstring. In this way, we obtain a 2nsymmetric Hamilton cycle C of \(Q_{n+m}\). Furthermore, as the automorphism f from Lemma 3.6 is the product of g and h, and both g and h cyclically shift positions, we obtain that in the matrix corresponding to C, the first n columns are cyclic shifts of each other, and the last m columns are cyclic shifts of each other. \(\square \)
Theorem 3.9 can be generalized immediately, yielding a ttrack Hamilton cycle for every n that is a sum of \(t\ge 2\) powers of 2. This shows in particular that every dimension \(n\ge 5\) admits a Hamilton cycle with at most \(\lfloor \log _2(n+1)\rfloor \) many tracks.
Theorem 3.10
For every \(n=2^r\) and \((m_1,\ldots ,m_{t1})=(2^{s_1},\ldots ,2^{s_{t1}})\), where \(r,t\ge 2\) and \(r\ge s_1\ge \cdots \ge s_{t1}\ge 0\), there is a 2nsymmetric Hamilton cycle in \(Q_{n+m_1+\cdots +m_{t1}}\) that has t tracks.
Proof
The proof is analogous to the proof of Theorem 3.9, using the automorphism h of \(Q_{m_1+\cdots +m_{t1}}\) that complements the first bit and then cyclically shifts groups of bits of sizes \(m_1,\ldots ,m_{t1}\), each group one position to the left, and using any Hamilton path in \(Q_{m_1+\cdots +m_{t1}}\) between \(v:=0^{m_1,\ldots ,m_{t1}}\) and \(h(v)=0^{m_11}10^{m_2,\ldots ,m_{t1}}\). \(\square \)
4 Johnson Graphs and Relatives
In this section, we consider Johnson graphs and middle levels graphs introduced in Sect. 1.5 (recall also Sect. 2.3). We first derive some upper bounds for their Hamilton compression, and then provide corresponding lower bound constructions. For Johnson graphs, the classical construction of a Hamilton cycle is to consider the sublist of the BRGC \(\Gamma _n\) obtained by restricting to bitstrings with fixed Hamming weight k (see [48]). The resulting cycle in \(J_{n,k}\) is only 1symmetric in general, so we did not analyze it further (unlike the BRGC and the SJT cycles in the previous and next section, respectively, which have compression factors \(>1\)).
4.1 An Upper Bound
Recall from Sect. 2.3 that \({{\,\textrm{Aut}\,}}(J_{n,k})\cong S_n\) if \(n\ne 2k\) and \({{\,\textrm{Aut}\,}}(J_{n,k})\cong S_n\times {\mathbb {Z}}_2\) if \(n=2k\), so from (3) we obtain \(\kappa (J_{n,k})\le \lambda (n)\) or \(\kappa (J_{n,k})\le 2\lambda (n)\), respectively, where \(\lambda (n)\) is Landau’s function. We now improve these bounds drastically to linear functions (cf. (8)).
Lemma 4.1
If \(n\ne 2k\), then we have \(\kappa (J_{n,k})\le n\). If \(n=2k\), then we have \(\kappa (J_{n,k})\le 2n\).
Proof
We first consider the case \(n\ne 2k\). Let \(f=\pi \) be any automorphism of \(J_{n,k}\), and consider a fixed cycle decomposition \(C_1,\ldots ,C_m\) of the permutation \(\pi \). Consider the permutation \(\rho \) of [n] obtained by ‘flattening’ the lists \(C_1,\ldots ,C_m\). For example, if \(n=9\) and \(\pi =(1,5,4)(2,9,7,8)(3,6)\) we have \(\rho =154297836\). Let \(x=x_1\cdots x_n\) be the vertex of \(J_{n,k}\) defined by \(x_{\rho (i)}:=1\) for \(i=1,\ldots ,k\) and \(x_{\rho (i)}:=0\) for \(i=k+1,\ldots ,n\). By definition, for all \(i=1,\ldots ,m\) except possibly one index \(i=s\), we have that the entries of x on the indices of \(C_i\) are all the same (either all 1s or all 0s), whereas on the indices of \(C_s\) we see both 1s and 0s in x. It follows that the size of the orbit of x under \(\pi \) is at most \(C_s\le n\) (if there is no exceptional cycle \(C_s\), then the orbit has size 1). This proves the first part of the lemma.
The proof of the second part is analogous, and here the additional factor of 2 comes from the possible complementation operation. \(\square \)
As the automorphism group of the middle levels graph is also \({{\,\textrm{Aut}\,}}(J_{n,k})\cong S_n\times {\mathbb {Z}}_2\), the same proof idea immediately gives an analogous upper bound of twice the length of the bitstrings.
Lemma 4.2
For all \(n\ge 1\), we have \(\kappa (M_{2n+1})\le 2(2n+1)\).
4.2 Known Construction for Middle Levels Graphs
The following is the main result of [34].
Theorem 4.3
[34]. For all \(n\ge 1\), the graph \(M_{2n+1}\) has a \((2n+1)\)symmetric Hamilton cycle.
Cycles obtained from Theorem 4.3 are shown in Figs. 2b and 5a. These cycles also have the 1track property and they are balanced (as the underlying automorphism is cyclic rotation of all bits). From this we can determine the Hamilton compression of \(M_{2n+1}\) up to a factor of 2.
Theorem 4.4
For all \(n\ge 1\), we have \(2n+1\le \kappa (M_{2n+1})\le 2(2n+1)\).
Proof
The upper bound comes from Lemma 4.2, and the lower bound from Theorem 4.3. \(\square \)
Interestingly, both bounds in Theorem 4.4 can sometimes be improved. For example, in dimension 7, we can take the automorphism f defined by \(x_1\cdots x_7\mapsto \overline{x_1 x_2 x_4 x_5 x_6 x_7 x_3}\), which fixes the first two bits, cyclically leftshifts the remaining five bits by one position, and then complements all bits. A 10symmetric Hamilton cycle under this f is shown in Fig. 5b, whereas the lower and upper bounds are 7 and 14, respectively. In fact, computer experiments show that \(\kappa (M_7)=10\).
4.3 A NearOptimal Construction for Johnson Graphs
Our next result provides Hamilton cycles in \(J_{n,k}\) with optimal compression for the case when n and k are coprime (this in particular means that \(n\ne 2k\)).
Theorem 4.5
Let \(n>k>0\) be such that n and k are coprime. Then, \(J_{n,k}\) has an nsymmetric Hamilton cycle that has 1 track and is balanced, i.e., each bit is flipped equally often (\(\left( {\begin{array}{c}n\\ k\end{array}}\right) /n\) many times).
This construction is illustrated in Fig. 6a for \(J_{11,3}\).
Proof
For \(k=1\) and \(k=n1\), the Johnson graph \(J_{n,k}\) is the complete graph \(K_n\), so the statement is trivial. For the rest of the proof we, therefore, assume that \(n1>k>1\).
We use the automorphism f that cyclically leftshifts all bits by one position. The orbits of f are necklaces, and as n and k are coprime, every necklace has the same size n. Let P be the path in \(J_{n,k}\) guaranteed by Theorem 2.3 from \(x:=1^k0^{nk}\) to \(y:=1^{k1}010^{nk1}\). Note that y is adjacent to \(f(x)=1^{k1}0^{nk}1\). Consequently, \(C:=P,f(P),f^2(P),\ldots ,f^{n1}(P)\) is an nsymmetric Hamilton cycle in \(J_{n,k}\). Furthermore, any two columns of the \(C\times n\) matrix corresponding to C are cyclic shifts of each other, so C has the 1track property. This immediately implies that every bit is flipped equally often. \(\square \)
When n and k are not coprime, we can slightly modify the automorphism used to prove the previous theorem. Instead of cyclically shifting all n bits, we now shift only the first q bits, leaving the last \(nq\) bits unchanged. The parameter q is chosen as close to n as possible, but it has to satisfy certain coprimality conditions that are needed so that all necklaces have the same size q. This construction is illustrated in Fig. 6b for \(J_{10,4}\) and \(q=7\).
Theorem 4.6
Let \(q<n\) be such that \(q>\max \{k,nk\}\) and q and \(\ell \) are coprime for all \(\ell =k(nq),\ldots ,k\). Then, \(J_{n,k}\) has a qsymmetric Hamilton cycle that has \(1+nq\) tracks.
The number of tracks could be reduced to at most \(1+\lfloor \log _2(nq+1)\rfloor \) tracks with the help of Theorem 3.10.
Proof
Let \(r:=nq\). We use the automorphism f that cyclically leftshifts the first q bits by one position and leaves the last r bits unchanged, i.e., \(f(x_1\cdots x_n)=x_2x_3\cdots x_q x_1 x_{q+1}\cdots x_n\). By the assumption \(q>\max \{k,nk\}\), every (n, k)combination has both 0bits and 1bits among the first q bits, and as q and \(\ell \) are coprime for all \(\ell =kr,\ldots ,k\) by the assumptions in the lemma, all orbits of f have the same size q (independent of \(\ell \)).
The different values of \(\ell \) specify the number of 1bits among the first q positions. Specifically, for \(\ell =kr,\ldots ,k\), let \(R_\ell \) be the path on necklaces for \((q,\ell )\)combinations guaranteed by Theorem 2.3, i.e., \(R_\ell \) starts at \(1^\ell 0^{q\ell }\) and ends at \(1^{\ell 1}010^{q\ell 1}\). For the special cases \(\ell =1\) (i.e., \(q=nk+1\)), or \(\ell =k\) and \(q=k+1\) the sequence \(R_\ell \) is just the single vertex \(10^{q1}\) or \(1^k0\), respectively. Furthermore, let \(Q=(x_1,\ldots ,x_N)\), \(N:=2^r\), a Hamilton cycle in \(Q_r\), for example the BRGC \(Q=\Gamma _r\), which satisfies \(x_1=0^r\).
In the following, we write \(w(x_i)\) for the Hamming weight of \(x_i\). We now define a path
where \(R_i:=R_\ell \) with \(\ell :={kw(x_i)}\) for \(i=1,\ldots ,N1\), and \(R_N'\) is obtained from \(R_\ell \), \(\ell :=kw(x_N)\), by reversing all bitstrings and cyclically shifting them by \(q\ell \) positions to the left so that \(R_N'\) starts at \(1^\ell 0^{q\ell }\) and ends at \(01^{\ell 1}0^{q\ell 1}1\). By construction, for \(i=1,\ldots ,N1\) the last vertex of \(R_i x_i\) differs from the first vertex of \(R_{i+1}x_{i+1}\) by a transposition of 0 and 1. Furthermore, by our choice of \(x_1=0^r\), the first vertex of P is \(x:=1^k0^{qk}x_1=1^k0^{qk}0^r\) and as \(w(x_N)=1\) the last vertex of P is \(y:=01^{k2}0^{qk}1x_N\), i.e., y is connected to \(f(x)=1^{k1}0^{qk}10^r\).
We conclude that \(C:=P,f(P),f^2(P),\ldots ,f^{q1}(P)\) is a qsymmetric Hamilton cycle in \(J_{n,k}\). In the corresponding \(C\times n\) matrix, the first q columns are cyclic shifts of each other, so they form one track, and each of the remaining r columns is its own track. The total number of tracks is therefore \(1+r=1+nq\). \(\square \)
The next lemma provides the good news that an integer q satisfying the conditions of Theorem 4.6 exists for all n and k.
Lemma 4.7
For all \(n>k>0\), there is an integer \(q\le n\) such that \(q>\max \{k,nk\}\) and q and \(\ell \) are coprime for all \(\ell =k(nq),\ldots ,k\).
One natural idea would be to take q as a prime number with \(k<q\le n\), this would automatically guarantee that q is coprime to all \(\ell =k(nq),\ldots ,k\). However, as the integers contain arbitrarily long intervals of nonprimes, such a choice is not always possible, so we need to argue differently. It turns out that the proof of Lemma 4.7 requires some delicate numbertheoretic reasoning, so we defer it to the appendix. For \(n>k>0\) we write q(n, k) for the largest integer q satisfying the conditions of Lemma 4.7. The function \(nq(n,k)\) is visualized in the appendix for small values of n and k. This is the difference of the compression factor q achievable by Theorems 4.5 and 4.6 and the upper bound n provided by Lemma 4.1.
We now combine the results of this section to determine the Hamilton compression of \(J_{n,k}\) exactly or almost exactly.
Theorem 4.8
The Hamilton compression of the Johnson graph \(J_{n,k}\), where \(n>k>0\), has the following properties:

(i)
If n and k are coprime, we have \(\kappa (J_{n,k})=n\).

(ii)
If n and k are not coprime and \(n\ne 2k\), we have \(n/2\!<\!\max \{k,nk\}\!<\!q(n,k)\!\le \! \kappa (J_{n,k})\!\le \! n\).

(iii)
If n and k are not coprime and \(n=2k\), we have \(n/2<\kappa (J_{n,k})\le 2n\).

(iv)
For any \(\varepsilon >0\), there is an \(n_0\) such that for all \(n>n_0\) with \(n\ne 2k\), we have \((1\varepsilon )n\le \kappa (J_{n,k})\le n\). In particular, we have \(\kappa (J_{n,k})=(1o(1))n\) for \(n\ne 2k\).
Proof
The upper bounds in (i)–(iii) are from Lemma 4.1. The lower bound in (i) is from Theorem 4.5. The lower bound in (ii)+(iii) is from Theorem 4.6, using Lemma 4.7.
The last part (iv) follows from (ii). Specifically, the prime number theorem guarantees that for any \(\varepsilon \) there is an \(n_0\) such that for all \(n>n_0\) there is a prime number in the interval \([(1\varepsilon )n,n]\), which shows that \(q(n,k)\ge (1\varepsilon )n\). We conclude that \(q(n,k)\ge (1o(1))n\). \(\square \)
For quantitative bounds on the dependence of \(n_0\) on \(\varepsilon \) in Theorem 4.8 (iv), see e.g. [11].
5 Permutahedra
We now consider the family of permutahedra \(\Pi _n\) introduced in Sect. 1.5 (recall also Sects. 2.4–2.6). We first show that the Steinhaus–Johnson–Trotter cycle has constant compression (6 or 3). We then establish a mildly exponential upper bound for \(\kappa (\Pi _n)\) that involves the Landau function \(\lambda (n)\) and its variants, and we provide a nearoptimal lower bound construction. Lastly, we apply our constructions to derive a balanced 1track Gray code for permutations of odd length that uses cyclically adjacent transpositions.
5.1 The Steinhaus–Johnson–Trotter (SJT) Cycle
Recall the definition of the SJT cycle \(\Lambda _n\) given in Sect. 1.5.3.
Proposition 5.1
The SJT cycle \(\Lambda _n\) has compression
The SJT cycle \(\Lambda _n\) is illustrated in Figs. 1a and 7a for \(n=4\) and \(n=5\), respectively, and those two pictures indeed have 6fold or 3fold rotational symmetry. While the latter might seem to have 6fold symmetry at first glance, a careful inspection of the short chords shows that this is not the case.
Proof
The cycle \(\Lambda _3=123,132,312,321,231,213\) is a 6cycle, and the automorphism \(f=(\alpha ,\pi )\) of \(\Pi _3\) with \(\alpha ={{\,\textrm{rev}\,}}\) and \(\pi =231\) shows that it is 6symmetric (recall (6)). The cycle \(\Lambda _4\) is shown in Fig. 1a, and the automorphism \(f=(\alpha ,\pi )\) of \(\Pi _4\) with \(\alpha ={{\,\textrm{rev}\,}}\) and \(\pi =2314\) shows that it is 6symmetric.
Note that \(f^2=({{\,\textrm{id}\,}},3124)\) is another automorphism of \(\Pi _4\), which shows that \(\Lambda _4\) is 3symmetric, and we will now generalize this automorphism to show that \(\Lambda _n\), \(n\ge 5\), has compression at least 3. Note that \((n1)!/3\) is even for \(n\ge 5\), so by the definition of \(\Lambda _n\) the value n is at the rightmost position in the permutations of \(\Lambda _n\) at positions \(1,N/3+1,2N/3+1\), where \(N:=n!\). Consequently, for \(n\ge 5\) the automorphism \(f=({{\,\textrm{id}\,}},31245\cdots n)\) of \(\Pi _n\) shows that \(\Lambda _n\) has compression at least 3.
It remains to show that the compression of \(\Lambda _n\) is at most 3 for \(n\ge 5\). Let \(f=(\alpha ,\pi )\) be any automorphism of \(\Lambda _n\) for \(n\ge 4\), and consider the movement of the largest value n in the sequence \(\Lambda _n\). By definition of \(\Lambda _n\), we alternately see the following two patterns: \(n1\) transpositions involving n and a smaller value, followed by a transposition involving two smaller values. In particular, every value \(i<n\) is involved in at most 2 adjacent transpositions consecutively. It follows that for \(n\ge 4\), the permutation \(\pi \) must map \(i\mapsto i\) for all \(i=n,n1,\ldots ,4\). Note that in \(\Lambda _4\) the value 4 reaches the leftmost and rightmost position precisely 3 times each (and stays at this position for one step each time). Consequently, to complete the proof it suffices to show that f does not yield the mapping \(x_i\mapsto x_{i+N/6}\) for all \(i=1,\ldots ,N\) when \(n\ge 5\). To see this note that 4 and 5 are adjacent in \(x_1=12345\cdots n\), but nonadjacent in \(x_{1+N/6}=41325\ldots n\) (and \(\pi \) preserves both values). \(\square \)
5.2 An Upper Bound
Recall from Sect. 2.4 that \({{\,\textrm{Aut}\,}}(\Pi _n) \cong {\mathbb {Z}}_2 \ltimes S_n\), so from (3), we obtain \(\kappa (\Pi _n)\le 2\lambda (n)\), where \(\lambda (n)\) is Landau’s function. The next lemma improves this bound, based on a parity argument. Recall the definitions of \(\lambda _0(n)\) and \(\lambda _2(n)\) from (9).
Lemma 5.2
Let \(n\ge 4\). If \(n\equiv 0,1 \bmod 4\), then we have \(\kappa (\Pi _n)\le \max \{2\lambda _0(n),\lambda _2(n)\}\). If \(n\equiv 2,3 \bmod 4\), then we have \(\kappa (\Pi _n)\le \lambda (n)\).
The relation between \(2\lambda _0(n)\) and \(\lambda _2(n)\) is somewhat unclear. While for \(n\le 37\), we have \(2\lambda _0(n)>\lambda _2(n)\), for increasing values of n it seems that more and more values satisfy \(2\lambda _0(n)<\lambda _2(n)\), for example \(n=38,49,50,51,52,53,54,55,66,67,68,69,70,71,72,73,74,80,85,86,87,88, 89,90,91,92,93,94,95,96,97,99,100\) (see the appendix).
Proof
Consider an automorphism \(f=(\alpha ,\pi )\) of \(\Pi _n\) and a path \(P=(x_1,\ldots ,x_\ell )\), \(\ell :=n!/k\), such that \(C=P,f(P),f^2(P),\ldots ,f^{k1}(P)\) is a ksymmetric Hamilton cycle in \(\Pi _n\), i.e., \(k={{\,\textrm{ord}\,}}(f)\).
We clearly have \({{\,\textrm{ord}\,}}(f)\in \{{{\,\textrm{ord}\,}}(\pi ),2{{\,\textrm{ord}\,}}(\pi )\}\). Furthermore, note that if \({{\,\textrm{ord}\,}}(f)=2{{\,\textrm{ord}\,}}(\pi )\), i.e., \(\alpha ={{\,\textrm{rev}\,}}\), then \({{\,\textrm{ord}\,}}(\pi )\) must be odd, otherwise we would have \(f^{k/2}=f^{{{\,\textrm{ord}\,}}(\pi )}=\pi ^{{{\,\textrm{ord}\,}}(\pi )}={{\,\textrm{id}\,}}\), a contradiction.
We first show that \(\ell \) is even. Let \(2^i\) be the largest power of 2 in \({{\,\textrm{ord}\,}}(\pi )\). Note that \(2^i\) also divides the length of one of the cycles of \(\pi \), so \(2^i\le n\). Consequently, if \(n\ge 6\), then \(n!/2^{i+1}\) is even, as the product n! contains the factor \(2^i\) and two additional even factors. This implies that \(\ell =n!/k=n!/{{\,\textrm{ord}\,}}(f)\) is even, as \({{\,\textrm{ord}\,}}(f)\in \{{{\,\textrm{ord}\,}}(\pi ),2{{\,\textrm{ord}\,}}(\pi )\}\). For \(n=4,5\), the product n! contains the factor \(2^i\) and one additional even factor, implying that \(n!/2^i\) is even and, therefore, \(\ell \) is even unless \({{\,\textrm{ord}\,}}(f)=2{{\,\textrm{ord}\,}}(\pi )\). However, in the latter case, \({{\,\textrm{ord}\,}}(\pi )\) must be odd, i.e., we have \(i=0\), showing that \(n!/2^{i+1}=n!/2\) and therefore \(\ell \) is even.
As \(\ell \) is even and \(x_i\) has opposite parity to \(x_{i+1}\) for all \(i=1,\ldots ,\ell \), we obtain that \(x_1\) and \(x_\ell \) have opposite parity, and \(x_1\) and \(x_{\ell +1}=f(x_1)\) have the same parity (recall (1)), showing that the mapping \(f(x)=\alpha x \pi \) preserves parity (recall (6)).
If \(n\equiv 0,1 \bmod 4\), then \(\left( {\begin{array}{c}n\\ 2\end{array}}\right) \) is even, so \(\alpha \in \{{{\,\textrm{id}\,}},{{\,\textrm{rev}\,}}\}\) is an even permutation. Therefore \(\pi \) must be an even permutation, i.e., the number of even cycles of \(\pi \) is even. If \(\pi \) consists of only odd cycles, then \(k\le 2{{\,\textrm{ord}\,}}(\pi )\le 2\lambda _0(n)\) by the definition 9a. Otherwise, \({{\,\textrm{ord}\,}}(\pi )\) will be even, and therefore, \(k={{\,\textrm{ord}\,}}(\pi )\le \lambda _2(n)\) by our initial observations about the parity of \({{\,\textrm{ord}\,}}(\pi )\) and by the definition 9b. The maximum of the bounds obtained in both cases yields the claimed bound.
If \(n\equiv 2,3 \bmod 4\), then \(\left( {\begin{array}{c}n\\ 2\end{array}}\right) \) is odd, so \({{\,\textrm{rev}\,}}\) is an odd permutation. If \(\alpha ={{\,\textrm{id}\,}}\), then \(k={{\,\textrm{ord}\,}}(\pi )\le \lambda (n)\). If \(\alpha ={{\,\textrm{rev}\,}}\), then \(\pi \) must be an odd permutation, i.e., the number of even cycles of \(\pi \) is odd. In particular, there is at least one even cycle, which implies that \({{\,\textrm{ord}\,}}(\pi )\) is even, so \(k={{\,\textrm{ord}\,}}(\pi )\le \lambda (n)\) as well. \(\square \)
5.3 A NearOptimal Construction
Our aim is to use an automorphism of \(\Pi _n\) whose order is close to Landau’s function \(\lambda (n)\). Let \(\textbf{a}=(a_1,\ldots ,a_m)\) be a composition of n and let \(A_1 \cup \cdots \cup A_m\) be its associated partition of [n] as defined in Sect. 2.5. By definition, we have \(A_i=\{b_i+1, \ldots , b_i+a_i\}\) where \(b_i:=\sum _{j=1}^{i1}a_j\). So \(f_i:=(b_i+1,\ldots ,b_i+a_i)\) is a cyclic permutation of \(A_i\). Its \((A_i1)!\) orbits can be represented by fixing a value from \(A_i\) on a particular position and permuting the remaining values in the remaining positions in all possible ways. For example, if \(f=(1,2,3)\), then by fixing the value 3 on the last position we have representatives 123, 213, by fixing the value 1 on the first position we have representatives 123, 132, and in both cases these are representatives of the two orbits \(\langle 123\rangle _f=\{123,231,312\}\) and \(\langle 213 \rangle _f=\langle 132 \rangle _f=\{213,321,132\}\). Let us define an automorphism \(f_\textbf{a}\) of \(\Pi _n\) as a product of the cyclic permutations \(f_i\) applied on values (without reversal of positions), i.e.,
First, we need to consider the orbits of \(f_\textbf{a}\). For the following characterization, recall the definitions from Sects. 2.1 and 2.5. This lemma follows immediately from the Chinese remainder theorem.
Lemma 5.3
Let \(\textbf{a}=(a_1,\ldots ,a_m)\) be a composition of n and let \(f_\textbf{a}\) be as in (20).

(i)
If \(a_1,\ldots ,a_m\) are pairwise coprime, then the orbits of \(f_\textbf{a}\) are
$$\begin{aligned} \Big \{u\otimes \big (X_1\times \cdots \times X_m\big ) \mid u\in {\textstyle \left( {\begin{array}{c}[n]\\ \textbf{a}\end{array}}\right) } \text { and } (X_1,\ldots ,X_m)\in O(f_1)\times \cdots \times O(f_m) \Big \}.\nonumber \\ \end{aligned}$$(21) 
(ii)
If \(m\ge 2\), \(a_1=2\), \(a_2=2^c\) for some \(c\ge 1\), and \(a_2,\ldots , a_m\) are pairwise coprime, then the orbits of \(f_\textbf{a}\) are
$$\begin{aligned} \begin{aligned}&\Big \{u\otimes \big (B\times X_3\times \cdots \times X_m\big ),u\otimes \big (B'\times X_3\times \cdots \times X_m\big ) \mid u\in {\textstyle \left( {\begin{array}{c}[n]\\ \textbf{a}\end{array}}\right) } \text { and } \\&\qquad (X_3,\ldots ,X_m)\in O(f_3)\times \cdots \times O(f_m) \Big \}, \end{aligned} \end{aligned}$$(22)where \(B:=\{12\}\times X_2^0\,\cup \, \{21\}\times X_2^1\), \(B':=\{12\}\times X_2^1\,\cup \, \{21\}\times X_2^0\), and \(X_2^0\cup X_2^1\) is the partition of \(X_2=:\{x,f_2(x),f_2^2(x),\ldots ,f_2^{a_21}(x)\}\) defined by \(X_2^0:=\{f_2^{2i}(x)\mid i=0,\ldots ,(a_22)/2\}\) and \(X_2^1:=\{f_2^{2i1}(x)\mid i=1,\ldots ,a_2/2\}\), respectively.
To illustrate part (i) of the lemma with an example, for \(\textbf{a}=(2,3)\) we have
\(O(f_1)=\{\{12,21\}\}\) and \(O(f_2)=\{\{345,453,534\},\{543,435,354\}\}\) and hence the orbits of \(f_\textbf{a}\) are
The first two of those 20 orbits, namely those corresponding to \(u=11222\) are \(\{12345,21453,12534,21345,12453,21534\}\) and \(\{12543,21453,12534,21543,12435,21354\}\).
Using Lemma 5.3, we now build a path in \(\Pi _n\) on representatives of orbits where each permutation \(f_i\) of values \(A_i\) acts on the positions \(A_i\). That is, the orbits are obtained from the orbits of the \(f_i\) by mixing with the identity permutation \({{\,\textrm{id}\,}}(\textbf{a})\).
Lemma 5.4
Let \(\textbf{a}=(a_1,\ldots ,a_m)\) be a composition of n and let \(f_\textbf{a}\) be as in (20).

(i)
If \(a_1,\ldots ,a_m\) are pairwise coprime and odd, and \(a_1\ge 3\), then \(\Pi _n\) contains a path Q that starts at \({{\,\textrm{id}\,}}=1\cdots n\), ends at a neighbor of \(f_\textbf{a}({{\,\textrm{id}\,}})\) and that visits each orbit of \(f_\textbf{a}\) from (21) with \(u={{\,\textrm{id}\,}}(\textbf{a})\) exactly once.

(ii)
If \(m\ge 2\), \(a_1=2\), \(a_2=2^c\) for some \(c\ge 1\), and \(a_2,\ldots , a_m\) are pairwise coprime, then the same conclusion holds for the orbits from (22) with \(u={{\,\textrm{id}\,}}(\textbf{a})\).
Note that in part (i) of the lemma, the \(a_i\) are not only required to be pairwise coprime, but also odd (unlike in part (i) of Lemma 5.3). In part (ii), all \(a_i\), \(i=3,\ldots ,m\), are odd by the assumption that they are coprime to \(a_2=2^c\).
Proof
We prove both statements by induction on m, the only difference being the base case.
We first consider the base case \(m=1\) for part (i). We have \(\textbf{a}=(n)\), \(f_\textbf{a}=f_1=(1,\ldots ,n)\), and \({{\,\textrm{id}\,}}(\textbf{a})=1^n\) where \(n\ge 3\) is odd. As orbit representatives we choose permutations that have the value n fixed in the last position, using that \(O(f_1)=\{\langle xn \rangle _{f_1} \mid x\in S_{n1}\}\). By Theorem 2.4, there is a Hamilton path P in \(\Pi _{n1}\) from \(x:=1\cdots (n1)\) to \(y:=2\cdots (n1)1\) (note that y is odd as n is odd). Thus, \(\Pi _n\) contains the path \(Q:=Pn\) from \(xn={{\,\textrm{id}\,}}\) to \(yn=2\cdots (n1)1n\), which is adjacent to \(f_\textbf{a}({{\,\textrm{id}\,}})=2\cdots (n1)n1\) by a transposition of the last two entries. Moreover, Q visits every orbit in \(\bigcup _{X_1\in O(f_1)}{{\,\textrm{id}\,}}(\textbf{a})\otimes X_1=O(f_1)\) exactly once.
We now consider the base case \(m=2\) for part (ii). We have \(\textbf{a}=(2,2^c)\), \(f_\textbf{a}=f_1f_2=(1,2)(3,\ldots ,n)\) for \(n:=2+2^c\), and \({{\,\textrm{id}\,}}(\textbf{a})=1^22^{n2}\). As before, we choose orbit representatives with value n at the last position, using that \(O(f_2)=\{\langle xn\rangle _{f_2} \mid x\in S_{\{3,\ldots ,n1\}}\}\). If \(c=1\), then \(n=4\), and in this case \(Q:=(1234,2134)\) is the desired path in \(\Pi _n\) since 2134 is adjacent to \(f_\textbf{a}(1234)=2143\). Otherwise, we have \(c\ge 2\) and therefore \(n=2+2^c\ge 6\). By Theorem 2.4, there are Hamilton paths \(P,P'\) in \(\Pi _{\{3,\ldots ,n1\}}\) from \(x:=34\cdots (n1)\) to \(y:=435\cdots (n1)\) and from \(y':=435\ldots (n1)\) to \(x':=4\cdots (n1)3\), respectively (note that \(x'\) is even as n is even). Thus \(\Pi _n\) contains the path \(Q:=12Pn,21P'n\) from \(12xn={{\,\textrm{id}\,}}\) to \(21x'n=214\cdots (n1)3n\), which is adjacent to \(f_\textbf{a}({{\,\textrm{id}\,}})=214\cdots (n1)n3\) by a transposition of the last two entries. Moreover, Q visits every orbit in \(\{{{\,\textrm{id}\,}}(\textbf{a})\otimes B\}\cup \{{{\,\textrm{id}\,}}(\textbf{a})\otimes B'\}\) exactly once (B and \(B'\) are as defined after (22)).
For the induction step, consider a composition \((a_1,\ldots ,a_m)\) of n as in the lemma, with \(m\ge 2\) in part (i) and \(m\ge 3\) in part (ii), and define \(\textbf{a}':=(a_1,\ldots ,a_{m1})\) and \(n':=na_m\). By induction there is a path \(Q'=(z_1,\ldots ,z_\ell )\) in \(\Pi _{n'}\) from \(z_1={{\,\textrm{id}\,}}':=1\cdots n'\) to a neighbor \(z_\ell \) of \(f_{\textbf{a}'}({{\,\textrm{id}\,}}')\) that visits each orbit of \(f_{\textbf{a}'}\) exactly once. If \(a_m=1\) then \(Q:=Q'n\) is the desired path in \(\Pi _n\) from \(z_1n={{\,\textrm{id}\,}}\) to \(z_\ell n\), which is a neighbor of \(f_\textbf{a}({{\,\textrm{id}\,}})=f_{\textbf{a}'}({{\,\textrm{id}\,}}')n\), and we are done. Otherwise, we have \(a_m\ge 3\) and we use two sets of representatives of orbits of \(f_m\), namely
By Theorem 2.4, there is a Hamilton path P in \(\Pi _{\{n'+1,\cdots ,n1\}}\) from \(x:=(n'+1)\cdots (n1)\) to \(y:=(n'+2)(n'+1)(n'+3)\ldots (n1)\) and a Hamilton path \(P'\) in \(\Pi _{\{n'+1,n'+3,\ldots ,n\}}\) from \(y':=(n'+1)(n'+3)\cdots n\) to \(x':=(n'+3)\cdots n(n'+1)\). Using that \(yn=(n'+2)y'\), we obtain that
is a path in \(\Pi _n\) from \(z_1xn={{\,\textrm{id}\,}}\) to \(z_\ell (n'+2)x'=z_\ell (n'+2)(n'+3)\cdots n(n'+1)\), which is adjacent to \(f_\textbf{a}({{\,\textrm{id}\,}})=f_{\textbf{a}'}({{\,\textrm{id}\,}}')(n'+2)(n'+3)\cdots n(n'+1)\), as \(z_\ell \) is adjacent to \(f_{\textbf{a}'}({{\,\textrm{id}\,}}')\) in \(\Pi _{n'}\). Note that (23) requires \(\ell \) to be even, which is satisfied as the number of orbits of \(f_1\) is even in part (i) and the number of orbits of \(f_1f_2\) is even in part (ii). By this construction and the induction hypothesis, the path Q visits every orbit from (21) or (22) with \(u={{\,\textrm{id}\,}}(\textbf{a})\) exactly once. \(\square \)
Theorem 5.5
Let \(\textbf{a}=(a_1,\ldots ,a_m)\) be a composition of \(n\ge 3\) and let \(f_\textbf{a}\) be as in (20). If

(i)
\(a_1,\ldots ,a_m\) are pairwise coprime and odd, and \(a_1\ge 3\), or

(ii)
\(m\ge 4\), \(a_1=2\), \(a_2=2^c\) for some \(c\ge 1\), and \(a_2,\ldots ,a_m\) are pairwise coprime,
then \(\Pi _n\) has a ksymmetric Hamilton cycle for \(f_\textbf{a}\) for \(k:={{\,\textrm{lcm}\,}}(\textbf{a})\).
The 5symmetric Hamilton cycle in \(\Pi _5\) obtained from Theorem 5.5 (i) for \(\textbf{a}=(5)\) is illustrated in Fig. 7b.
Proof
Note that \(k={{\,\textrm{ord}\,}}(f_\textbf{a})\). From Lemma 5.4, we obtain a path \(Q=(x_1,\ldots ,x_\ell )\) in \(\Pi _n\) that starts at \(x_1={{\,\textrm{id}\,}}\), ends at a neighbor \(x_\ell \) of \(f_\textbf{a}({{\,\textrm{id}\,}})\) and that visits each orbit of \(f_\textbf{a}\) from (21) or (22) with \(u={{\,\textrm{id}\,}}(\textbf{a})\) exactly once. Note that \(\ell \) is even as some \(f_1\) has an even number of orbits in part (i) and \(f_1f_2\) has an even number of orbits in part (ii). For \(i=1,\ldots ,\ell \), let \(y_i\) be the mtuple of permutations of the sets \(A_j\) whose concatenation gives \(x_i\), i.e., \(x_i=u\otimes y_i\).
In part (i) and \(m=1\), we have \(k=n\) and we are done as Q already visits all orbits, so
is a ksymmetric Hamilton cycle in \(\Pi _n\).
In part (i) and \(m=2\), we apply Theorem 2.5 to obtain a Hamilton path R in \(G(\textbf{a})\) from the identity \(\textbf{a}\)permutation \(u:={{\,\textrm{id}\,}}(\textbf{a})=1^{a_1}2^{a_2}\) to \(v:=2^{a_2}1^{a_1}\).
For any two consecutive vertices \(x_i=u \otimes y_i\) and \(x_{i+1}=u \otimes y_{i+1}\) on the path Q, we have that \(v \otimes y_i\) and \(v \otimes y_{i+1}\) are also adjacent. It follows that
is a path in \(\Pi _n\) from \(x_1=u \otimes y_1={{\,\textrm{id}\,}}\) to \(x_\ell =u \otimes y_\ell \), which is a neighbor of \(f_\textbf{a}({{\,\textrm{id}\,}})\). Moreover, P visits all orbits of \(f_\textbf{a}\) exactly once. Therefore,
is a ksymmetric Hamilton cycle in \(\Pi _n\).
In part (i) and \(m\ge 3\) and in part (ii) with \(c\ge 2\) we apply Theorem 2.6 to obtain a Hamilton C in \(G(\textbf{a})\) (in part (i), all \(a_i\) are odd, which rules out the exceptional case \((n2,1,1)\) with even n, and in part (ii), we assumed \(m\ge 4\), which guarantees at least two odd \(a_i\)). We consider the \(\textbf{a}\)permutation \(u:={{\,\textrm{id}\,}}(\textbf{a})\), and let \(v,v'\in \left( {\begin{array}{c}[n]\\ \textbf{a}\end{array}}\right) \) be the neighbors of u on C. Furthermore, let \(R,R'\) denote the Hamilton paths of \(G(\textbf{a})\) from u to v or \(v'\), respectively, obtained from C by removing the corresponding edge. Clearly, v and \(v'\) differ from u by adjacent transpositions of a different pair of values, and as all \(a_i\), \(i=2,\ldots ,m\) are either 1 or \(\ge 3\), we have that for any pair of positions with same values in u, at least one of the transpositions to reach v or \(v'\) from u does not involve any of these two positions. It follows that for any two consecutive vertices \(x_i=u \otimes y_i\) and \(x_{i+1}= u \otimes y_{i+1}\) on the path Q, we have that \(v \otimes y_i\) and \(v \otimes y_{i+1}\) are adjacent, or \(v' \otimes y_i\) and \(v' \otimes y_{i+1}\) are adjacent. In the former case, we define \(R_i:=R\), whereas in the latter case, we define \(R_i:=R'\). With these definitions
is a path in \(\Pi _n\) from \(x_1=u\otimes y_1={{\,\textrm{id}\,}}\) to \(x_\ell =u \otimes y_\ell \), which is a neighbor of \(f_\textbf{a}({{\,\textrm{id}\,}})\). Moreover, P visits all orbits of \(f_\textbf{a}\) exactly once. Therefore,
is a ksymmetric Hamilton cycle in \(\Pi _n\).
The only case that has to be treated separately is part (ii) with \(c=1\), i.e., \(a_1=a_2=2\). In this case, we use \(u:=1^2 3^{a_3}4^{a_4}\ldots m^{a_m} 2^2\) in the argument above, and we obtain a path P in \(\Pi _n\) from \(u\otimes y_1\) to \(u\otimes y_\ell \), which is a neighbor of \(f_\textbf{a}(u\otimes y_1)\), yielding a ksymmetric Hamilton cycle in \(\Pi _n\). This completes the proof. \(\square \)
Combining our previous results, we obtain the following nearoptimal bounds for the Hamilton compression of \(\Pi _n\), which are tight in infinitely many cases.
Theorem 5.6
The Hamilton compression of the permutahedron \(\Pi _n\) has the following properties:

(i)
We have \(\kappa (\Pi _3)=6\), \(\kappa (\Pi _4)=6\) and \(\kappa (\Pi _5)=10\).

(ii)
For \(n\ge 3\) we have \(\kappa (\Pi _n)\ge \max \{\lambda _0(n),\lambda _2(n)\}\ge \lambda (n)/2\).

(iii)
For \(n\ge 4\), if \(n\equiv 0,1 \bmod 4\), then we have \(\kappa (\Pi _n)\le \max \{2\lambda _0(n),\lambda _2(n)\}\), and if \(n\equiv 2,3 \bmod 4\), then we have \(\kappa (\Pi _n)\le \lambda (n)\).

(iv)
Let \(n\ge 4\). If \(n\equiv 0,1 \bmod 4\) and \(2\lambda _0(n)\le \lambda _2(n)\), then we have \(\kappa (\Pi _n)=\lambda _2(n)\), and the second condition holds for all \(n\ge 739\). If \(n\equiv 2,3 \bmod 4\) and \(\lambda (n)\in \{\lambda _0(n),\lambda _2(n)\}\), then we have \(\kappa (\Pi _n)=\lambda (n)\), and the condition \(\lambda (n)=\lambda _2(n)\) holds for arbitrarily large intervals.

(v)
The lower and upper bounds in (ii) and (iii) differ at most by a factor of 2. In particular, we have \(\kappa (\Pi _n)=\Theta (\lambda (n))=e^{(1+o(1))\sqrt{n \ln n}}\).
From part (iv) of the theorem, we obtain exact results for the following values \(n\le 100\): We have \(\kappa (\Pi _n)=\lambda _0(n)\) for \(n=15\) and \(\kappa (\Pi _n)=\lambda _2(n)\) for \(n=22,46,49,51,52,53,55,68,69,72,73,74,75,80,82,85,87,88,89,91,92,93,96,97,99,100\). See the appendix for more exact results and the corresponding values of \(\kappa (\Pi _n)\). A 10symmetric Hamilton cycle in \(\Pi _5\) obtained by computer search is shown in Fig. 7c.
Proof
The exact values for \(n=3,4,5\) stated in (i) were obtained by computer search.
We now prove (ii). Let \(n\ge 3\). By Lemma 2.7 (ii) there is a partition \(\textbf{a}=(a_1,\ldots ,a_m)\) of n into powers of distinct odd primes and 1s such that \({{\,\textrm{lcm}\,}}(\textbf{a})=\lambda _0(n)\), and we clearly have \(a_1\ge 3\). In particular, \(a_1,\ldots ,a_m\) are pairwise coprime and odd, so by Theorem 5.5 (i) there is a ksymmetric Hamilton cycle in \(\Pi _n\) where \(k:={{\,\textrm{lcm}\,}}(\textbf{a})=\lambda _0(n)\). This shows that \(\kappa (\Pi _n)\ge \lambda _0(n)\) for \(n\ge 3\).
Let \(n\ge 12\). By Lemma 2.7 (iii), there is a partition \(\textbf{a}=(a_1,\ldots ,a_m)\) of n into powers of distinct odd primes, \(2^c\) for some \(c\ge 1\), 2 and 1s such that \({{\,\textrm{lcm}\,}}(\textbf{a})=\lambda _2(n)\), and moreover \(m\ge 4\). In particular, all the \(a_i\) except 2 and \(2^c\) are pairwise coprime, so by Theorem 5.5 (ii) there is a ksymmetric Hamilton cycle in \(\Pi _n\) where \(k:={{\,\textrm{lcm}\,}}(\textbf{a})=\lambda _2(n)\). This shows that \(\kappa (\Pi _n)\ge \lambda _2(n)\) for \(n\ge 12\).
For \(n=3,\ldots ,11\), we can verify from Table 1 that \(\lambda _0(n)\ge \lambda _2(n)\).
Combining the three observations from before shows that \(\kappa (\Pi _n)\ge \max \{\lambda _0(n),\lambda _2(n)\}\) for \(n\ge 3\), and the lower bound \(\lambda (n)/2\) for the maximum follows from Lemma 2.7 (iv).
The upper bounds stated in (iii) are from Lemma 5.2.
The statements in (iv) are an immediate consequence of (ii) and (iii), also using Lemma 2.7 (v)+(vi).
The statements in (v) follow by observing that \(\max \{a,b\}\) and \(\max \{2a,b\}\) differ by at most a factor of 2, and by using (8). \(\square \)
5.4 Application to Balanced 1Track Gray Codes
We write \(\Pi _n^+\) for the graph obtained from \(\Pi _n\) by adding edges that correspond to transpositions of the first and last entry of a permutation, i.e., we allow cyclically adjacent transpositions.
Theorem 5.7
For every odd \(n\ge 3\) there is an nsymmetric Hamilton cycle in \(\Pi _n^+\) that has 1 track and is balanced, i.e., each of the n transpositions is used equally often (\((n1)!\) many times). The Hamilton cycle in \(\Pi _5^+\) obtained from Theorem 5.7 is illustrated in Fig. 8.
Proof
We consider the automorphism f of \(\Pi _n^+\) that cyclically shifts all entries one position to the left, i.e., \(f(x_1\cdots x_n)=x_2\cdots x_nx_1\). We choose permutations that have the symbol n fixed at the last position as representatives. By Theorem 2.4, there is a Hamilton path Q in \(\Pi _{n1}\) from \(x:=1\cdots (n1)\) to \(y:=2\cdots (n1)1\) (note that y is odd as n is odd). Thus \(\Pi _n^+\) contains the path \(P:=Qn\) from \(xn={{\,\textrm{id}\,}}\) to \(yn=2\cdots (n1)1n\), which is adjacent to \(f({{\,\textrm{id}\,}})=2\cdots (n1)n1\) by a transposition of the last two entries. Consequently, \(C:=P,f(P),f^2(P),\cdots ,f^{n1}(P)\) is an nsymmetric Hamilton cycle of \(\Pi _n^+\). Furthermore, in the matrix corresponding to C, any two columns are cyclic shifts of each other, so C has the 1track property. Lastly, note that if P applies a transposition \((i,i+1)\), then this becomes a transposition \((ij,i+1j)\) (modulo n) in \(f^j(P)\), which implies the balancedness property. \(\square \)
6 Abelian Cayley Graphs
In this section, we consider the Hamilton compression of Cayley graphs of abelian groups, introduced in Sect. 2.7 (recall also Sect. 2.1). After deriving a stronger version of the wellknown factor group lemma, we construct an infinite family of abelian Cayley graphs that have Hamilton compression 1. We complement this by showing that all other abelian Cayley graphs have Hamilton compression at least 2.
6.1 The Factor Group Lemma
An important tool for proving Hamiltonicity in Cayley graphs is the socalled factor group lemma.
Lemma 6.1
(Factor group lemma, [51, Sec. 2.2]) Let G be a group, \(S\subseteq G\) a generating set, and N a normal subgroup of G. If \(s_1,\ldots , s_{G/N}\) is a sequence of elements in S such that

(i)
\(Ns_1,Ns_1s_2,\ldots ,Ns_1\cdots s_{G/N}\) is a Hamilton cycle of \(\Gamma (G/N,\{Ns\mid s \in S\})\),

(ii)
\(N = \langle s_1\cdots s_{G/N} \rangle \),
then the Cayley graph \(\Gamma (G,S)\) has a Hamilton cycle.
It turns out that while proving the factor group lemma one can also guarantee some symmetry in the Hamilton cycle obtained. Thus, we state and prove the following compression version of the factor group lemma.
Lemma 6.2
Let G be a group, \(S\subseteq G\) a generating set, \(g \in G\) and \(s\in S\). If there exists a path in the Cayley graph \(\Gamma =\Gamma (G,S)\) from e to gs that intersects every right coset of \(\langle g \rangle \) exactly once, then \(\kappa (\Gamma )\ge {{\,\textrm{ord}\,}}(g)\).
Note that Lemma 6.2 implies Lemma 6.1 by setting \(g:=s_1\cdots s_{G/N}\), yielding a lower bound for the Hamilton compression of \(\kappa (\Gamma (G,S))\ge N\).
Proof
We begin by noting that \(f:G \rightarrow G\) defined by \(f(x)=g x\) is an automorphism of \(\Gamma \). We consider the subgroup \(\langle g \rangle \) generated by g, and we define \(k:={{\,\textrm{ord}\,}}(g)\). By the orbitstabilizer theorem, the number of right cosets of \(\langle g\rangle \) is \(\ell :=G/k\). Let \(P=(x_1,\ldots ,x_\ell )\) be a path in \(\Gamma \) from e to gs that intersects every right coset of \(\langle g\rangle \) exactly once. We claim that the paths \(P,g P,\ldots ,g^{k1}P\) are pairwise vertexdisjoint. Suppose for the sake of contradiction that there exists \(i,j \in \{0,\ldots ,k1\}\), \(i\ne j\), such that \(g^i P \cap g^j P\ne \emptyset \). Then there are \(a,b\in [\ell ]\) such that \(g^i x_a=g^j x_b\), which means that \(x_a\) and \(x_b\) lie in the same coset of \(\langle g\rangle \). As both are on P, we obtain that \(a=b\), and therefore \(i=j\), a contradiction, so the claim is proved. Consequently, we have \(\big \bigcup _{i=0}^{k1} g^i P \big =\ell k=G\). Furthermore, since \(\{g^is,g^i\}\) is an edge of \(\Gamma \) for all \(i \in \{0,\ldots ,k1\}\), we obtain that
is a ksymmetric Hamilton cycle in \(\Gamma \); see Fig. 9. It follows that \(\kappa (\Gamma )\ge k={{\,\textrm{ord}\,}}(g)\). \(\square \)
We can also phrase Lemma 6.2 in the language of graph covers. Let G be a group, \(S\subseteq G\) a generating set, and N a normal subgroup of G. We define the quotient Cayley graph \(\Gamma ^N:= \Gamma (G/N, \{Ns \mid s\in S\})\). The voltage of a cycle \(C = Ns_1,\dots , Ns_1\cdots s_k\) in \(\Gamma ^N\) is given by the product \(s_1\cdots s_k\). A direct application of Lemma 6.2 gives the following lemma.
Lemma 6.3
Let G be a group, \(S \subseteq G\) a generating set, \(\Gamma = \Gamma (G,S)\) its Cayley graph, and N a normal subgroup of G. If there is a Hamilton cycle in \(\Gamma ^N\) with voltage v such that \(\langle v \rangle = N\), then \(\kappa (\Gamma ) \ge N\).
Remark 1
For a group G and a generating set S, automorphisms of \(\Gamma (G,S)\) in the left regular representation of the group are the automorphisms of the form \(x \mapsto gx\) for some \(g\in G\). In particular, note that the automorphisms in Lemma 6.3 are in the left regular representation. Such mappings are automorphisms of \(\Gamma (G,S)\) independently of the generating set S. The same observation holds for mappings \(f:G \rightarrow G\) that satisfy
for all \(x,y \in G\), as they are also automorphisms of \(\Gamma (G,S)\) independently of S. All automorphisms considered in this section are either in the left regular representation or they satisfy (24), so we may assume without loss of generality that the generating set S is inclusionminimal.
6.2 Odd Order
In this section, we consider Cayley graphs of abelian groups G for which the order \(n:=G\) is odd. We will distinguish two regimes: when n is squarefree and when n has a square divisor. Note that when n is squarefree, by Theorem 2.1, G is a direct sum of cyclic groups of prime order, i.e., \(G=\bigoplus _{i=1}^\ell {\mathbb {Z}}_{p_i}\) for distinct odd primes \(p_1,\ldots , p_\ell \). In this case, we say that a generating set \(S\subseteq G\) is canonical if \(S = \{s^1,\dots , s^\ell \}\) and for every \(i,j \in [\ell ]\) we have that \(s_i^j = 0\) if and only if \(i\ne j\). The main result of this section is that, in the odd order case, the Cayley graphs are incompressible if and only if n is composite and squarefree, and S is a canonical generating set.
Theorem 6.4
Let G be an abelian group of odd order n, \(S\subseteq G\) a generating set and \(\Gamma = \Gamma (G,S)\) its Cayley graph.

(i)
If n is composite and squarefree, and S is a canonical generating set, then \(\kappa (\Gamma ) = 1\).

(ii)
Otherwise, there is a prime p in the decomposition of n such that \(\kappa (\Gamma )\ge p\).
A particularly useful lemma in the odd order case is the following.
Lemma 6.5
[3, consequence of Theorem 2.1] Let G be an abelian group of odd order, \(S\subseteq G\) a generating set, and \(\Gamma = \Gamma (G,S)\) its Cayley graph. If C is a cycle in \(\Gamma \), then there are Hamilton cycles \(H_1,\dots , H_r\) in \(\Gamma \) such that \(C = H_1 \mathbin {\triangle }\cdots \mathbin {\triangle }H_r\), i.e., C is the symmetric difference of \(H_1,\ldots ,H_r\).
We are now ready to prove Theorem 6.4.
Proof of Theorem 6.4
We begin by proving (i). Let \(n = p_1 \cdots p_\ell \) with \(p_i\) prime for \(i \in [\ell ]\). By Theorem 2.1, we have that \(G = \bigoplus _{i=1}^\ell \mathbb {Z}{_p{_i}}\). Since S is a canonical generating set, we have that \(S=\{s_1,\dots , s_\ell \}\) with \({{\,\textrm{ord}\,}}(s_i)=p_i\) for every \(i\in [\ell ]\). As a consequence, \(\Gamma = C_{p_1} \Box \cdots \Box C_{p_\ell }\); i.e., \(\Gamma \) is a Cartesian product of prime graphs, i.e., graphs that are not products of two nontrivial graphs. Thus, by [23, Theorem 6.13], the automorphism group of \(\Gamma \) is the product of the automorphism groups of each prime graph, i.e., \({{\,\textrm{Aut}\,}}(\Gamma )\) is the direct product of \(D_{2p_i}\) the dihedral groups of order \(2p_i\) for \(i \in [\ell ]\). Suppose there is a Hamilton cycle C with \(\kappa (C)=m\) for some divisor m of n. Then, C is psymmetric for every prime p dividing m; in particular, there is an \(i\in [\ell ]\) such that C is \(p_i\)symmetric, and there is an automorphism \(f \in {{\,\textrm{Aut}\,}}(\Gamma )\) of order \(p_i\) such that C is finvariant. Since \(\langle s_i \rangle \) is a normal subgroup of \(D_{2p_i}\), it is also a normal subgroup of \({{\,\textrm{Aut}\,}}(\Gamma )\), which implies that \(f(x) = ks_i+x\) for some \(k \in [p_i1]\). Hence, there is a path \(P = x_1, \dots , x_{n/p_i}\) hitting every coset of \(\langle s_i \rangle \) exactly once, and
Thus, there is an edge labelled \(s_i\) or \(s_i\) between \(x_{n/p_{i}}\) and \(ks_i+x_{1}\); i.e., \(x_{n/p_{i}}(ks_i+x_{1})\) equals either \(s_i\) or \(s_i\). However, this would imply that \(x_{n/p_{i}}+ \langle s_i \rangle = x_1+\langle s_i\rangle \), a contradiction.
We now prove part (ii) of the theorem. We consider three subcases.

Case 1: n is prime. In this case, \(\Gamma = C_p\) and, therefore, \(\kappa (\Gamma ) = p\).

Case 2: n is composite and squarefree, S is not canonical. Let \(n = p_1\dots p_\ell \) with \(p_i\) prime for all \(i \in [\ell ]\). Since S is not canonical, there exist an \(s \in S\) of composite order \(p_im\) for some \(i \in [\ell ]\) and \(m \in \mathbb {N}\). Let \(h = ms\), and consider the graph \(\Gamma ^{\langle h \rangle }\). By Lemma 2.10, \(\Gamma \) is 2connected, which implies that there is a cycle containing two vertices that lie in the same coset of \(\langle h\rangle \), and consequently we obtain a cycle C in \(\Gamma ^{\langle h \rangle }\) with nonzero voltage. Additionally, since \(G/\langle h\rangle \) is an abelian group of odd order, by Lemma 6.5, we have that there are r Hamilton cycles \(H_1, \dots , H_r\) in \(\Gamma ^{\langle h \rangle }\) such that \(C = H_1 \mathbin {\triangle }\cdots \mathbin {\triangle }H_r\). Furthermore, since C has nonzero voltage, at least one of \(H_1,\ldots ,H_r\) must have a nonzero voltage. By Lemma 6.3, we conclude that \(\kappa (\Gamma )\ge \langle h \rangle = p_i\).

Case 3: n is divisible by \(p^2\) for some prime p. We may assume without loss of generality that S is inclusionminimal (recall Remark 1). We claim that there exists an element of \(G{\setminus } S\) of order p. Note that a Sylow psubgroup P of G contains either \(\mathbb {Z}_{p^2}\) or \(\mathbb {Z}_{p}^2\) as a subgroup H. In the first case, we take a generator a of H, and we let \(h:=pa\). By the minimality of S, we have that \(h \notin S\). In the second case, we note that \(H=\langle a \rangle \oplus \langle b \rangle \) for some \(a,b \in G\). By the minimality of S, we have that \(\{a,b,a+b\}\not \subseteq S\) and let \(h \in \{a,b,a+b\}{\setminus } S\). Thus, in both cases, we have that \(G/\langle h \rangle \) is an abelian group of odd order, and we can proceed as in case 2 before. \(\square \)
6.3 Even Order
In the previous section, we saw that if G is odd, then the Cayley graph \(\Gamma (G,S)\) has trivial Hamilton compression if and only if G is composite and squarefree, and S is a canonical generating set. The main objective of this section is to show that if G is even, then the Cayley graph for any generating set has nontrivial compression.
Theorem 6.6
Let G be an abelian group and \(S\subseteq G\) a generating set. If \(G\ge 4\) is even, then the Cayley graph \(\Gamma =\Gamma (G,S)\) has compression \(\kappa (\Gamma )\ge 2\).
Proof
If \(G = \langle s \rangle \) for some \(s\in S\), then we have \(\kappa (\Gamma ) = \kappa (C_{G})= G \ge 4\) and the theorem holds. Thus, from now on we assume that \(G\ne \langle s \rangle \) for every \(s\in S\). We begin by noting that S must have an element \(s\in S\) of even order. Furthermore, we may assume without loss of generality that S is inclusionminimal (recall Remark 1). We consider two cases.

Case 1: \({{\,\textrm{ord}\,}}(s)=2\). Let \(S':= S {\setminus } \{s,s\}\). In this case \(G \cong \langle s \rangle \oplus \langle S' \rangle \cong \mathbb {Z}_2 \oplus \langle S' \rangle \), and in the rest of the proof we will write elements of G as pairs w.r.t. this direct sum representation. Theorem 2.8 yields a Hamilton path P in \(\Gamma (\langle S' \rangle , S')\) from 0 to v for some \(v\in \langle S'\rangle \). It follows that \({\hat{P}}:=(0,P)\) is a path in \(\Gamma \) from (0, 0) to (0, v). Let us define a mapping \(f:G \rightarrow G\) by \(f(x,y)=(s+x,vy)\), where \(x\in \langle s\rangle \) and \(y\in \langle S'\rangle \). It is easy to check that f is an automorphism of \(\Gamma \). Furthermore, for every \((x,y),(x',y') \in G\) we have
$$\begin{aligned} f(x',y')+f(x,y)=(xx',y'y)=(x'x,y'y)=(x,y)+(x',y') \end{aligned}$$which implies that (24) holds.
We claim that \(C:={\hat{P}},f({\hat{P}})\) is a 2symmetric Hamilton cycle. Note that \({\hat{P}}\) and \(f({\hat{P}})\) are disjoint paths, as \(V({\hat{P}})=\{0\}\oplus \langle S'\rangle \) and \(V(f({\hat{P}}))=\{g\}\oplus \langle S'\rangle \). The path \({\hat{P}}\) starts at (0, 0) and ends at (0, v), and the path \(f({\hat{P}})\) starts at (g, v) and ends (g, 0), so C is indeed a cycle in \(\Gamma \). Its length is \(2{\hat{P}}=2\langle S'\rangle =G\), so it is a Hamilton cycle. The automorphism f shows that C is 2symmetric, proving that \(\kappa (\Gamma )\ge 2\).

Case 2: \({{\,\textrm{ord}\,}}(s)\ge 4\). Let \(h:= s+s\) and consider the quotient graph \(\Gamma ^{\langle h\rangle }\). Since \(\Gamma ^{\langle h \rangle }\) is the Cayley graph of an abelian group, by Theorem 2.8, it has a Hamilton cycle \(C = x_1 + \langle h \rangle , x_2 + \langle h \rangle ,\dots , x_{n/{{\,\textrm{ord}\,}}(h)}+\langle h \rangle \). We say that an edge is labelled \(+s\) if it is of the form \((x,x+s)\) for some \(x \in G\). Similarly, we say that an edge is labelled \(s\) if it is of the form \((x,xs)\) for some \(x\in G\). Let K be the number of edges in C labelled \(+s\) or \(s\). Since S is minimal, we have that \(K>0\) and, since C is a cycle, we have that K is even. Furthermore, since \(s+\langle h\rangle =s+ \langle h\rangle \), replacing an edge labelled \(+s\) with an edge labelled \(s\) (and vice versa) gives another Hamilton cycle in \(\Gamma ^{\langle h \rangle }\). In particular, for every \(k,\ell \in \mathbb {N}\) such that \(k+\ell = K\), there is a Hamilton cycle \(C^{k,\ell }\) of \(\Gamma ^{\langle h \rangle }\) that uses k edges labelled \(+s\) and \(\ell \) edges labelled \(s\). Since the voltage of \(C^{k,\ell }\) is \((k\ell )s\), there is a Hamilton cycle of \(\Gamma ^{\langle h \rangle }\) with voltage \(s+s\). Thus, by Lemma 6.3, we conclude that \(\kappa (\Gamma ) \ge \langle h \rangle  = \frac{{{\,\textrm{ord}\,}}(s)}{2}\ge 2\). \(\square \)
7 Open Questions
We conclude this paper with a number of interesting open questions.

(Q1)
Can the Gray codes constructed in this paper be computed efficiently? While our proofs translate straightforwardly into algorithms whose running time is polynomial in the size of the graph, a more ambitious goal would be algorithms whose running time per generated vertex is polynomial in the length of the vertex labels (bitstrings, combinations, permutations, etc.). For the cycles in the hypercube with optimal Hamilton compression it should be possible to derive such an algorithm from our construction. For Johnson graphs this should also be possible, as the path guaranteed by Theorem 2.3 is efficiently computable. For permutahedra, this task seems most complicated, as it would require efficiently computing the structures guaranteed by Theorems 2.4 and 2.6, for which no algorithms are known (unlike for Theorem 2.5).

(Q2)
What is the Hamilton compression of the middle levels graph? The best known bounds are \(2n+1\le \kappa (M_{2n+1})\le 2(2n+1)\) (recall Theorem 4.4).

(Q3)
Odd graphs are another interesting class of vertextransitive graphs with unknown Hamilton compression. For any integer \(k\ge 1\), the odd graph \(O_k\) has as vertices all \((2k+1,k)\)combinations, and an edge between any two combinations that have no 1s in common. Note that the odd graph \(O_k\) is the special Kneser graph \(K(2k+1,k)\). Odd graphs \(O_k\), \(k\ge 3\), were shown to have a Hamilton cycle in [35], so \(\kappa (O_k)\ge 1\). Similarly to the middle levels graph, we can use cyclic shifts as the automorphism. It is easy to see that \(\kappa (O_k)\le 2k+1\), and since all necklaces have the same size \(2k+1\), there is hope to build a \((2k+1)\)symmetric Hamilton cycle. We constructed such a solution for \(k=4\), and we indeed conjecture that \(\kappa (O_k)=2k+1\) for all \(k\ge 4\).

(Q4)
What is the Hamilton compression of the associahedron, which has as automorphism group the dihedral group of a regular ngon? For \(n=5,6,7,8\) we determined the values 5, 2, 7, 2 by computer, and we suspect that the primality of n plays a role.

(Q5)
Instead of asking about the largest number \(k=\kappa (G)\) such that \({{\,\textrm{Aut}\,}}(G,C)\) (automorphisms of G that preserve C) contains the cyclic subgroup of order k for some Hamilton cycle C in G, we may ask for the dihedral subgroup of the largest order, which would allow not only for rotations of the drawings but also reflections.

(Q6)
Is there a 1track Hamilton cycle in \(\Pi _n\) (recall Theorem 5.7)? In other words, can all n! permutations be listed by adjacent transpositions so that every column is a cyclic shift of every other column?

(Q7)
Is there a balanced Hamilton cycle in \(\Pi _n\)? In other words, can all n! permutations be listed using each of the \(n1\) adjacent transpositions equally often? Alternatively, can all n! permutations be listed using each of the \(\left( {\begin{array}{c}n\\ 2\end{array}}\right) \) transpositions equally often (see [15])? For \(n=5\), we found orderings satisfying the constraints of both questions.

(Q8)
Is there a balanced Gray code for listing permutations by star transpositions, i.e., transpositions (1, i) for \(i=2,\ldots ,n\)? One idea to build such a code is to use the automorphism f that cyclically leftshifts the last \(n1\) positions, leaving the first position unchanged, and to search any path P from \({{\,\textrm{id}\,}}=123\cdots n\) to a neighbor of \(f({{\,\textrm{id}\,}})=134\ldots n2\) that visits every orbit exactly one. By construction, the cycle \(C:=P,f(P),\ldots ,f^{n2}(P)\) would be balanced. We found such a solution for \(n=6\) with computer help, and we believe it exists for all even \(n\ge 6\) (for odd n there are parity problems, and the Gray code has to be built differently).

(Q9)
An automorphism of a graph in which all orbits have the same size is called semiregular. Marušič [33] asked if every vertextransitive digraph has a semiregular automorphism. This question, independently raised by Jordan [26], is now known as ‘polycirculant conjecture’. It was shown to hold in some special cases, but remains open in general.
Data availability
We do not analyze or generate any datasets, because our work proceeds within a theoretical and mathematical approach.
References
D. L. Applegate, R. E. Bixby, V. Chvátal, and W. J. Cook. The Traveling Salesman Problem: A Computational Study. Princeton University Press, 2006.
B. Alspach. Lifting Hamilton cycles of quotient graphs. Discrete Math., 78(12):25–36, 1989.
B. Alspach, Stephen C. Locke, and D. Witte. The Hamilton spaces of Cayley graphs on abelian groups. Discrete Math., 82(2):113–126, 1990.
G. S. Bhat and C. D. Savage. Balanced Gray codes. Electron. J. Combin., 3(1):Paper 25, 11 pp., 1996.
M. Buck and D. Wiedemann. Gray codes with restricted density. Discrete Math., 48(23):163–171, 1984.
S. J. Curran and J. A. Gallian. Hamiltonian cycles and paths in Cayley graphs and digraphs—a survey. Discrete Math., 156(13):1–18, 1996.
C. C. Chen and N. F. Quimpo. On strongly Hamiltonian abelian group graphs. In Combinatorial mathematics, VIII (Geelong, 1980), volume 884 of Lecture Notes in Math., pages 23–34. Springer, BerlinNew York, 1981.
D. S. Dummit and R. M. Foote. Abstract algebra. John Wiley & Sons, Inc., Hoboken, NJ, third edition, 2004.
S. Du, K. Kutnar, and D. Marušič. Resolving the Hamiltonian problem for vertextransitive graphs of order a product of two primes. Combinatorica, 41(4):507–543, 2021.
M. Deléglise, J.L. Nicolas, and P. Zimmermann. Landau’s function for one million billions. J. Théor. Nombres Bordeaux, 20(3):625–671, 2008.
P. Dusart. Explicit estimates of some functions over primes. Ramanujan J., 45(1):227–251, 2018.
P. Eades, M. Hickey, and R. C. Read. Some Hamilton paths and a minimal change algorithm. J. Assoc. Comput. Mach., 31(1):19–29, 1984.
T. Etzion and K. G. Paterson. Near optimal singletrack Gray codes. IEEE Trans. Inform. Theory, 42(3):779–789, 1996.
Y.Q. Feng. Automorphism groups of Cayley graphs on symmetric groups with generating transposition sets. J. Combin. Theory Ser. B, 96(1):67–72, 2006.
S. Felsner, L. Kleist, T. Mütze, and L. Sering. Rainbow cycles in flip graphs. SIAM J. Discrete Math., 34(1):1–39, 2020.
R. Frucht. A canonical representation of trivalent Hamiltonian graphs. J. Graph Theory, 1(1):45–60, 1977.
A. Ganesan. On the automorphism group of a Johnson graph. Ars Combin., 136:391–396, 2018.
M. R. Garey and D. S. Johnson. Computers and intractability. A Series of Books in the Mathematical Sciences. W. H. Freeman and Co., San Francisco, Calif., 1979. A guide to the theory of NPcompleteness.
R. J. Gould. Updating the Hamiltonian problem—a survey. J. Graph Theory, 15(2):121–157, 1991.
R. J. Gould. Advances on the Hamiltonian problem—a survey. Graphs Combin., 19(1):7–52, 2003.
R. J. Gould. Recent advances on the Hamiltonian problem: Survey III. Graphs Combin., 30(1):1–46, 2014.
F. Gray. Pulse code communication, 1953. March 17, 1953 (filed Nov. 1947). U.S. Patent 2,632,058.
R. Hammack, W. Imrich, and S. Klavžar. Handbook of product graphs. Discrete Mathematics and its Applications (Boca Raton). CRC Press, Boca Raton, FL, second edition, 2011. With a foreword by Peter Winkler.
A. P. Hiltgen, K. G. Paterson, and M. Brandestini. Singletrack Gray codes. IEEE Trans. Inf. Theory, 42(5):1555–1561, 1996.
G. A. Jones. Automorphisms and regular embeddings of merged Johnson graphs. European J. Combin., 26(34):417–435, 2005.
D. Jordan. Eine Symmetrieeigenschaft von Graphen. In Graphentheorie und ihre Anwendungen (Stadt Wehlen, 1988), volume 9 of Dresdner Reihe Forsch., pages 17–20. Päd. Hochsch. Dresden, Dresden, 1988.
K. Kutnar and D. Marušič. Hamilton cycles and paths in vertextransitive graphs—current directions. Discrete Math., 309(17):5491–5500, 2009.
K. Kutnar, D. Marušič, and A. S. Razafimahatratra. Infinite families of vertextransitive graphs with prescribed Hamilton compression. arXiv:2305.09465, 2023.
D. E. Knuth. The Art of Computer Programming. Vol. 4A. Combinatorial Algorithms. Part 1. AddisonWesley, Upper Saddle River, NJ, 2011.
D. Kühn and D. Osthus. A survey on Hamilton cycles in directed graphs. European J. Combin., 33(5):750–766, 2012.
E. Landau. Über die Maximalordnung der Permutationen gegebenen Grades. In Arch. Math. Phys. Ser. 3, volume 5. Teubner, 1903.
L. Lovász. Problem 11. In Combinatorial Structures and Their Applications (Proc. Calgary Internat. Conf., Calgary, AB, 1969). Gordon and Breach, New York, 1970.
D. Marušič. On vertex symmetric digraphs. Discrete Math., 36(1):69–81, 1981.
A. Merino, O. Mička, and T. Mütze, T. On a combinatorial generation problem of Knuth. SIAM J. Comput., 51 (3):379–423, 2022. https://doi.org/10.1137/20M1377394
T. Mütze, J. Nummenpalo, and B. Walczak. Sparse Kneser graphs are Hamiltonian. J. Lond. Math. Soc. (2), 103(4):1253–1275, 2021.
T. Mütze, T. Combinatorial Gray codes–an updated survey. Electron. J. Combin., DS26:93, 2023. https://doi.org/10.37236/11023.
J.L. Nicolas. Calcul de l’ordre maximum d’un élément du groupe symétrique \(S_{n}\). Rev. Francaise Informat. Recherche Opérationnelle, 3(Sér. R2):43–50, 1969.
J.L. Nicolas. Ordre maximal d’un élément du groupe \(S_{n}\) des permutations et “highly composite numbers”. Bull. Soc. Math. France, 97:129–191, 1969.
OEIS Foundation Inc. The OnLine Encyclopedia of Integer Sequences, 2022. http://oeis.org.
I. Pak and R. Radoičić. Hamiltonian paths in Cayley graphs. Discrete Math., 309(17):5501–5508, 2009.
M. Ramras and E. Donovan. The automorphism group of a Johnson graph. SIAM J. Discrete Math., 25(1):267–270, 2011.
F. Ruskey. Adjacent interchange generation of combinations. J. Algorithms, 9(2):162–180, 1988.
C. D. Savage. A survey of combinatorial Gray codes. SIAM Rev., 39(4):605–629, 1997.
M. Schwartz and T. Etzion. The structure of singletrack Gray codes. IEEE Trans. Inform. Theory, 45(7):2383–2396, 1999.
I. Shields, B. Shields, and C. D. Savage. An update on the middle levels problem. Discrete Math., 309(17):5271–5277, 2009.
G. Stachowiak. Hamilton paths in graphs of linear extensions for unions of posets. SIAM J. Discrete Math., 5(2):199–206, 1992.
M. Tchuente. Generation of permutations by graphical exchanges. Ars Combin., 14:115–122, 1982.
D. Tang and C. Liu. Distance\(2\) cyclic chaining of constantweight codes. IEEE Trans. Comput., C22:176–180, 1973.
T. Ueda. Gray codes for necklaces. Discrete Math., 219(13):235–248, 2000.
M. E. Watkins. Connectivity of transitive graphs. J. Combinatorial Theory, 8:23–29, 1970.
D. Witte and J. A. Gallian. A survey: Hamiltonian cycles in Cayley graphs. Discrete Math., 51(3):293–304, 1984.
T. M. Y. Wang and Carla D. Savage. A Gray code for necklaces of fixed density. SIAM J. Discrete Math., 9(4):654–673, 1996.
Acknowledgements
We thank Fedor Petrov for an idea of how to prove Lemma 2.7 (v). We also thank Michal Koucký for an idea that simplified the proof of Lemma 3.2. Furthermore, we sincerely thank both anonymous reviewers for their helpful comments. In particular, one reviewer suggested the current approach for Sect. 6, which solved one of the open problems in the conference version of this paper.
Author information
Authors and Affiliations
Corresponding author
Additional information
Communicated by Gwenaël Joret.
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
An extended abstract of this work appeared in the Proceedings of the 47th International Symposium on Mathematical Foundations of Computer Science (MFCS 2022). This work was supported by Czech Science Foundation grant GA 2215272 S, and by German Science Foundation grant 413902284. Furthermore, Petr Gregor was partially supported by ARRS project P10383, and Arturo Merino was supported by ANID Becas Chile 201972200522.
Appendices
Appendix A. Proof of Lemma 2.7
Proof of Lemma 2.7
For any finite sequence \(\textbf{a}\) of integers, we write \(S(\textbf{a})\) for the sum of its entries. Let x be an entry of \(\textbf{a}\) that has the prime factorization \(x=\Pi _{i=1}^\ell p_i^{e_i}\). Defining \(s:=\sum _{i=1}^\ell p_i^{e_i}\), we clearly have \(x\ge s\) and therefore \(d:=xs\ge 0\). Let \(\textbf{a}'\) be the sequence obtained from \(\textbf{a}\) by replacing the entry x by the subsequence \((p_1^{e_1},\ldots ,p_\ell ^{e_\ell },1^d)\). Observe that
Suppose that \(\textbf{a}\) contains two prime powers \(x=p^a\) and \(x'=p^b\) with \(1\le a\le b\), and let \(\textbf{a}'\) denote the sequence obtained from \(\textbf{a}\) by replacing x by the subsequence \((p,1^d)\) where \(d:={p^ap}\). Then we also have (25). Similarly, let \(\textbf{a}'\) be the sequence obtained from \(\textbf{a}\) by replacing x by the subsequence \(1^x\). Then we also have (25).
Applying these rules exhaustively shows that for any partition \(\textbf{a}\), there is a partition \(\textbf{a}'\) satisfying (25) and the additional conditions stated in (i), so the claim follows from (7). Moreover, for any partition \(\textbf{a}\) into odd parts (i.e., 0 even parts), there is a partition \(\textbf{a}'\) satisfying (25) and the additional conditions stated in (ii), so the claim follows from (9a). Lastly, for any partition \(\textbf{a}\) with \(2,4,6,\ldots \) even parts, there is a partition \(\textbf{a}'\) satisfying (25) and the additional conditions stated in (iii), so the first part of the claim follows from (9b).
It remains to prove that for \(n\ge 12\) the partition as in (iii) has at least 4 parts. For \(n=12,\ldots ,35\) this can be verified by direct computation of the relevant partitions \(\textbf{a}\) for which \({{\,\textrm{lcm}\,}}(\textbf{a})=\lambda _2(n)\). For \(n\ge 36\) we argue as follows: Note that any partition \(\textbf{a}\) of n into 1,2 or 3 parts has \({{\,\textrm{lcm}\,}}(\textbf{a})\le f(n):=\max \{n,n^2/4,n^3/27\}=\Theta (n^3)\). We now identify partitions \(\textbf{a}\) with \(2,4,6,\ldots \) even parts and at least 4 parts in total that satisfy \({{\,\textrm{lcm}\,}}(\textbf{a})>f(n)\), and this construction is split into two cases. First note that any partition \(\textbf{a}\) of \(n8\) can be turned into a partition \(\textbf{a}'\) of n with \(4,6,8,\ldots \) even parts and at least 5 parts in total by inserting either 2, 2, 2, 2 or 2, 2, 2, 1, 1. It follows that \(\lambda _2(n)\ge \lambda (n8)\), and \(\lambda (n8)>f(n)\) holds for \(n=36,\ldots ,675\), which can be shown by using the values of \(\lambda (n)\) tabulated on the OEIS (sequence A000793). For \(n\ge 676\) we argue as follows: There is a partition \(\textbf{a}=(p_1,p_2,p_3,p_4,2,2,1^{n4p_1p_2p_3p_4})\) of n with two even parts and at least 6 parts in total with \({{\,\textrm{lcm}\,}}(\textbf{a})=2 p_1 p_2 p_3 p_4\) obtained as follows: We define \(a_0:=\lfloor (n4)/2\rfloor \) and for \(i=1,\ldots ,4\) we define \(a_i:=\lfloor a_{i1}/2\rfloor \) and let \(p_i\) be a prime number in the interval \( ]a_i,a_{i1}]\), which exists by Bertrand’s postulate. Clearly, we have \(p_1+p_2+p_3+p_4\le (n4)(1/2+1/4+1/8+1/16)\le n4\) and \(p_1 p_2 p_3 p_4\ge a_1 a_2 a_3 a_4=:g(n)=\Theta (n^4)\), and we have \(g(n)>f(n)\) for all \(n\ge 676\) (we also have \(p_4\ge a_4>2\) for those n).
We now prove (iv). Let \(\textbf{a}\) be a partition of n into powers of distinct primes and 1s such that \({{\,\textrm{lcm}\,}}(\textbf{a})=\lambda (n)\). If all entries of \(\textbf{a}\) are odd, then we have \(\lambda _0(n)=\lambda (n)\). If \(\textbf{a}\) contains 2, then replacing 2 by 1, 1 yields a partition \(\textbf{a}'\) into powers of distinct odd primes and 1s that satisfies \({{\,\textrm{lcm}\,}}(\textbf{a}')={{\,\textrm{lcm}\,}}(\textbf{a})/2\), which shows that \(\lambda _0(n)\ge \lambda (n)/2\). If \(\textbf{a}\) contains \(2^c\) for some \(c\ge 2\), then replacing \(2^c\) by \(2^{c1},2^{c1}\) yields a partition \(\textbf{a}'\) into powers of distinct odd primes, two powers of 2 and 1s that satisfies \({{\,\textrm{lcm}\,}}(\textbf{a}')={{\,\textrm{lcm}\,}}(\textbf{a})/2\), which shows that \(\lambda _2(n)\ge \lambda (n)/2\). Combining these three observations proves (iv).
We now prove (v). Consider a partition \(\textbf{a}\) of n into powers of distinct odd primes and 1s such that \({{\,\textrm{lcm}\,}}(\textbf{a})=\lambda _0(n)\). If \(\textbf{a}\) contains a power of 3, then let \(a\ge 1\) be the exponent of 3 in \(\textbf{a}\), otherwise let \(a:=0\). Furthermore, let \(p^e\) be the largest prime power in \(\textbf{a}\). We consider two ways of modifying \(\textbf{a}\). If \(a\ge 2\), we let c be such that \(3^a/3\le 2^c\le 2\cdot 3^a/3\), and then replacing \(3^a\) in \(\textbf{a}\) by \(3^{a1}\), \(2^c\) and 1s yields a partition \(\textbf{a}'\) that satisfies \({{\,\textrm{lcm}\,}}(\textbf{a}')={{\,\textrm{lcm}\,}}(\textbf{a})/3\cdot 2^c\ge 3^{a2}{{\,\textrm{lcm}\,}}(\textbf{a})\), which proves that
Note that this inequality holds trivially also for \(a=0\) and \(a=1\). Now let b and c be such that \(p^e/6\le 3^b\le p^e/2\) and \(p^e/4\le 2^c\le p^e/2\). Replacing \(p^e\) in \(\textbf{a}\) by \(3^b\), \(2^c\) and 1s yields a partition \(\textbf{a}'\) that satisfies \({{\,\textrm{lcm}\,}}(\textbf{a}')={{\,\textrm{lcm}\,}}(\textbf{a})/p^e\cdot 3^{ba}\cdot 2^c\ge p^e 3^{a}/24\cdot {{\,\textrm{lcm}\,}}(\textbf{a})\), which proves that
Multiplying the inequalities (26) and 27 and taking the square root yields
As \(p^e\rightarrow \infty \) as \(n\rightarrow \infty \), we obtain \(\lim _{n\rightarrow \infty }\lambda (n)/\lambda _0(n)=+\infty \). In order to show that \(\lambda (n)/\lambda _0(n)\ge 4\) for \(n\ge 739\), we consider the inequality \(\frac{1}{6\sqrt{6}} p^{e/2}\ge 4\), which can be rearranged to \(p^e\ge 3456=:q\). We consider the set \(\{p_2,p_3,\ldots ,p_{482}\}=\{3,5,\ldots ,3449\}\) of all odd primes with value at most q, and for \(i=2,\ldots ,482\) we let \(e_i\ge 1\) be the largest exponent so that \(p_i^{e_i}\le q\). For example, we have \(e_2=7\), as \(3^7\le q\) but \(3^8>q\), and \(e_3=5\), as \(5^5\le q\) but \(5^6>q\). We also consider the first prime \(p_{483}=3457\) that is larger than q. Clearly, if \(n\ge p_{483}+\sum _{i=2}^{482} p_i^{e_i}=788670=:s\), then for any partition \(\textbf{a}\) of n into powers of distinct odd primes and 1s such that \({{\,\textrm{lcm}\,}}(\textbf{a})=\lambda _0(n)\) we must have \(p^e\ge q\). Indeed, if we restrict the partition to using only distinct powers of primes that are at most q, then the partition would contain more than \(p_{483}\) many 1s, and those could be replaced by the prime \(p_{483}\), yielding a better partition, which is a contradiction. We now show that \(\lambda (n)/\lambda _0(n)\ge 4\) for \(n=739,\ldots ,s1\), and this is done in two steps. Let \(\textbf{a}\) be a partition of n into powers of distinct primes and 1s such that \({{\,\textrm{lcm}\,}}(\textbf{a})=\lambda (n)\). If \(\textbf{a}\) contains \(2^c\) for some \(c\ge 1\), then we have
Using one of the algorithms from [10, 37], we can compute \(\lambda (n)\) for all \(n<s\). From (28) we can then compute exact values for \(\lambda _0(n)\) for about half of all values of \(n<s\), and for the remaining ones we can compute upper bounds via \(\lambda _0(n)\le \lambda _0(n+1)\). Doing this shows that \(\lambda (n)/\lambda _0(n)\ge 4\) for all \(n=4507,\ldots ,s1\). For the remaining values \(n=739,\ldots ,4506\) we can use a simple dynamic program to compute \(\lambda _0(n)\) exactly, verifying that \(\lambda (n)/\lambda _0(n)\ge 4\).
Consider a partition \(\textbf{a}\) of n into powers of distinct primes and 1s such that \({{\,\textrm{lcm}\,}}(\textbf{a})=\lambda (n)\). By a similar replacement argument as before, we can argue that for all large enough n the partition \(\textbf{a}\) must contain \(2^c\) for some \(c\ge 2\). Replacing \(2^c\), by \(2^{c1}\), 2 and 1s, yields a partition \(\textbf{a}'\) with two even parts that satisfies \({{\,\textrm{lcm}\,}}(\textbf{a}')={{\,\textrm{lcm}\,}}(\textbf{a})/2\). We obtain that \(\lambda _2(n)\ge \lambda (n)/2\), i.e., \(\lambda (n)/\lambda _2(n)\le 2\) for all large enough n. This argument can be made effective for \(n\ge 78\) (again by verifying a finite number of small cases with computer help). For the remaining cases \(n=18,\ldots ,77\) the inequality \(\lambda (n)/\lambda _2(n)\le 2\) can be verified by direct computation. This proves the first part of (v). The second part of (v) is an immediate consequence of the first part.
It remains to prove (vi). Nicolas [38] showed that there are arbitrarily long intervals where \(\lambda (n)\) is constant. Let \([n,n+\ell ]\) be such an interval of length \(\ell +1\ge 3\), i.e., we have \(\lambda (n)=\lambda (n+i)\) for all \(i=0,\ldots ,\ell \). All numbers \(\lambda (n+i)\) have the same prime factorization, so the corresponding partition \(\textbf{a}_i\) of \(n+i\) into distinct prime powers and 1s with \({{\,\textrm{lcm}\,}}(\textbf{a}_i)=\lambda (n+i)\) and \(S(\textbf{a})=n+i\) has at least i many 1s. Moreover, this partition must contain a positive power of 2, otherwise we could replace 1, 1 in \(\textbf{a}_2\) by 2, yielding a partition \(\textbf{a}_2'\) with \({{\,\textrm{lcm}\,}}(\textbf{a}_2')>{{\,\textrm{lcm}\,}}(\textbf{a}_2)\), which is impossible. Consequently, replacing 1, 1 in \(\textbf{a}_i\) by 2 for \(i=2,\ldots ,\ell \) yields a partition \(\textbf{a}_i'\) with two even parts satisfying \({{\,\textrm{lcm}\,}}(\textbf{a}_i')={{\,\textrm{lcm}\,}}(\textbf{a}_i)\) and therefore \(\lambda _2(n+i)=\lambda (n+i)\) holds for all \(i=2,\ldots ,\ell \).
This completes the proof of the lemma. \(\square \)
Appendix B. Proof of Lemma 4.7
To prove Lemma 4.7, we need the following notation. For integers \(a\le b\), we write \([a,b]:=\{a,a+1,\ldots ,b\}\). Furthermore, we write \(p_i\) for the ith prime number, i.e., \(p_1=2\), \(p_2=3\), \(p_3=5\) etc. We use the following numbertheoretic properties about the integers sieved by the first r primes.
Lemma B.1
For any \(r\ge 1\) consider the set \(S_r:=\{p_1,\ldots ,p_r\}\) of the first r prime numbers. The numbers from \({\mathbb {Z}}\) that are divisible by at least one of the primes from \(S_r\) form maximal intervals whose lengths are in \(\{p_i2\mid i=2,\ldots ,r+1\}\), and the intervals of maximum length \(p_{r+1}2\) are exactly \(I_c:=[2,(p_{r+1}1)]+c\cdot p_1\cdots p_r\) and \(I_c':=[(p_{r+1}1),2]+c\cdot p_1\cdots p_r\) for any \(c\in {\mathbb {Z}}\).
Furthermore, for any prime number \(p_{r+1}\) we have for all \(j=0,\ldots ,p_{r+1}p_r2\) that every prime factor of \(j+2\) is also a factor of \(p_{r+1}1j\).
Lemma B.1 can be proved by straightforward induction on r; we omit the details.
Proof of Lemma 4.7
The proof uses the following two basic numbertheoretic facts about integers \(a,b\in {\mathbb {Z}}\) and \(r\ge 1\):

(i)
a and b are coprime if and only if a and \(ab\) are coprime.

(ii)
if \(b<p_{r+1}\), then a and b are coprime if and only if \(a+p_1\cdots p_r\) and b are coprime.
From (i) we see that q and \(\ell \) are coprime for all \(\ell =k(nq),\ldots ,k\) if and only if q and \(\ell '\) are coprime for all \(\ell '=k'(nq),\ldots ,k'\) where \(k':=nk\). Consequently, it suffices to prove the lemma for \(n\ge 2k\).
We argue by induction on k. If n and k are coprime, then the integer \(q:=n\) satisfies the conditions of the lemma. In particular, the lemma holds whenever \(k=1\), which settles the base case for the induction. For the induction step we consider some fixed value of \(k\ge 2\), and we prove that the lemma holds for this fixed k and all \(n\ge 2k\).
Let r be such that \(p_r\le k<p_{r+1}\), and define \(S_r:=\{p_1,\ldots ,p_r\}\) and \(d:=p_{r+1}k\). We consider all k numbers \(q_i=ni\), where \(i=0,\ldots ,k1\), which satisfy the requirement \(q_i=ni>\max \{k,nk\}=nk\), and we need to show that for some \(i\in \{0,\ldots ,k1\}\), the number \(q_i\) is coprime to all numbers in the set \(L_i:=[k(nq_i),k]=[ki,k]\) (note that \(L_i=i+1\)).
If \(q_i\) is not coprime some number in \(L_i\), then as \(\max L_i=k<p_{r+1}\), the number \(q_i\) is divisible by a prime from \(S_r\). We have to rule out that this happens to \(q_i\) for all \(i=0,\ldots ,k1\) simultaneously. For the sake of contradiction suppose that it does happen, then we have found an interval \([q_{k1},q_0]\) of k integers that are all divisible by at least one of the primes from \(S_r\). By the first part of Lemma B.1, the possible intervals of such numbers have lengths in \(\{p_i2\mid i=2,\ldots ,r+1\}\), and all those lengths except \(p_{r+1}2\) are strictly less than k (since \(k\ge p_r\)). Furthermore, if \(d=1\), i.e., \(k=p_{r+1}1\), then we also have \(p_{r+1}2<k\), i.e., we arrived at a contradiction.
It remains to investigate the situation where the interval \([q_{k1},q_0]\) is contained in an interval of length \(p_{r+1}2\) and \(d\ge 2\). By the first part of Lemma B.1 this must be an interval \(I_c\) or \(I_c'\) as defined in the lemma for some \(c\in {\mathbb {Z}}\). If the interval \([q_{k1},q_0]\) is contained in \(I_c\), then \(q_0=\max I_cj\) for some \(j\in \{0,\ldots ,d2\}\). For the following investigations about coprimality, we can set \(c:=0\) by (ii). Using the definition of \(I_0\), we obtain
The corresponding sets \(L_i\) are
We aim to show that there is a \(q_i\) coprime to all elements of \(L_i\) for some \(i\in \{0,\ldots ,d2j\}\). To prove this, we use (i) and consider the sets \(L_i':=q_iL_i\), which are
The fact that one of the \(q_i\), \(i\in \{0,\ldots ,d2j\}\), is coprime to all elements of \(L_i'\) now follows by induction for \(k':=dj1\), observing that
where the estimate \(p_{r+1}\le 2p_r\) follows from Bertrand’s postulate.
It remains to consider the case that \([q_{k1},q_0]\) is contained in the interval \(I_c'\). In this case we have \(q_0=\max I_c'j\) for some \(j\in \{0,\ldots ,d2\}\), and again we can set \(c:=0\) by (ii). The sets \(L_i\) are as in (30), and using the definition of \(I_0'\), the numbers \(q_i=:q_i'\) are now
Comparing (29) and (31), we see that we can apply the second part of Lemma B.1 (as \(d2\le p_{r+1}p_r2\)), which shows that every prime factor of \(q_i'\) is also a factor of \(q_i\). We have already demonstrated that one of the \(q_i\) in (29) is coprime to all numbers in \(L_i\), so this implies that \(q_i'\) is also coprime to all numbers in \(L_i\). This completes the proof of the lemma. \(\square \)
Figure 10 shows the function \(nq(n,k)\), with q(n, k) as defined after Lemma 4.7. The white squares correspond to \(nq(n,k)=0\), i.e., these are the cases when n and k are coprime, yielding optimal compression.
Appendix C. Values of \(\lambda (n)\), \(\lambda _0(n)\) and \(\lambda _2(n)\) for \(n=1,\ldots ,140\)
See Table 2.
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.
About this article
Cite this article
Gregor, P., Merino, A. & Mütze, T. The Hamilton Compression of Highly Symmetric Graphs. Ann. Comb. (2023). https://doi.org/10.1007/s0002602300674y
Received:
Accepted:
Published:
DOI: https://doi.org/10.1007/s0002602300674y