1 Introduction

figure a

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 2-symmetric, as the drawing has 2-fold (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 k-symmetric 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

$$\begin{aligned} C=P,f(P),f^2(P),\ldots ,f^{k-1}(P) \quad \text {for the path} \quad P:=(x_1,\ldots ,x_{n/k}). \end{aligned}$$
(1)

The idea is that the entire cycle C can be reconstructed from the path P, which contains only a 1/k-fraction 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 k-fold 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 k-symmetric as the compression factor of C, and we denote it by \(\kappa (G,C)\).

Fig. 1
figure 1

Hamilton cycles \(C_1,\ldots ,C_4\) in the 4-permutahedron \(\Pi _4\) with different LCF sequences and compression factors

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 3-regular 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 3-regular Hamiltonian graph by considering one of its Hamilton cycles \(C=(x_1,\ldots ,x_n)\). Each vertex \(x_i\) has the neighbors \(x_{i-1}\) and \(x_{i+1}\) (modulo n) in the graph, plus a third neighbor \(x_j\), which is \(d_i:=j-i\) (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 k-symmetric, then the LCF sequence d of G is k-periodic, i.e., it has the form \(d=(d_1,\ldots ,d_{n/k})^k\), where the k in the exponent denotes k-fold repetition; see Fig. 1. While LCF notation is only defined for 3-regular 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_{i-1}\) and \(x_{i+1}\); see Fig. 2a+d. As before, if C is k-symmetric, then the corresponding sequence D is k-periodic, 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.’

Fig. 2
figure 2

Symmetric Hamilton cycles in the a 4-cube; b middle levels of the 5-cube; c Johnson graph \(J_{7,2}\); d abelian Cayley graph \(({\mathbb {Z}}_5^2,\{(0,1),(1,0)\})\)

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

$$\begin{aligned} \kappa (G):=\max \big \{\kappa (G,C)\mid C \text { is a Hamilton cycle in}~G\big \}, \end{aligned}$$
(2)

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 k-symmetric under the chosen automorphism. Specifically, proving a lower bound of \(\kappa (G)\ge k\) amounts to finding an automorphism f of G and a k-symmetric Hamilton cycle under this f. To prove an upper bound of \(\kappa (G)<k\), we need to argue that there is no k-symmetric 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

$$\begin{aligned} \kappa (G)\le \max _{f\in {{\,\textrm{Aut}\,}}(G)}{{\,\textrm{ord}\,}}(f), \end{aligned}$$
(3)

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 1-symmetric, 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

Vertex-transitive graphs are a prime example of highly symmetric graphs. A graph is vertex-transitive 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 vertex-transitive 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.11.4. The n-dimensional hypercube \(Q_n\), or n-cube 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 n-permutahedron \(\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 one-line 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 non-trivial small compression factor, and we construct cycles with much higher compression factor that we show to be optimal or near-optimal. Along the way, many interesting number-theoretic and algebraic phenomena arise.

1.5.1 Hypercubes

One of the classical constructions of a Hamilton cycle in \(Q_n\) is the well-known 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 _{n-1}\); see Figs. 2a and 4a. In words, the cycle \(\Gamma _n\) is obtained by concatenating the vertices of \(\Gamma _{n-1}\) prefixed by 0 with the vertices of \(\Gamma _{n-1}\) 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 well-known 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 left-shift 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})=(1-o(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 _{n-1}\) by replacing each permutation of length \(n-1\) 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 Chen-Quimpo 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 non-trivial compression. In particular, we show that toroidal grids \({\mathbb {Z}}_p\times {\mathbb {Z}}_q\) for two distinct odd primes pq 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 well-known question of Lovász’ [32] asks whether there are infinitely many vertex-transitive 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. Vertex-transitive 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 vertex-transitive graphs G with \(\kappa (G)=0\)?’ More generally, we may ask: ‘Are there infinitely many vertex-transitive graphs G with \(\kappa (G)=k\), for each fixed integer k?’ We may ask the same question more restrictively for Cayley graphs or non-Cayley 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 follow-up 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 non-Cayley graphs and \(k=1\).

Fig. 3
figure 3

One of the smallest vertex-transitive non-Cayley graphs G with \(\kappa (G)=1\)

Computer experiments show that the smallest vertex-transitive non-Cayley 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).

Fig. 4
figure 4

Symmetric Hamilton cycles in \(Q_8\). Cycles are on the left (0 = white, 1 = black), with the first and last bit on the inner and outer track, respectively. The full graph \(Q_8\) is on the right, with vertices arranged in cycle order and edges drawn as straight lines. a Binary reflected Gray code \(\Gamma _8\) with compression 4; b Hamilton cycle with compression 8 from Theorem 3.7 (h is complementation of the first bit and \(Q=\Gamma _4\)); c 2-track Hamilton cycle with compression 8 from Theorem 3.9 (\(h=g\) and \(Q=\Gamma _4'\), i.e., \(\Gamma _4\) with every bitstring reversed)

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 t-track 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 Gray-coded 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 1-track 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 1-track cycle of length \(2^n-2n\), and Schwartz and Etzion [44] subsequently showed that the length \(2^n-2n\) is best possible. Taken together, these results show that there is no 1-track Hamilton cycle in \(Q_n\) for any \(n\ge 3\).

We complement this negative result by constructing a 2-track 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 t-track 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 1-track Hamilton cycles that are also balanced (Theorem 4.5), i.e., each bit is flipped equally often (cf. [4, 15]).

We also construct a 1-track 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 1-track 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. 36, 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 follow-up 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 well-known 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 one-line 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 (uv) 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

$$\begin{aligned} (P,v):=\big ((u_1,v),(u_2,v),\ldots ,(u_r,v)\big ). \end{aligned}$$
(4a)

Furthermore, for a path \(Q=(v_1,\ldots ,v_s)\) in H, where s is even, we define

(4b)

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

$$\begin{aligned} f(x_1\cdots x_n)=x_{\pi (1)}\cdots x_{\pi (n)}+z \end{aligned}$$
(5)

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 right-hand side denotes the direct product.

2.3 Johnson Graphs and Relatives

For integers \(n>k>0\), an (nk)-combination is a bitstring of length n with Hamming weight k. Recall that the Johnson graph \(J_{n,k}\) has as vertices all (nk)-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 \(n-1>k>1\), there is a path in \(J_{n,k}\) from \(1^k0^{n-k}\) to \(1^{k-1}010^{n-k-1}\) 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 Hamilton-laceable). 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

$$\begin{aligned} (\alpha , \pi )(x_1\cdots x_n)=\pi (x_{\alpha (1)})\cdots \pi (x_{\alpha (n)}), \end{aligned}$$
(6)

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

$$\begin{aligned} (\alpha ,\pi )(\beta ,\rho )(x)=\beta (\alpha x\pi )\rho =(\alpha \beta )x(\pi \rho )=(\alpha \beta ,\pi \rho )(x), \end{aligned}$$

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\}=\{n-2,1,1\}\).

Table 1 First 20 values of \(\lambda (n)\), \(\lambda _0(n)\) and \(\lambda _2(n)\)

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

$$\begin{aligned} \lambda (n)=\max _{a_1+\cdots +a_m=n} {{\,\textrm{lcm}\,}}(a_1,\ldots ,a_m), \end{aligned}$$
(7)

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

$$\begin{aligned} \lambda (n)=e^{(1+o(1))\sqrt{n\ln n}}. \end{aligned}$$
(8)

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

$$\begin{aligned} \lambda _0(n)&:=\max _{\begin{array}{c} a_1+\cdots +a_m=n \\ e(a_1,\ldots ,a_m)=0 \end{array}} {{\,\textrm{lcm}\,}}(a_1,\ldots ,a_m), \end{aligned}$$
(9a)
$$\begin{aligned} \lambda _2(n)&:=\max _{\begin{array}{c} a_1+\cdots +a_m=n \\ e(a_1,\ldots ,a_m)\in \{2,4,6,\ldots \} \end{array}} {{\,\textrm{lcm}\,}}(a_1,\ldots ,a_m). \end{aligned}$$
(9b)

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:

  1. (i)

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

  2. (ii)

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

  3. (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.

  4. (iv)

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

  5. (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\).

  6. (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 Hamilton-connected if for any two vertices there is a Hamilton path starting and ending at these two vertices. Similarly, a bipartite graph is called Hamilton-laceable 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:

  1. (i)

    If \(\Gamma \) is bipartite, then \(\Gamma \) is Hamilton-laceable.

  2. (ii)

    If \(\Gamma \) is not bipartite, then \(\Gamma \) is Hamilton-connected.

We will also need the fact that Cayley graphs are highly connected.

Lemma 2.10

[50, Theorem 3]. If \(\Gamma \) is a connected d-regular Cayley graph, then the vertex-connectivity 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 t-track 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 4-fold rotational symmetry.

Proof

For \(n=2\) the graph \(Q_2\) is a 4-cycle, 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

(10)

and

(11)

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 4-cycle. On the other hand, if \(x_i\) and \(x_{i+1}\) differ in one of the first two bits, then \(S_i\) is a 4-cycle. 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 k-symmetric Hamilton cycle, then \(k=2^i<2n\) for some i.

Proof

Consider an automorphism f of \(Q_n\) and a path P such that

$$\begin{aligned} C=P,f(P),f^2(P),\ldots ,f^{k-1}(P) \end{aligned}$$
(12)

is a k-symmetric 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^{i-1}>2\). As \(|P|=2^{n-i}\) 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

$$\begin{aligned} g(x_1 x_2 \cdots x_n)=x_2 \cdots x_n\overline{x_1}, \end{aligned}$$
(13)

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

$$\begin{aligned} u \circ v:=u_1 v_1 u_2 v_2 \ldots u_n v_n, \end{aligned}$$
(14)

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

$$\begin{aligned} g^{2i}(u \circ v)&= g^i(u) \circ g^i(v), \end{aligned}$$
(15a)
$$\begin{aligned} g^{2i+1}(u \circ v)&= g^i(v) \circ g^{i+1}(u) \end{aligned}$$
(15b)

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

$$\begin{aligned} R_2&:= \{00\}, \end{aligned}$$
(16a)
$$\begin{aligned} R_{2n}&:= \{g^k(u) \circ v \mid u,v\in R_n \text { and } 0\le k <n\}. \end{aligned}$$
(16b)

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

$$\begin{aligned} g^j(x)=g^{2i}(g^k(u) \circ v)=g^{k+i}(u)\circ g^i(v), \end{aligned}$$

which equals \(y=g^{k'}(u')\circ v'\) only if

$$\begin{aligned} g^{k+i}(u)=g^{k'}(u')\text { and }g^i(v)=v'. \end{aligned}$$

By the induction hypothesis, this holds only if

$$\begin{aligned} u=u',\ k+i=k' \bmod 2n,\text { and } v=v',\ i=0, \end{aligned}$$

equivalently, \(x=y\) and \(j=0\).

Similarly, if \(j=2i+1\) where \(0\le i <2n\) then from (15b) we have

$$\begin{aligned} g^j(x)=g^{2i+1}(g^k(u) \circ v)=g^{i}(v)\circ g^{k+i+1}(u), \end{aligned}$$

which equals \(y=g^{k'}(u')\circ v'\) only if

$$\begin{aligned} g^{i}(v)=g^{k'}(u')\text { and }g^{k+i+1}(u)=v'. \end{aligned}$$

By the induction hypothesis, this holds only if

$$\begin{aligned} v=u',\ i=k' \bmod 2n,\text { and } u=v',\ k+i+1=0 \bmod 2n. \end{aligned}$$

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^{n-r-1}\) 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^{n-r-1}\). Indeed from (16) we have \(|R_2|=1=2^{n-r-1}\) for \(r=1\) and

$$\begin{aligned} |R_{2n}|&= |R_n|^2\cdot n=(2^{n-r-1})^2\cdot 2^r=2^{2n-(r+1)-1} \end{aligned}$$

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^{n-2}10\).

Proof

For \(r=2\), we set \(P_4:=(0000,0010)\). It is straightforward to verify from (16) that \(0^n,0^{n-2}10 \in R_n\). Note that \(g^2\) is an automorphism of \(Q_n\) with orbits of size n, and \(0^{n-2}10\) is adjacent in \(Q_n\) to \(g^2(0^n)=0^{n-2}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

$$\begin{aligned} P'&:=P_n,g^2(P_n),\ldots ,g^{n-2}(P_n), \end{aligned}$$
(17a)
$$\begin{aligned} P''&:=g(P_n),g^3(P_n),\ldots ,g^{n-1}(P_n) \end{aligned}$$
(17b)

are vertex-disjoint paths in \(Q_n\) that start in \(0^{n}\) and \(0^{n-1}1\), respectively. Consider the path

(18)

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^{n-r-1}\) 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^{n-2}10\) and starts in \(0^{n-1}1 \circ 0^{n-2}10\). Observe furthermore that \(P_{2n}\) starts in \(0^n \circ 0^n=0^{2n}\) and ends in \(0^{n-1}1\circ 0^n=0^{2n-2}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

$$\begin{aligned} P'&= P_4, \quad \,\, g^2(P_4) = (0000,0010,0011,1011), \\ P''&=g(P_4),g^3(P_4) =(0001,0101,0111,0110) \end{aligned}$$

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^{n-2}10\) of \(P_n\) is not adjacent to \(g(0^n)=0^{n-1}1\) in \(Q_n\), so \(P_n\) with g does not directly produce a 2n-symmetric Hamilton cycle in \(Q_n\) (recall (1)). However, in the following, we show that \(P_n\) can produce a 2n-symmetric 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 k-symmetric Hamilton cycle

$$\begin{aligned} C:=P \sqcup Q,f(P \sqcup Q),f^2(P \sqcup Q),\ldots ,f^{k-1}(P \sqcup Q) \end{aligned}$$
(19)

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 (uv) and \((u',v')\) from the set

$$\begin{aligned} A:=R \times V(H) = \{(u,v) \mid u\in R, v\in V(H)\} \end{aligned}$$

and any \(0\le i,i' <k\) we have that \(f^i(u,v)=f^{i'}(u',v')\) only if

$$\begin{aligned} g^i(u)=g^{i'}(u') \text { and } h^i(v)=h^{i'}(v'), \end{aligned}$$

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

$$\begin{aligned} |A|=|R|\cdot |V(H)|=|V(G)|/k\cdot |V(H)|=|V(G\Box H)|/k, \end{aligned}$$

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 (uv), ends in (uh(v)), and it contains exactly the vertices of A. Furthermore, (uh(v)) is adjacent to \(f(u,v)=(g(u),h(v))\), so C defined in (19) is a k-symmetric 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 2n-symmetric Hamilton cycle.

The 8-symmetric 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^{n-1}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^{m-1}\); 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 2n-symmetric 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 4-cycle, 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:=n-2^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 t-Track Gray Codes

Recall the definition of t-track Hamilton cycles given in Sect. 1.6.2. As discussed before, there is no 1-track Hamilton cycle in \(Q_n\). We now provide a construction of a 2-track 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 2n-symmetric Hamilton cycle in \(Q_{n+m}\) that has 2 tracks.

The 2-track 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^{m-1}1\) we can take the listing \(\Gamma _m'\) obtained from the BRGC \(\Gamma _m\) by reversing every bitstring. In this way, we obtain a 2n-symmetric 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 t-track 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_{t-1})=(2^{s_1},\ldots ,2^{s_{t-1}})\), where \(r,t\ge 2\) and \(r\ge s_1\ge \cdots \ge s_{t-1}\ge 0\), there is a 2n-symmetric Hamilton cycle in \(Q_{n+m_1+\cdots +m_{t-1}}\) 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_{t-1}}\) that complements the first bit and then cyclically shifts groups of bits of sizes \(m_1,\ldots ,m_{t-1}\), each group one position to the left, and using any Hamilton path in \(Q_{m_1+\cdots +m_{t-1}}\) between \(v:=0^{m_1,\ldots ,m_{t-1}}\) and \(h(v)=0^{m_1-1}10^{m_2,\ldots ,m_{t-1}}\). \(\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 1-symmetric 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 1-track 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 left-shifts the remaining five bits by one position, and then complements all bits. A 10-symmetric 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\).

Fig. 5
figure 5

Symmetric Hamilton cycles in the middle levels graph \(M_7\): a A solution to Knuth’s problem with compression 7 for f being cyclic left-shift; b Hamilton cycle with compression 10 for f being left-shift of the last 5 bits and complementation of all bits

4.3 A Near-Optimal 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 n-symmetric 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=n-1\), 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 \(n-1>k>1\).

We use the automorphism f that cyclically left-shifts 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^{n-k}\) to \(y:=1^{k-1}010^{n-k-1}\). Note that y is adjacent to \(f(x)=1^{k-1}0^{n-k}1\). Consequently, \(C:=P,f(P),f^2(P),\ldots ,f^{n-1}(P)\) is an n-symmetric 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 1-track property. This immediately implies that every bit is flipped equally often. \(\square \)

Fig. 6
figure 6

Symmetric Hamilton cycles in Johnson graphs: a balanced 1-track Hamilton cycle in \(J_{11,3}\) with compression \(n=11\); the automorphism left-shifts all n bits; b 4-track Hamilton cycle in \(J_{10,4}\) with compression \(q=7\); the automorphism left-shifts the first q bits

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 \(n-q\) 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,n-k\}\) and q and \(\ell \) are coprime for all \(\ell =k-(n-q),\ldots ,k\). Then, \(J_{n,k}\) has a q-symmetric Hamilton cycle that has \(1+n-q\) tracks.

The number of tracks could be reduced to at most \(1+\lfloor \log _2(n-q+1)\rfloor \) tracks with the help of Theorem 3.10.

Proof

Let \(r:=n-q\). We use the automorphism f that cyclically left-shifts 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,n-k\}\), every (nk)-combination has both 0-bits and 1-bits among the first q bits, and as q and \(\ell \) are coprime for all \(\ell =k-r,\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 1-bits among the first q positions. Specifically, for \(\ell =k-r,\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=n-k+1\)), or \(\ell =k\) and \(q=k+1\) the sequence \(R_\ell \) is just the single vertex \(10^{q-1}\) 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

$$\begin{aligned} P:=R_1 x_1,R_2 x_2,\ldots ,R_{N-1}x_{N-1}R_N'x_N \end{aligned}$$

where \(R_i:=R_\ell \) with \(\ell :={k-w(x_i)}\) for \(i=1,\ldots ,N-1\), and \(R_N'\) is obtained from \(R_\ell \), \(\ell :=k-w(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 ,N-1\) 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^{q-k}x_1=1^k0^{q-k}0^r\) and as \(w(x_N)=1\) the last vertex of P is \(y:=01^{k-2}0^{q-k}1x_N\), i.e., y is connected to \(f(x)=1^{k-1}0^{q-k}10^r\).

We conclude that \(C:=P,f(P),f^2(P),\ldots ,f^{q-1}(P)\) is a q-symmetric 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+n-q\). \(\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,n-k\}\) and q and \(\ell \) are coprime for all \(\ell =k-(n-q),\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-(n-q),\ldots ,k\). However, as the integers contain arbitrarily long intervals of non-primes, 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 number-theoretic reasoning, so we defer it to the appendix. For \(n>k>0\) we write q(nk) for the largest integer q satisfying the conditions of Lemma 4.7. The function \(n-q(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:

  1. (i)

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

  2. (ii)

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

  3. (iii)

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

  4. (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})=(1-o(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 (1-o(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.42.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 near-optimal lower bound construction. Lastly, we apply our constructions to derive a balanced 1-track 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

$$\begin{aligned} \kappa (\Pi _n,\Lambda _n)={\left\{ \begin{array}{ll} 6 &{} n=3,4, \\ 3 &{} n\ge 5. \end{array}\right. } \end{aligned}$$

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 6-fold or 3-fold rotational symmetry. While the latter might seem to have 6-fold 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 6-cycle, and the automorphism \(f=(\alpha ,\pi )\) of \(\Pi _3\) with \(\alpha ={{\,\textrm{rev}\,}}\) and \(\pi =231\) shows that it is 6-symmetric (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 6-symmetric.

Note that \(f^2=({{\,\textrm{id}\,}},3124)\) is another automorphism of \(\Pi _4\), which shows that \(\Lambda _4\) is 3-symmetric, and we will now generalize this automorphism to show that \(\Lambda _n\), \(n\ge 5\), has compression at least 3. Note that \((n-1)!/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: \(n-1\) 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,n-1,\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 non-adjacent 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^{k-1}(P)\) is a k-symmetric 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 Near-Optimal 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}^{i-1}a_j\). So \(f_i:=(b_i+1,\ldots ,b_i+a_i)\) is a cyclic permutation of \(A_i\). Its \((|A_i|-1)!\) 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.,

$$\begin{aligned} f_\textbf{a}:=({{\,\textrm{id}\,}},f_1 f_2 \cdots f_m). \end{aligned}$$
(20)

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).

  1. (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)
  2. (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_2-1}(x)\}\) defined by \(X_2^0:=\{f_2^{2i}(x)\mid i=0,\ldots ,(a_2-2)/2\}\) and \(X_2^1:=\{f_2^{2i-1}(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

$$\begin{aligned} {\textstyle \left( {\begin{array}{c}[n]\\ \textbf{a}\end{array}}\right) }=\{11222,12122,12212,12221,21122,21212,21221,22112,22121,22211\}, \end{aligned}$$

\(O(f_1)=\{\{12,21\}\}\) and \(O(f_2)=\{\{345,453,534\},\{543,435,354\}\}\) and hence the orbits of \(f_\textbf{a}\) are

$$\begin{aligned}{} & {} \Big \{u\otimes \big (\{12,21\}\times \{345,453,534\}\big ) \mid u\in {\textstyle \left( {\begin{array}{c}[n]\\ \textbf{a}\end{array}}\right) } \Big \} \\{} & {} \quad \cup \; \Big \{u\otimes \big (\{12,21\}\times \{543,435,354\}\big ) \mid u\in {\textstyle \left( {\begin{array}{c}[n]\\ \textbf{a}\end{array}}\right) } \Big \}. \end{aligned}$$

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).

  1. (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.

  2. (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_{n-1}\}\). By Theorem 2.4, there is a Hamilton path P in \(\Pi _{n-1}\) from \(x:=1\cdots (n-1)\) to \(y:=2\cdots (n-1)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 (n-1)1n\), which is adjacent to \(f_\textbf{a}({{\,\textrm{id}\,}})=2\cdots (n-1)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^{n-2}\). 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 ,n-1\}}\}\). 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 ,n-1\}}\) from \(x:=34\cdots (n-1)\) to \(y:=435\cdots (n-1)\) and from \(y':=435\ldots (n-1)\) to \(x':=4\cdots (n-1)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 (n-1)3n\), which is adjacent to \(f_\textbf{a}({{\,\textrm{id}\,}})=214\cdots (n-1)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_{m-1})\) and \(n':=n-a_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

$$\begin{aligned} O(f_m)=\{\langle xn \rangle _{f_m} \mid x\in S_{\{n'+1,\ldots ,n-1\}}\}=\{\langle (n'+2)x\rangle _{f_m} \mid x\in S_{\{n'+1,n'+3,\ldots ,n\}}\}. \end{aligned}$$

By Theorem 2.4, there is a Hamilton path P in \(\Pi _{\{n'+1,\cdots ,n-1\}}\) from \(x:=(n'+1)\cdots (n-1)\) to \(y:=(n'+2)(n'+1)(n'+3)\ldots (n-1)\) 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

(23)

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

  1. (i)

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

  2. (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 k-symmetric Hamilton cycle for \(f_\textbf{a}\) for \(k:={{\,\textrm{lcm}\,}}(\textbf{a})\).

The 5-symmetric Hamilton cycle in \(\Pi _5\) obtained from Theorem 5.5 (i) for \(\textbf{a}=(5)\) is illustrated in Fig. 7b.

Fig. 7
figure 7

Symmetric Hamilton cycles in \(\Pi _5\) (1=red, 2=orange, 3=yellow, 4=green, 5=blue): a Steinhaus–Johnson–Trotter cycle \(\Lambda _5\) with compression 3; b cycle with compression 5 from Theorem 5.5 for \(f=({{\,\textrm{id}\,}},23451)\); c cycle with compression 10 for \(f=({{\,\textrm{rev}\,}},23451)\)

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 m-tuple 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

$$\begin{aligned} Q,f_\textbf{a}(Q),\ldots ,f_\textbf{a}^{k-1}(Q) \end{aligned}$$

is a k-symmetric 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,

$$\begin{aligned} P,f_\textbf{a}(P),\ldots ,f_\textbf{a}^{k-1}(P) \end{aligned}$$

is a k-symmetric 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 \((n-2,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,

$$\begin{aligned} P,f_\textbf{a}(P),\ldots ,f_\textbf{a}^{k-1}(P) \end{aligned}$$

is a k-symmetric 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 k-symmetric Hamilton cycle in \(\Pi _n\). This completes the proof. \(\square \)

Combining our previous results, we obtain the following near-optimal 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:

  1. (i)

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

  2. (ii)

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

  3. (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)\).

  4. (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.

  5. (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 10-symmetric 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 k-symmetric 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 k-symmetric 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 1-Track 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 n-symmetric Hamilton cycle in \(\Pi _n^+\) that has 1 track and is balanced, i.e., each of the n transpositions is used equally often (\((n-1)!\) many times). The Hamilton cycle in \(\Pi _5^+\) obtained from Theorem 5.7 is illustrated in Fig. 8.

Fig. 8
figure 8

Balanced 1-track Hamilton cycle in \(\Pi _5^+\) with compression 5 from Theorem 5.7 (cyclically adjacent transpositions)

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 _{n-1}\) from \(x:=1\cdots (n-1)\) to \(y:=2\cdots (n-1)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 (n-1)1n\), which is adjacent to \(f({{\,\textrm{id}\,}})=2\cdots (n-1)n1\) by a transposition of the last two entries. Consequently, \(C:=P,f(P),f^2(P),\cdots ,f^{n-1}(P)\) is an n-symmetric 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 1-track property. Lastly, note that if P applies a transposition \((i,i+1)\), then this becomes a transposition \((i-j,i+1-j)\) (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 well-known 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 so-called 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

  1. (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\})\),

  2. (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 orbit-stabilizer 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^{k-1}P\) are pairwise vertex-disjoint. Suppose for the sake of contradiction that there exists \(i,j \in \{0,\ldots ,k-1\}\), \(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}^{k-1} g^i P \big |=\ell k=|G|\). Furthermore, since \(\{g^is,g^i\}\) is an edge of \(\Gamma \) for all \(i \in \{0,\ldots ,k-1\}\), we obtain that

$$\begin{aligned} C:=P,f(P),\ldots , f^{k-1}(P)=P,g P,\ldots ,g^{k-1}P \end{aligned}$$

is a k-symmetric Hamilton cycle in \(\Gamma \); see Fig. 9. It follows that \(\kappa (\Gamma )\ge k={{\,\textrm{ord}\,}}(g)\). \(\square \)

Fig. 9
figure 9

Illustration of the proof of Lemma 6.2

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

$$\begin{aligned} f(y)^{-1}f(x)=x^{-1}y \end{aligned}$$
(24)

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 inclusion-minimal.

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 square-free and when n has a square divisor. Note that when n is square-free, 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 square-free, 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.

  1. (i)

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

  2. (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 non-trivial 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 p-symmetric 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 f-invariant. 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_i-1]\). Hence, there is a path \(P = x_1, \dots , x_{n/p_i}\) hitting every coset of \(\langle s_i \rangle \) exactly once, and

$$\begin{aligned} C = P,f(P), \dots , f^{p_i-1}(P). \end{aligned}$$

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 square-free, 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 2-connected, 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 inclusion-minimal (recall Remark 1). We claim that there exists an element of \(G{\setminus } S\) of order p. Note that a Sylow p-subgroup 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 square-free, 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 non-trivial 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 inclusion-minimal (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,v-y)\), 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)=(x-x',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 2-symmetric 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 (gv) 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 2-symmetric, 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,x-s)\) 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.

  1. (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).

  2. (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).

  3. (Q3)

    Odd graphs are another interesting class of vertex-transitive 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\).

  4. (Q4)

    What is the Hamilton compression of the associahedron, which has as automorphism group the dihedral group of a regular n-gon? 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.

  5. (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.

  6. (Q6)

    Is there a 1-track 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?

  7. (Q7)

    Is there a balanced Hamilton cycle in \(\Pi _n\)? In other words, can all n! permutations be listed using each of the \(n-1\) 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.

  8. (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 left-shifts the last \(n-1\) 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^{n-2}(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).

  9. (Q9)

    An automorphism of a graph in which all orbits have the same size is called semiregular. Marušič [33] asked if every vertex-transitive 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.