5
European Journal of Combinatorics 27 (2006) 801–805 www.elsevier.com/locate/ejc Hamiltonicity of digraphs for universal cycles of permutations Garth Isaak Department of Mathematics, Lehigh University, Bethlehem, PA 18015, United States Received 21 October 2004; accepted 19 May 2005 Available online 11 July 2005 Abstract The digraphs P (n, k ) have vertices corresponding to length k permutations of an n set and arcs corresponding to (k + 1) permutations. Answering a question of Starling, Klerlein, Kier and Carr we show that these digraphs are Hamiltonian for k n 3. We do this using restricted Eulerian cycles and the fact that P (n, k ) is nearly the line digraph of P (n, k 1). We also show that the digraphs P (n, n 2) are not Hamiltonian for n 4 using a result of Rankin on Cayley digraphs. © 2005 Elsevier Ltd. All rights reserved. 1. Introduction For 1 k < n let P (n, k ) be the digraph with vertices corresponding to k permutations of [n]={1, 2,..., n} and arcs corresponding to k + 1 permutations of [n]. The arc corresponding to σ 1 σ 2 ...σ k σ k+1 is 1 2 ,...,σ k ) 2 3 ,...,σ k k+1 ). Our aim is to show that P (n, k ) contains a directed Hamiltonian cycle for all n and k n 3 and to show that P (n, n 2) is not Hamiltonian for all n 4. This answers a question of Starling, Klerlein, Kier and Carr [6] who showed Hamiltonicity for the case k = 2 and asked about the general case. For k n 3, the method will be to observe that P (n, k ) is closely related to the line digraph L ( P (n, k 1)) and that certain restricted Eulerian chains in L ( P (n, k 1)) will correspond to Hamiltonian cycles in P (n, k ). Then we will find such restricted E-mail address: [email protected]. 0195-6698/$ - see front matter © 2005 Elsevier Ltd. All rights reserved. doi:10.1016/j.ejc.2005.05.007

Hamiltonicity of digraphs for universal cycles of permutations

Embed Size (px)

Citation preview

Page 1: Hamiltonicity of digraphs for universal cycles of permutations

European Journal of Combinatorics 27 (2006) 801–805

www.elsevier.com/locate/ejc

Hamiltonicity of digraphs for universal cycles ofpermutations

Garth IsaakDepartment of Mathematics, Lehigh University, Bethlehem, PA 18015, United States

Received 21 October 2004; accepted 19 May 2005Available online 11 July 2005

Abstract

The digraphs P(n, k) have vertices corresponding to lengthk permutations of ann set and arcscorresponding to(k + 1) permutations. Answering a question of Starling, Klerlein, Kier and Carr weshow that these digraphs are Hamiltonian fork ≤ n − 3. We do this using restricted Eulerian cyclesand the fact thatP(n, k) is nearly the line digraph ofP(n, k − 1). We also show that the digraphsP(n, n − 2) are not Hamiltonian forn ≥ 4 using a result of Rankin on Cayley digraphs.© 2005 Elsevier Ltd. All rights reserved.

1. Introduction

For 1≤ k < n let P(n, k) be the digraph with vertices corresponding tok permutationsof [n] = {1, 2, . . . , n} and arcs corresponding tok + 1 permutations of [n]. The arccorresponding toσ1σ2 . . . σkσk+1 is (σ1, σ2, . . . , σk) → (σ2, σ3, . . . , σk, σk+1). Our aim isto show thatP(n, k) contains a directed Hamiltonian cycle for alln andk ≤ n − 3 and toshow thatP(n, n−2) is not Hamiltonian for alln ≥ 4. This answers a question of Starling,Klerlein, Kier and Carr [6] who showed Hamiltonicity for the casek = 2 and asked aboutthe general case.

For k ≤ n − 3, the method will be to observe thatP(n, k) is closely related to theline digraphL(P(n, k − 1)) and that certain restricted Eulerian chains inL(P(n, k − 1))

will correspond to Hamiltonian cycles inP(n, k). Then we will find such restricted

E-mail address: [email protected].

0195-6698/$ - see front matter © 2005 Elsevier Ltd. All rights reserved.doi:10.1016/j.ejc.2005.05.007

Page 2: Hamiltonicity of digraphs for universal cycles of permutations

802 G. Isaak / European Journal of Combinatorics 27 (2006) 801–805

Eulerian chains. This approach will also indicate a straightforward but more generalmethod for finding Eulerian chains in digraphs subject to restrictions on which arcs canappear consecutively. For the casesP(n, n − 2) the method will be tonote that these areCayleydigraphs [1] and thenapply a result of Rankin [5] about necessary conditions forCayleydigraphs with two generators to be Hamiltonian.

The digraphsP(n, n − 1) consist of disjoint cycles and hence contain neitherHamiltonian cycles norHamiltonian paths except the trivial caseP(2, 1) which has aHamiltonian path consisting of asingle arc. Consider the digraphsP(n, n − 2). As notedabove we will show that these are not Hamiltonian forn ≥ 4. P(3, 1) has three verticeswith arcs in both directions between each pair of vertices and is Hamiltonian. Usingthe correspondence to restricted Eulerian cycles described below it is straightforward tocheck thatP(4, 2) contains a Hamiltonian path. Klerlein, Carr and Starling [4] reportthat a computer search has also shown thatP(5, 3) contains a Hamiltonian path but nota Hamiltonian cycle. Ingeneral, we do not know whether or not the digraphsP(n, n − 2)

contain Hamiltonian paths.Some algebraic properties of the digraphsP(n, k) have been studied in [1], which

also contains a discussion and references to related digraphs with vertices correspondingto permutations which have come up in various engineering applications. The digraphsP(n, k) have also been studied (with different notation) in [3] in connection with universalcycles of permutations. A universal cycle for ak-permutation of n is a cyclic listing ofn!/(n − k)! symbols from [n] such that eachk-permutation appears exactly once as astring of lengthk in the listing. These are exactly Hamiltonian cycles in the line digraphL(P(n, k − 1)). Recalling the correspondence between Eulerian chains in a digraphand Hamiltonian cycles in its line digraph we see that finding these universal cycles isequivalent to finding Eulerian cycles inP(n, k − 1).

Each vertex inP(n, k) has indegree and outdegree equal ton − k. So P(n, k) will beEulerian if it is strongly connected. This is straightforward to show fork ≤ n − 2 (see forexample [3]). This will also follow inductively fork ≤ n − 3 from the results below as wewill be showing thatP(n, k) is Hamiltonian and hence strongly connected.

We havenoted that a Hamiltonian cycle inL(P(n, k − 1)) corresponds to a universalcycle fork-permutations. We are interested in Hamiltonian cycles inP(n, k). Thesealsocorrespond to universal cycles fork-permutations with the additional restriction that thelengthk +1 strings are also permutations. We see this as follows. Note that the line digraphL(P(n, k − 1)) has the same vertex set asP(n, k) and contains each arc ofP(n, k) but inaddition contains some extra arcs of the form(σ1, σ2, . . . , σk) → (σ2, σ3, . . . , σk, σ1).Thus, we can show thatP(n, k) is Hamiltonian byfinding a Hamiltonian cycle inL(P(n, k − 1)) avoiding these extra arcs. We do this by finding an Eulerian chain inP(n, k − 1) with certain restrictions on which arcs can appear consecutively.

2. P(n, k) for k ≤ n − 3

It will be notationally convenient to express Eulerian chains in terms of arcs. InP(n, k−1) consider the following pairing of arcs: letf ((σ1, σ2, . . . , σk)) = (σ2, σ3, . . . , σk, σ1).These are exactly the pairs inP(n, k − 1) that give rise to arcs in the line digraphL(P(n, k −1)) that are not inP(n, k). Thus an Eulerian chain inP(n, k −1) that avoids an

Page 3: Hamiltonicity of digraphs for universal cycles of permutations

G. Isaak / European Journal of Combinatorics 27 (2006) 801–805 803

arca followed by f (a) will correspond to a Hamiltonian cycle inL(P(n, k − 1)) thatonlyuses arcs that are also present inP(n, k). That is, it corresponds to a Hamiltonian cycle inP(n, k). It is also not difficult to see that each Hamiltonian cycle inP(n, k) comes fromsuch a restricted Eulerian chain.

We will start with an Eulerian chain inP(n, k − 1) and modify it in such a way thatthe result has the property described above. The modification will require that the commonindegree and outdegree inP(n, k − 1) is at least 4. Thus, even though there are Euleriancycles inP(n, n −2) andP(n, n −3) this method will not be able to show thatP(n, n −1)

andP(n, n − 2) are Hamiltonian. Indeed, as noted above they are not. In the proof below,induction is used only to show thatP(n, k − 1) is strongly connected. As noted above, thisalso can easily be checked directly as is done, for example, in [3].

Theorem 1. For 1 ≤ k ≤ n − 3 the digraphs P(n, k) contain a Hamiltonian cycle.

Proof. Using the correspondence noted above we will construct Eulerian chains inP(n, k − 1) with the restriction that each arca is not followed by f (a). Theproof willbe by induction onk. For the basis for the induction note thatP(n, 1) hasn vertices and anarc in each direction between each pair of vertices. HenceP(n, 1) is Hamiltonian (exceptfor n = 2). Consider 2≤ k ≤ n − 3. By induction,P(n, k − 1) is Hamiltonian and hencestrongly connected. Since also each vertexhas indegree equal to the outdegree,P(n, k −1)

is Eulerian. Letd = n − k + 1 denote the common indegree and outdegree.Construct an Eulerian chain inP(n, k − 1). In general this chain will not have the

necessary property that arca is not followed byf (a). The chain passes through each vertexd times. Pick a vertexv and letS1, S2, . . . , Sd be the segments from one appearance ofv

to the next. Create a new digraphD with vertex set corresponding toS1, S2, . . . , Sd and anarc fromSi to Sj for i �= j if Sj can follow Si in a ‘good’ Eulerian chain. That is, ifa isthe last arc ofSi then f (a) is not the first arc ofSj . Note that the outdegree and indegreeof eachSi are at leastd − 2. (Si has indegree and outdegreed − 1 if the last arc ofSi is aand the first isf (a); thesedegrees ared − 2 otherwise.) Ford ≥ 4 we haved − 2 ≥ d/2.Sincek ≤ n − 3, we haved = n − k + 1 ≥ 4. Thus each vertex ofD has indegree andoutdegree at least half the number of vertices inD and henceD is Hamiltonian (by a wellknown theorem of Ghouila-Houri). Use a Hamiltonian cycle inD to order theSi to yield anew Eulerian chain for which we do not havef (a) following a at vertexv. Note also thatthe order of two consecutive arcs does not change except atv. Repeat this process at eachvertex to yield a ‘good’ Eulerian chain, thatis, one which corresponds to a Hamiltoniancycle in P(n, k). �

The process described above can be usedin a broader context. For each vertexv andeach arca enteringv specify a set of forbidden arcs which cannot followa. If d is thecommon indegree and outdegree atv and as long as at most(d − 2)/2 arcs are forbiddenfor each entering arca and each arc leavingv is on at most(d − 2)/2 forbidden lists, wecan find an Eulerian chain avoiding forbidden pairs. As a special case, if we color the arcsof an Eulerian digraph in such a way that if a vertex has indegree and outdegreed thenthere are at most(d − 2)/2 arcs of each color entering the vertex and similarly for arcsleaving the vertex, then wecan find an Eulerian chain for which no two consecutive arcshave the same color.

Page 4: Hamiltonicity of digraphs for universal cycles of permutations

804 G. Isaak / European Journal of Combinatorics 27 (2006) 801–805

3. P(n, n − 2)

We now considerthe digraphsP(n, n − 2). As noted above, these digraphs are Cayleydigraphs by a result of [1]. Let G be a group with generating setS. The Cayley digraphC(G, S) has vertex setG and arcs(π ,πα) for π ∈ G andα ∈ S. (See [2] and [8] forsurveys of results about Hamiltonicity in Cayley digraphs.) We describe here an explicitrepresentation of P(n, n − 2) as a Cayley digraph for groupAn, the alternating group on[n] with generating set{α,β} where for evenn

α =(

1 2 . . . n − 3 n − 2 n − 1 n2 3 . . . n − 2 n − 1 1 n

),

β =(

1 2 . . . n − 3 n − 2 n − 1 n2 3 . . . n − 2 n n − 1 1

)

and forn odd

α =(

1 2 . . . n − 3 n − 2 n − 1 n2 3 . . . n − 2 n − 1 n 1

),

β =(

1 2 . . . n − 3 n − 2 n − 1 n2 3 . . . n − 2 n 1 n − 1

).

Observe that in both then evenandn odd casesα andβ are even permutations. For eachn − 2 permutation (π1, π2, . . . , πn−2) of [n] (corresponding to vertices ofP(n, n − 2))there are exactly two permutations in the symmetric groupSn for which the images of1, 2, 3 . . . n − 2 areπ1, π2, . . . , πn−2. Sincethese differ by a transposition, exactly one ofthese is an even permutation. Leth(π1, π2, . . . , πn−2) be the even permutation. Thenh isan isomorphism fromP(n, k) to C(An, {α,β}). To see this, note thath is one-to-one andonto from its definition. Consider vertex(π1, π2, . . . , πn−2) in P(n, n − 2). Let πn−1 andπn be the two elements of{1, 2, . . . , n} distinct from {π1, π2, . . . , πn−2} labelled so that

π =(

1 2 . . . n − 3 n − 2 n − 1 nπ1 π2 . . . πn−3 πn−2 πn−1 πn

)

is even and thush(π1, π2, . . . , πn−2) = π . In P(n, n − 2) we have arcs(π1, π2, . . . , πn−2) → (π2, π3, . . . , πn−2, πn−1) and (π1, π2, . . . , πn−2) →(π2, π3, . . . , πn−2, πn) and it is straightforward to check thath(π2, π3, . . . , πn−2, πn−1) =πα andh(π2, π3, . . . , πn−2, πn) = πβ (using the fact thatα,β andπ are all even). Soarcs inP(n, n − 2) correspond to arcs inC(An, {α,β}).

Now, the fact thatP(n, n − 2) is not Hamiltonian forn ≥ 4 will follow as a corollary ofthe following theorem of Rankin [5]. See also [7] for a short proof of Rankin’s theorem.

Theorem 2 (Rankin). Let C(G, {α,β}) be a Cayley digraph with two generators and letmα, mβ and mγ be the orders of α,β and γ = α−1β respectively. If mγ is odd, a necessarycondition for C(G, {α,β}) to be Hamiltonian is that |G|/mα and |G|/mβ are odd.

Note that in Rankin’s paper there is no explicit mention of digraphs and the notationthere would correspond to digraphs with arcαπ corresponding to generatorα. We usedigraphs with arcsπα to follow the notation of [2] and [8] and to simplify our notation.The results are the same for the two casessince a Cayley digraphdefined using left

Page 5: Hamiltonicity of digraphs for universal cycles of permutations

G. Isaak / European Journal of Combinatorics 27 (2006) 801–805 805

multiplication can also be defined using the same generators by replacing the groupelement for each vertex with its inverse.

Corollary 1. The digraphs P(n, n − 2) are not Hamiltonian for n ≥ 4.

Proof. Use the isomorphism betweenP(n, n−2) andC(G, {α,β}) described above. Thenwhenn is even

γ = α−1β =(

1 2 . . . n − 3 n − 2 n − 1 n1 2 . . . n − 3 n n − 2 n − 1

)

and whenn is odd

γ = α−1β =(

1 2 . . . n − 3 n − 2 n − 1 n1 2 . . . n − 3 n − 1 n n − 2

).

In both cases the order ofα−1β is 3 which is odd. Whenn is even the orders ofα andβ

aren − 1 and so|G|/mα = |G|/mβ = (n!/2)/(n − 1) which is even forn ≥ 4. Whenn isodd the orders ofα andβ aren and so|G|/mα = |G|/mβ = (n!/2)/n which is even forn ≥ 5. �

Acknowledgements

Partially supported by a grant from the Reidler Foundation. The author would like tothank Frank Ruskey for pointing him toinformation on Rankin’s Theorem.

References

[1] J.M. Brunat, M.A. Fiol, M.L. Fiol, Digraphs on permutations, Discrete Math. 174 (1997) 73–86.[2] S.J. Curren, J.A. Gallian, Hamiltonian cycles in Cayley graphs and digraphs — a survey, Discrete Math. 156

(1996) 1–18.[3] B. Jackson, Universal cycles ofk-subsets andk-permutations, Discrete Math. 117 (1993) 141–150.[4] J. Klerlein, E. Carr, G. Starling, personal communication, April 2002.[5] R.A. Rankin, A campanological problem in grouptheory, Proc. Cambridge Philos. Soc. 40 (1948) 17–25.[6] A.G. Starling, J.B. Klerlein, J. Kier, E.C. Carr, Cycles in the digraphP(n, k): an algorithm, Congr. Numer.

162 (2003) 129–137.[7] R.G. Swan, A simple proof of Rankin’s campanological theorem, Amer. Math. Monthly 106 (1999) 159–161.[8] D. Witte, J.A. Gallian, A survey: Hamiltonian cycles in Cayley graphs, Discrete Math. 51 (1984) 293–304.