The spurs of D. H. Lehmer

Consider the graph with all permutations of a symbol sequence as vertices, where two permutations are connected by an edge when they differ by an interchange of two distinct adjacent symbols. In 1965, D. H. Lehmer conjectured that all vertices in this graph can be visited by a Hamiltonian path that is possibly imperfect, in the sense of having spurs. Such a spur visits a vertex twice, with a single vertex in-between. We prove Lehmer’s conjecture for binary permutations that involve only two distinct symbols. For general symbol sequences, we identify the stutter permutations as candidate spur tips, and prove that the non-stutter permutations admit a disjoint cycle cover. We also provide new (simpler) proofs for some known results.


Introduction
Consider a finite bag (multiset) of n (n ≥ 1) natural numbers, serving as symbols, where the symbol i occurs k i times; thus, n = ∞ i=0 k i .We denote this bag by B(k 0 , k 1 , . ..), and call the tuple (k 0 , k 1 , . ..) its signature.We omit trailing k i = 0.The number of non-zero k i is called the arity.An example for n = 4 is B(1, 2, 1) = [ 0, 1, 1, 2 ]; it is ternary.A permutation of such a bag is a way of putting the symbols in a sequence.The twelve permutations of B(1, 2, 1) are the vertices of the graph in Fig. 1.
Two permutations are related by a neighbor swap when they can be obtained from each other by swapping (interchanging) two distinct adjacent symbols.We denote this relation by ∼.The neighbor-swap graph of B(k 0 , k 1 , . ..) has all permutations of B(k 0 , k 1 , . ..) as vertices, where two permutations are connected by an edge when they are related by a neighbor swap.Figure 1 shows the neighbor-swap graph for B(1, 2, 1), and Fig. 2 for B(2, 1, 2).Note that neighbor-swap graphs whose signatures are a permutation of each other are isomorphic.
We are interested in finding a path along the edges of the neighbor-swap graph visiting each vertex exactly once.Such a path is known as a Hamiltonian path.If the start and end vertex of the path are also connected by a graph edge (not appearing in the path), then we speak of a Hamiltonian cycle.
Generation of permutations in such a minimum-change order is relevant, because it minimizes energy consumption in hardware and maximizes the ability to reuse results cached while processing previously generated permutations [6, §7.2].This has for instance applications in cryptology.In [13], we explain how we encountered this problem in the context of choreographing a line dance, where each symbol corresponds to the color of an outfit.
If no Hamiltonian path exists, then we can relax the constraints somewhat.One such relaxation is a maximal path (or cycle) without duplicates, that is, a path that visits a maximal number of vertices exactly once, such that the unvisited vertices are at minimum distance from the path.An unvisited vertex u at distance 1 can be visited by sidestepping from a vertex v on the path to u and then immediately back again to v.In the resulting path, v occurs twice, with only u in-between.In [8], Lehmer calls such a sidestep to an unvisited vertex at distance 1 a spur (see Fig. 3), and a Hamiltonian path extended with spurs that visits all vertices he called an imperfect Hamiltonian path.We will call it a Lehmer path: Definition 1 A Lehmer path (cycle) in a graph is a path (cycle), possibly with single spurs, that visits the spur bases twice and all other vertices once.

Conjecture 2 Every neighbor-swap graph admits a Lehmer path.
Another relevant relaxation is to find a (vertex-)disjoint cycle cover, that is, a set of vertexdisjoint simple cycles that visit all permutations exactly once.
In Sect.2, we review the known results.The condition for existence of a Hamiltonian path (i.e., without spurs) is presented in Sect.3, together with a new proof of its necessity, based on stutter permutations.In Sect.4, we prove Lehmer's conjecture for the binary case, including a new proof for the known case where a Hamiltonian path exists.Finally, Sect. 5 addresses the general case, proving the existence of a disjoint cycle cover, and Sect.6 concludes the article.

Known results
The special case where symbols occur just once, corresponds to permutations of a set.Its neighbor-swap graph is also known as a permutohedron.In this case, there exists a Hamiltonian path for every n, and even a Hamiltonian cycle if n ≥ 3 [3,5,10].Apparently, 17th-century change ringers were already aware of this [1] and [6, §7.2.1.2].
The special case of arity two (n = k 0 + k 1 ) corresponds to combinations, or permutations of a bit string, or k 0 -subsets of an n-element set.In [2], this problem is partly solved: a Hamiltonian path exists precisely when either it is trivial (a k i equals 0 or 1), or n is even and both k i are odd.A more efficient algorithm to construct a Hamiltonian path, when it exists, is given in [4].An alternative construction is presented in [12].
The general case (ternary or larger arity) was partly solved in [7,9].In [7] it was shown that for a Hamiltonian path to exist it is necessary that the signature has at least two odd k i .And in [9], a construction for a Hamiltonian path is presented when the signature has at least two odd k i .This is summarized in Theorem 3 There exists a Hamiltonian path in the neighbor-swap graph of B(k 0 , k 1 , . ..) precisely when either it is linear (consists of one path), or when at least two k i are odd.
In fact, [9] even presents a Hamiltonian cycle for all those cases, except for signatures of the form (2k, 1, 1) or a permutation thereof, which are shown not to admit a Hamiltonian cycle.
That leaves the case where the signature has fewer than two odd k i , and no Hamiltonian path exists.In Sect.4, we prove this for the binary case, and in Sect. 5 we prove the existence of a disjoint cycle cover.

Condition for Hamiltonian path and its necessity
In this section, we provide a new elementary proof that the condition in Theorem 3 is necessary.To that end, we will partition the vertices of the neighbor-swap graph into even and odd vertices, such that edges only connect an even vertex with an odd vertex (i.e., the neighbor-swap graph is bipartite).Hence, on every path, even and odd vertices alternate.If the difference between the number of even and odd vertices exceeds one, then there cannot exist a Hamiltonian path.In fact, we give a closed formula for that difference in Theorem 4 below (it is the proof of this theorem that is new).
Let M(k 0 , k 1 , . ..) be the number of permutations of B(k 0 , k 1 , . ..), then where the right-hand side is the multinomial coefficient defined by Thus, the neighbor-swap graph consists of a single vertex, precisely when all except at most one k i are zero.Also observe that the neighbor-swap graph is linear exactly when its signature is binary and at least one k i = 1.
An inversion in a permutation of B(k 0 , k 1 , . ..) is defined as a pair of (not necessarily adjacent) symbols in the permutation occurring out of order, that is, where the symbol occurring on the left exceeds (in value) the symbol occurring on the right.Thus, the number of inversions in the permutation 2 1 1 0 is five, because out of the six pairs all except the pair 1 1 are out of order.
The parity of a permutation is defined as the parity of its number of inversions.The number of inversions of a permutation changes by exactly one, when two distinct adjacent elements are swapped.Thus, neighboring permutations differ in parity.Observe that the graphs in Figs. 1 and 2 are organized such that the vertices appear in columns, where the number of inversions increases from left to right.In the first graph, there are six even and six odd vertices, while the second graph has 16 even and 14 odd vertices (also see Fig. 4, where the vertices are colored by parity).Hence, the second graph definitely does not admit a Hamiltonian path.
Let D(k 0 , k 1 , . ..) be the number of even permutations minus the number of odd permutations of B(k 0 , k 1 , . ..).Below, we give a new proof for Theorem 4 where ÷ denotes division without remainder.To conclude the proof of necessity in Theorem 3, note that D(k 0 , k 1 , . ..) equals 1 when at most one k i is odd and M(k 0 ÷ 2, k 1 ÷ 2, . ..) = 1.This boils down to either (i) a singleton graph (all except at most one k i equal 0), or (ii) one k i = 1, another k i is even and positive, and all others equal 0. In the latter case, the graph is linear.
To define S(k 0 , k 1 , . ..), we consider the elements of a permutation to be indexed from the left, starting at index 1.There are two kinds of adjacent element pairs, depending on the parity of the index of the left element.Here, we focus on adjacent pairs whose left index is odd, in short, referred to as lio pairs.Lio pairs do not overlap, and look like this:

Definition 5
We call a permutation a stutter permutation when all lio pairs consist of two equal elements, that is, when the element at index 2 j equals the element at index 2 j − 1, for all relevant j.
Hence, a stutter permutation has the form a a b b . . .y y, possibly with a trailing single z.For example, 2 2 1 1 0 is a stutter permutation, but 2 1 1 0 is not.Now define S(k 0 , k 1 , . ..) as the set of stutter permutations in Π(k 0 , k 1 , . ..), and N (k 0 , k 1 , . ..) as the set of non-stutter permutations in Π(k 0 , k 1 , . ..): 123 Observe that a stutter permutation is even, since all out-of-order pairs occur in even bunches due to the stuttering.Next, we define a 1-1 correspondence between the even and odd permutations in N (k 0 , k 1 , . ..).Note that all permutations with n < 2 are stutter permutations; so, N (k 0 , k 1 , . ..) = ∅.Consider a non-stutter permutation, hence n ≥ 2. Because it is a nonstutter permutation, there is a lio pair whose elements differ.This permutation is now coupled to the one obtained by swapping the elements in, say, the leftmost lio pair whose elements differ.That new permutation is also a non-stutter permutation and it has the opposite parity.See Fig. 4 for an example of this correspondence.Conclusion: Finally, in a stutter permutation, all symbols, except at most one, occur an even number of times.Therefore, when two or more k i are odd, there are no stutter permutations, and thus S(k 0 , k 1 , . ..) is empty.When at most one k i is odd, S(k 0 , k 1 , . ..) is non-empty.To determine its size, coalesce each lio pair into a single element, and drop a possibly trailing single element (which always is the same symbol).You now see that the size of This completes the proof of Theorem 4.
For later use, we present some properties related to stutter permutations in the following lemma.
Lemma 6 1.The number of odd permutations never exceeds the number of even permutations.

The number of non-stutter permutations is even.
3. There are no stutter permutations when the signature has two or more odd k i .4. There is exactly one stutter permutation when the signature is unary, or when it is binary and one k i = 1 and the other is even, that is, when the graph is linear.

A stutter permutation of arity two or more is at distance 1 (in the neighbor-swap graph)
from a non-stutter permutation.

The distance (in the neighbor-swap graph) between two distinct stutter permutations is a multiple of 4.
Theorem 7 To prove Conjecture 2, it suffices to prove the existence of a Hamiltonian path (or cycle) on all non-stutter permutations.
Proof of Theorem 7 Assume we have a Hamiltonian path (cycle) on all non-stutter permutations.The stutter permutations, being at distance 1 from that path (Lemma 6.5), can serve as spur tips in a Lehmer path (cycle).These spurs are single, since their tips are a multiple of 4 apart (Lemma 6.6), and the distance between the tips of higher-order spurs is only 2 (also see Fig. 3).
We now strengthen Conjecture 2 and generalize Theorem 3: Conjecture 8 For every neighbor-swap graph, the subgraph consisting of its non-stutter permutations admits a Hamiltonian path.Furthermore, there even exists a Hamiltonian cycle on the non-stutter permutations, except when 1. the signature arity is zero or one, or 2. the signature is binary, and at least one of the k i is odd, or 3. the signature is a permutation of (2k, 1, 1).
A Hamiltonian cycle is impossible in the indicated cases, because 1. the graph is a singleton; 2. at least one of the permutations 0 k 0 1 k 1 and 1 k 1 0 k 0 is a non-stutter permutation, and it has only one neighbor; 3. the edges 0 i 120 j ∼ 0 i 210 j , for 0 ≤ i, j and i + j = k 0 , form a disconnecting set, and there is an odd number of them (a Hamiltonian cycle would need to cross over an even number of times between the two components connected by these edges; in one component 1 precedes 2 in all its permutations, and in the other 2 precedes 1).
Note that if there is only one stutter permutation (Lemma 6.2). then the graph is linear and the stutter permutation can in fact be incorporated into the path.

Proof of the binary case
We prove the binary case of Conjecture 8 (see Theorem 9 below for a precise formulation).We could focus on the missing part only, where at least one k i is even.However, it turns out that the odd-odd case can be incorporated into the induction nicely, thanks to the generalization.We distinguish three cases: odd-even (Sect.4.2), even-even (Sect.4.3), and oddodd (Sect.4.4).Before diving into the details, it helps the induction to strengthen the theorem a bit further, as follows.

Theorem 9
The neighbor-swap graph of binary (i.e., of arity 2) non-stutter permutations admits a Hamiltonian path.If k 0 and k 1 are both even, then there exists a Hamiltonian cycle.Moreover, we have: 1.The path for the odd-even case (k 0 , k 1 ) can run between Note that this path cannot avoid the edge 2. The cycle for the even-even case (k 0 , k 1 ) can include these two specific edges (the underlined bits in the middle are swapped): Observe that the involved vertices are indeed in N (k 0 , k 1 ).We prove Theorem 9 by strong induction on n = k 0 + k 1 (the length of the permutations) with k 0 , k 1 ≥ 1.The induction hypothesis is that the theorem holds for all smaller values of n.There is no need for a separate base case (in a way, the cases (1, k 1 ) act as base case, because their reduction involves another argument than just the induction hypothesis; they are trivial anyway because these graphs are linear).

Preliminary definition and lemma
We recall a definition and lemma (without proof) from [9].

The odd-even case
Without loss of generality, we may assume that k 0 ≥ 1 is odd and k 1 ≥ 2 even.Split the graph into two parts, based on the trailing bit of each permutation: where V • w denotes the set { vw | v ∈ V } (Fig. 5).Observe that Π(k 0 , k 1 − 1) is now an odd-odd case without stutter permutations, and Π(k 0 − 1, k 1 ) an even-even case.Hence, for the (non-)stutter permutations of Π(k 0 , k 1 ) we have The induction hypothesis gives us a Hamiltonian path Thus, H • 1 and C • 0 together visit all vertices of N (k 0 , k 1 ) exactly once.Note that edge b1 ∼ c1 is parallel to edge d0 ∼ e0, in the sense that edges b1 ∼ d0 and c1 ∼ e0 exist (swap the trailing two bits): Using Lemma 11, the path H • 1 and cycle C • 0 can now be combined as This completes the proof for the odd-even case.

The even-even case
Assuming that both k i ≥ 2 are even, split the graph into two parts, based on the trailing bit of each permutation (Fig. 6): Observe that Π(k 0 , k 1 − 1) is now an even-odd case and Π(k 0 − 1, k 1 ) an odd-even case, and for the (non-)stutter permutations of Π(k 0 , k 1 ) we have The induction hypothesis gives us (remember that we need to interchange the role of 0 and 1 to get an odd-even case), and -a Hamiltonian path including the unavoidable edge (6) d ∼ e with e = 0 k 0 −2 101 k 1 −1 .
Thus, H • 1 and H • 0 visit all vertices of N (k 0 , k 1 ) exactly once.Because of the edges c1 ∼ d0 and f 0 ∼ a1 (swap the trailing two bits): we can combine H •1 and H •0 into a single Hamiltonian cycle for N (k 0 , k 1 ), which moreover includes the required specific edges (7) and ( 8): This completes the proof for the even-even case.

The odd-odd case
Let both k i be odd.Since the cases where one of the k i = 1 are trivial (linear graph), we assume k i ≥ 3. We split the graph into four parts, based on the trailing two bits of each permutation (Fig. 7): Observe that Π(k 0 , k 1 − 2) and Π(k 0 − 2, k 1 ) are now odd-odd cases and Π(k 0 − 1, k 1 − 1) is an even-even case.There are no stutter permutations in Π(k 0 , k 1 ), but there are in Π(k 0 − 1, k 1 − 1).So, we have to incorporate those somehow.For that we need to look in more detail at Π(k 0 − 1, k 1 − 1).First, let us deal with the easier parts.The induction hypothesis gives us -a Hamiltonian path Note that we have the edges c01 ∼ b11 and d10 ∼ e00 between these parts (swap underlined bits): The two cycles C • 01 and C • 10 are isomorphic and parallel, and can incorporate the stutter permutations N (k 0 −1, k 1 , −1)•{ 01, 10 } as spurs.These two spurred cycles can be combined into one cycle, since the length of C is even (Lemma 6.2).The following lemma states this in general terms.

Lemma 12 Two parallel cycles of even length and parallel single spurs can be combined into one cycle. Furthermore, we can select a specific edge of a cycle without spurs to appear in the combined cycle.
Proof See Fig. 8.The two cycles can be combined into one cycle by using all cross edges, alternating up and down.This works because the cycle has an even length.The spurs are incorporated by replacing the cross edge at its base with the edge to the neighboring spur tip, its cross edge, and the edge back to the corresponding neighbor in the other cycle.Note that of each cycle (without spurs), every other edge is included in the combined cycle, such that no parallel edges are present.Thus, there are two versions, depending on which edge is selected at the start.
Unfortunately, this cycle for Π(k 0 − 1, k 1 − 1) • { 01, 10 } cannot be combined easily with the two paths to form a path for Π(k 0 , k 1 ).We need to look into the structure of the two isomorphic even-even parts.They can be split further based on two more trailing bits (see Fig. 9).This reveals two parallel even-even subparts for (k 0 − 1, k 1 − 3) on the left, four doubly parallel odd-odd subparts for (k 0 − 2, k 1 − 2) in the middle, and two more parallel even-even subparts for (k 0 − 3, k 1 − 1).
The stutter permutations are in the even-even subparts.The two cycles for (k 0 − 1, k 1 − 3) can be combined with the stutter permutations as spurs according to Lemma 12.The same applies to the two cycles for (k 0 − 3, k 1 − 1).Note these permutations u01, c 01, v10, and d 10: Permutations u01 and v10 are on the even-even cycles, and they are not at the base of a spur.If k 1 = 3, then u is a stutter permutation itself.Similarly, if k 0 = 3, then v is a stutter permutation.In those cases, the even-even subpart consists of one permutation only, and will be incorporated like the double cycle in other cases.According to Lemma 12, we can cover We now focus on the four doubly parallel paths for the odd-odd subparts: They can easily be combined into one cycle, but we need a path from c01 to d10, such that the two Hamiltonian cycles can be combined with it.To achieve this combination, we will see to it that this path will contain the edges c 01 ∼ c 10 and d 10 ∼ d 01, which are parallel to the edges on the cycles mentioned above.The four paths have even length (Lemma 6.2). Figure 10 shows how isomorphic modules of length 2 can be used to walk from c01 to w.This module can be repeated, closing off with the module from w to d10.It is also clear that the desired edges c 01 ∼ c 10 and d 10 ∼ d 01 are on the combined path.
This completes the proof for the odd-odd case, and of Theorem 9.

5 The general case
Since [9] solved the general case when at least two k i are odd, only the case of arity three or more with at most one odd k i remains.In that case, there are (at least two) stutter permutations.We will prove a somewhat weaker result that looks like a promising step towards proving Conjecture 8.

Theorem 13
When the arity is at least 3 and at most one k i is odd, the neighbor-swap graph of non-stutter permutations admits a disjoint cycle cover, that is, a set of vertex-disjoint cycles that visit all permutations exactly once.
To prove Conjecture 8, it now suffices to show that these cycles have suitable parallel edges.Experimental evidence shows an abundance of choices for cycles and such edges.
For instance, our proof below constructs a cover for the 90 permutations of Π(2, 2, 2) with 6 cycles, where these cycles have 16 pairs of parallel edges.We prove Theorem 13 by strong induction on n, distinguishing the cases all-even (Sect.5.1) and all-but-one-even (Sect.5.2), where the latter has one special case: (even, 2, 1), handled in Sect.5.3, which in turn involves the cases (even, 1, 1) in Sect.5.4 and (odd, 2, 1) in Sect.5.5.The induction hypothesis is that the theorem holds for all smaller n.Let k be the arity (number of non-zero k i ).

The all-even case
Split the graph based on the trailing two symbols x and y of each permutation.There are two cases, depending on whether the two trailing symbols are equal.
-Case x = y: This gives rise to k subgraphs with an all-even signature of arity k or k − 1.
These have the stutter permutations of the original graph.The induction hypothesis gives us a disjoint cycle cover for the non-stutter permutations of each of these subgraphs.-Case x = y: This gives rise to k 2 pairs of subgraphs of arity k that have exactly two odd k i .They have no stutter permutations.According to [9], each admits at least a Hamiltonian path (in fact, a cycle, except in the case of (even, 1, 1)).Of each pair, one subgraph has permutations ending in x y, the other ending in yx.Hence, they are isomorphic and parallel.Thus, the two paths can be combined into one Hamiltonian cycle for the pair.
All these cycles together form a disjoint cycle cover of the non-stutter permutations.This completes the proof of the all-even case.

The all-but-one-even case, not (even, 2, 1)
Split the graph based on the trailing symbol x of each permutation.There are two cases, depending on the parity of k x (how often x occurs).
-Case k x is odd: This gives rise to one subgraph with all-even signature of arity k or k − 1.This has the stutter permutations of the original graph.The induction hypothesis (or Theorem 9 if the arity dropped to 2) gives us a disjoint cycle cover for the non-stutter permutations of this subgraph.-Case k x is even: This gives rise to k − 1 subgraphs with arity k and exactly two odd k i .
According to [9], each admits a Hamiltonian cycle, except when its signature is a permutation of (even, 1, 1).This happens when the original graph has a signature that is a permutation of (even, 2, 1).This actually happens twice in case of (2, 2, 1).We deal with the case (even, 2, 1) in Sect.5.3.All these cycles together form a disjoint cycle cover of the non-stutter permutations.This completes the proof of the all-but-one-even case, except for (even, 2, 1).

The special case (even, 2, 1)
In [11], a non-inductive construction is given for a Hamiltonian cycle on the non-stutter permutations of (even, 2, 1).We now present a simpler construction, that uses inductive constructions of special Hamiltonian paths for (even, 1, 1) and (odd, 2, 1).
As previously in Sect.5.2, we split the graph based on the trailing symbol x.There are three cases (also see Fig. 11): -Case x = 0: This leads to a subgraph with signature (odd, 2, 1), having no stutter permutations.It may admit a Hamiltonian cycle, but we will show in Sect.5.5 that there is also a Hamiltonian path from a = 120 k 0 −1 1 to b = 0210 k 0 −2 1. -Case x = 1: This leads to a subgraph with signature (even, 1, 1), having no stutter permutations.It admits a Hamiltonian path from c = 120 k 0 to d = 0210 k 0 −1 , which we will exhibit in Sect.5.4.-Case x = 2: This leads to a subgraph with signature (even, 2), contributing all stutter permutations.It admits a Hamiltonian cycle on the non-stutter permutations according to Theorem 9.
Note that in the original graph, we have the edges a0 ∼ c1 and b0 ∼ d1: So, the paths for x = 0 and x = 1 can be connected into one cycle.In its turn, this new cycle can be glued with the cycle for x = 2.This completes the case (even, 2, 1).

The special case (odd, 2, 1)
Although a Hamiltonian path is known to exist for Π(odd, 2, 1), we want a path from a = 120 k 0 1 to b = 0210 k 0 −1 1, in order to solve (even, 2, 1).We split Π(odd, 2, 1) according to the trailing one or two symbols (Fig. 12, left): -Case 00: This yields a subgraph with signature (odd, 2, 1).By the induction hypothesis, we have a Hamiltonian path from a = 120 The first is a linear subgraph with signature (odd, 1).The second concerns a subgraph with signature (odd, 1, 1).For their union, there is a Hamiltonian path from a to b.The construction is similar to the one for (even, 1, 1) presented in Sect.5.4.This path is shown in the back right of Fig. 12, and also to the far right.
The resulting cycles and paths can be combined, through appropriate parallel edges (there are many choices that work), into the desired path for Π(odd, 2, 1) from a to b.
This completes the proof of special case (odd, 2, 1), and of Theorem 13.

Conclusion
Fifty years ago in [8], D. H. Lehmer conjectured that the neighbor-swap graph on permutations of any symbol (number) sequence admits a Lehmer path, that is, it admits an 'imperfect' Hamiltonian path possibly involving spurs.
Our main contribution is the insight that the stutter permutations can serve as the spur tips.This allowed us to reformulate the conjecture in terms of the existence of a Hamiltonian path on the set of non-stutter permutations (Conjecture 8), since each stutter permutation is at distance 1 from a non-stutter permutation.These stutter permutations also allowed us to present a more elegant proof of the necessary condition for the existence of Hamiltonian paths in the general case.
We have presented a proof for Lehmer's conjecture in case of binary sequences involving just two symbols.That is, the set of non-stutter permutations of a binary sequence admits a Hamiltonian path.For the general case (ternary or higher arity), we proved the existence of a disjoint cycle cover on the set of non-stutter permutations.The part of our new conjecture that remains open is that the neighbor-swap graph on the non-stutter permutations of any sequence of arity at least three with at most one odd frequency k i admits a Hamiltonian cycle.
Our inductive approach to the general case looks promising since there are actually many choices for disjoint cycle covers and the cycles have many parallel edges.To glue the cycles of our disjoint cycle cover into a single Hamiltonian cycle, careful attention is needed for administrative details about the presence of parallel edges among the cycles.
It should be noted that the approach of [9], based on linearizations of posets, does not work for the set of non-stutter permutations, since in general this set is not equal to the set of linearizations of some poset.However, another structure than posets might well be the key.Our approach possibly also opens the door for a new proof of the case with two or more odd frequencies.
We implemented and tested our constructions in Mathematica [14].

Fig. 3
Fig. 3 Path with four spurs; at A and C there are single spurs, at B a double spur

Definition 10
Given four distinct vertices a, b, c, and d in a graph, edge a ∼ b is said to be parallel to edge c ∼ d when also edges a ∼ c and b ∼ d exist.The latter edges are called cross edges.We call two isomorphic subgraphs parallel when all the corresponding edges are parallel.

Fig. 5 Lemma 11
Fig.5 How the odd-even case splits, based on the trailing bit, with a path H , cycle C, and five special vertices a1, b1, c1, d0, and e0, all defined in the text and H • 1 is already a Hamiltonian path for N (k 0 , k 1 ).Now assume k 0 ≥ 3; hence, k 0 − 1, k 1 ≥ 2. Then the induction hypothesis gives us a Hamiltonian cycle C for N (k 0 − 1, k 1 ) that includes the edge (8) between d

Fig. 6
Fig.6 How the even-even case splits, based on the trailing bit, with two paths H and H , and six special vertices a1, b1, c1, d0, e0, and f 0, all defined in the text

Fig. 7 Fig. 8
Fig.7How the odd-odd case splits, based on the trailing two bits; the two even-even parts are isomorphic and parallel (by swapping the trailing two bits), with two paths H and H , two cycles C, and six special vertices a11, b11, c01, d10, e00, and f 00, all defined in the text

Fig. 12
Fig. 12 On the left Π(3, 2, 1) split according to trailing symbols (see text); on the right Π(3, 1, 1) • 1 ∪ Π(3, 1) • 12 with special vertices marked k 0 −2 1 to b = 0210 k 0 −3 1.It is shown in the front left of Fig. 12. -Case 20 and 02: These are two isomorphic and parallel subgraphs with signature (even, 2).They include stutter permutations.Theorem 9 gives us a Hamiltonian cycle on the non-stutter permutations, and by Lemma 12 these cycles can be combined with the stutter permutations, into a single cycle without duplicates.They are shown at the top front of Fig. 12. -Case 10: This yields a subgraph with signature (even, 1, 1).From Sect.5.4 we obtain a Hamiltonian path from c to d , that can be connected to Π(odd, 1, 1) • 00 via edges a and b , to yield a cycle.It is shown at the bottom center of Fig. 12. -Cases 12 and 1: