8
Generalized Hamiltonian Circuits in the Cartesian Product of Two-Directed Cycles Douglas S. Jungreis DEPARTMENT OF MATHEMATICS HARVARD UNIVfRSITY CAMBRIDGE, MASSACHUSETTS 02 138 ABSTRACT We find necessary and sufficient conditions for the existence of a closed walk that traverses r vertices twice and the rest once in the Cayley digraph of 2, @ 2,. This is a generalization of the results known for r = 0 or 1. In 1978, Trotter and Erdos [3] gave a necessary and sufficient condition for the Cartesian product Z, @ Z, of two-directed cycles to have a hamiltonian circut. The condition, as reformulated by Stephen Curran [4], is that there exist posi- tive integers s and t such that sm + tn = mn and gcd(s,r) = 1. Penn and Witte [2] generalized this by showing that Z, d3 Z, has a circuit of length r 5 mn if and only if there exist positive integers s and t such that sm + tn = r and gcd(s, t) = 1. Gallian and Witte [l] defined a digraph to be hyperhamilto- nian if it has a (directed) spanning closed walk that passes through one vertex exactly twice and all other vertices exactly once. They proved that Z, @ Z, is hyperhamiltonian if and only if there exist positive integers s and t such that sm + tn = mn + 1 andgcd(s,t) 52. In this paper we give an analogous necessary and sufficient condition for the existence in 2, @ Z, of a spanning closed walk that traverses r vertices ex- actly twice and the remaining vertices exactly once. We call such a closed walk r-hyperhurniltoniun. Notice that r = 0 gives the Trotter-Erdos theorem while r = 1 gives the Gallian-Witte theorem. We begin with some notation. When we discuss the graph Z, 03 Z, we are refemng to the Cayley digraph of the direct product of cyclic groups with the Journal of Graph Theory, Vol. 12, No. 1, 113-120 (1988) 0 1988 by John Wiley & Sons, Inc. CCC 0364-9024/88/010113-08$04.00

Generalized hamiltonian circuits in the cartesian product of two-directed cycles

Embed Size (px)

Citation preview

Generalized Hamiltonian Circuits in the Cartesian Product of Two-Directed Cycles

Douglas S. Jungreis DEPARTMENT OF MATHEMATICS

HARVARD UNIVfRSITY CAMBRIDGE, MASSACHUSETTS 02 138

ABSTRACT

We find necessary and sufficient conditions for the existence of a closed walk that traverses r vertices twice and the rest once in the Cayley digraph of 2, @ 2,. This is a generalization of the results known for r = 0 or 1.

In 1978, Trotter and Erdos [3] gave a necessary and sufficient condition for the Cartesian product Z, @ Z, of two-directed cycles to have a hamiltonian circut. The condition, as reformulated by Stephen Curran [4], is that there exist posi- tive integers s and t such that sm + tn = mn and gcd(s,r) = 1. Penn and Witte [ 2 ] generalized this by showing that Z, d3 Z, has a circuit of length r 5

mn if and only if there exist positive integers s and t such that sm + tn = r and gcd(s, t ) = 1. Gallian and Witte [ l ] defined a digraph to be hyperhamilto- nian if it has a (directed) spanning closed walk that passes through one vertex exactly twice and all other vertices exactly once. They proved that Z, @ Z, is hyperhamiltonian if and only if there exist positive integers s and t such that sm + tn = mn + 1 andgcd(s,t) 5 2 .

In this paper we give an analogous necessary and sufficient condition for the existence in 2, @ Z, of a spanning closed walk that traverses r vertices ex- actly twice and the remaining vertices exactly once. We call such a closed walk r-hyperhurniltoniun. Notice that r = 0 gives the Trotter-Erdos theorem while r = 1 gives the Gallian-Witte theorem.

We begin with some notation. When we discuss the graph Z, 03 Z, we are refemng to the Cayley digraph of the direct product of cyclic groups with the

Journal of Graph Theory, Vol. 12, No. 1, 113-120 (1988) 0 1988 by John Wiley & Sons, Inc. CCC 0364-9024/88/010113-08$04.00

114 JOURNAL OF GRAPH THEORY

standard generating set. Call the generating set a , b , where b generates Z, and a generates Z,. Assume the digraph is represented by a rectangular array of vertices; those edges that represent the generator a are directed toward the right, and those that represent b are directed down (see Fig. 1).

Theorem 1. The direct product Z, @ Z, has an r-hyperhamiltonian closed walk if and only if r 5 mn and there exist positive integers s and t such that ms + nt = mn + r a n d g c d ( s , t ) 5 r + I .

Before proving Theorem 1, we discuss some preliminaries. If a closed walk traverses a vertex exactly twice. then we call this vertex a dicplicafe vertex. Thus an r-hyperhamiltonian closed walk has exactly r duplicate vertices.

The digraph of Z, @ Z, can be embedded on a torus such that a cycle ( .x ,xa,xa2, . . . ,xu" = x ) represents a meridional loop and a cycle ( x , x b , x b 2 , . . . ,xb"' = x ) represents a longitudinal loop. A closed walk of the graph is a knot on the torus. We relax the conditions of knots so that they may inter- sect themselves.)

Proof of Theorem 1. (3) Suppose we are given a closed walk C in Z, @ Z,, and C is r-hyperhamiltonian, that is, C traverses exactly r vertices twice. Clearly, C has a total of nin + r edges (one for each time we traverse a vertex). Suppose p edges of C travel to the right and q travel downward. Then if we start at the identity e , we end at d b 9 . But C is a closed walk, so we end at e . Thus aPbq = e , and so n b and m ( 9 . This proves the number of edges of C i s m n + r = nt + ms.

We must now prove that gcd(s, t) 5 r + 1 . To do so, we embed Z, @ Z, on a torus, as described earlier. On this torus, C is a knot, with knot class (s , t )

e a 3 "-1 a 2 a

'I I

ir

FIGURE 1

HAMILTONIAN CIRCUITS 11 5

(for more on knot classes, see IS]). C is the union of subcircuits that do not cross each other or themselves. We decompose C into these subcircuits as fol- lows: Simply require that, of the two inedges of any duplicate vertex, if a sub- circuit enters from the rightmost (leftmost) inedge, then i t leaves by the rightmost (leftmost) outedge. (see Fig. 2). On the torus. these subcircuits repre- sent subknots that do not cross each other or themselves. Suppose C has been decomposed into d subcircuits, so there are d subknots. On a torus, any d knots that do not cross each other or themselves must have the same knot class, say (x, y ) (with the possible exception of knots of the form (0,O) and ( - x , - y ). which cannot exist on the directed graph Z, @ Z,). Furthermore, x and Y must satisfy gcd (x ,y ) = 1. The initial knot must have knot class ( d . r , d v ) so dx = s , and dy = t . Hence gcd(s , t ) = d , so that C has been decomposed into gcd(s, t ) subcircuits. C is connected, and two subcircuits can only be con- nected by a duplicate vertex. There must therefore be at least d - 1 duplicate vertices, so r 2 d - 1 = gcd(s,t) - 1, which gives gcd(s, t) 5 r + 1.

(G) Assume ms + nt = inn + r , and gcd(s, t) 5 r + 1. We must now show the existence of an r-hyperhamiltonian closed walk. It suffices to con- struct an appropriate Eulerian subgraph. First we should observe certain proper- ties of cycles on Z, @ Z,. Suppose a closed walk has knot class (s. t ) . For each time the walk enters a row of vertices, it must eventually leave that row, so if the walk passes from the first row to the second row q times, then it passes from every row to the next row q times. Thus we have exactly rnq verti- cal edges. But we know there are rns vertical edges, so q = s, i .e., the walk passes from each row to the next row exactly s times.

In order to construct the Eulerian subgraph, we will first construct a spanning Eulerian multigraph with r duplicate vertices. Since r 5 mn, either s 5 n or t 5 m. Without loss of generality, assume s 5 n . Now begin the construction by choosing s vertices on the first row (this is possible since s 5 n ) . These

'1

decompose a s follows

FIGURE 2

116 JOURNAL OF GRAPH THEORY

vertices are the feet of the s edges that join the m th row and first row. Let these vertices be (in order) (a ’ ’ , u ’ ~ , . . . , a ’ s ) . At this stage, the values of the y s are not important. Now notice that, if no duplicate vertices were to be used, then the remainder of the edges would be determined, because we would have to proceed along the first row until just before we reach another of the s vertices, then move down to the second row and do the same thing, etc. (see Fig. 3). Continuing in this fashion we will eventually fill the mth row, thereby filling the whole graph. Suppose the s points on the mth row at which we end are (bm-lu2l, brn-’az2, . . . , b“-1a2J). Unless each z is equal to some y , we cannot join the endpoints and beginning points to form circuits. If the values of the y s and z s alternated, we could use duplicate vertices on the rnth row to close the circuits (see Fig. 4). Clearly this is not always possible. If the z s were all bunched together, then this process would require vertices of degree 3 or more.

We now use the fact that we can place the initial s vertices anywhere on the first row. We thus spread the y s uniformly, i.e., let y, = Ln/sJ (LxJ = greatest integer 5 x) , y2 = L2n/sJ,. . . ,y5 = Lns/sJ = n . We will show that the initial s vertices can now be joined to the final s vertices using duplicate vertices in the m th row. Observe that if the initial s vertices are at (u ’ l . a’?, . . . , a ’ \ ) , then the s edges connecting the first two rows are at ( U ’ ~ - ~ , U ’ ~ ’ , . . . , a ’> - ’ ) , the

FIGURE 3

x endpoints

o beginning points

o ‘duplicate vertices

FIGURE 4

HAMILTONIAN CIRCUITS 11 7

next set of s edges a re at b a V 2 - ' , . . . . ba Y s - 2 ), then ( b 2 a " 1 - 3 , bzaV2-3 , . ' . , ~ ' U ~ I - ~ ) , and so on. Each set of s edges is shifted by 1 to the left (see Fig. 3). Thus the final s vertices at (bm- 'ar1 , bm-laZ2, . . . , brn-Ia',) are in

If each y is equal to some ( y - m ) , then the final vertices can easily be con- nected to the initial vertices. Assume then that y I is not equal to any ( y - m ) ; that is, yi - m < y , < yi+, - m for some i . For all i,j we have (y,+, - m ) - - I v . = L(i + j ) n / s j - m - Ljn/s i E {(Lin/sJ - m ) , (L in / sJ - m + 1)). This difference can thus take on one of only two values. Hence y i - m < y , < y l t l - m implies Y , + , - ~ - m 5 y, 5 yi+, - m for all j , so yi - m 5 y , 5

yit , - m 5 y , 5 y i + z - m 5 y , 5 -.. 5 y 3 5 yits - m. Thus the ys and ( y - m)s alternate; that is, the initial vertices and final vertices alternate. We can therefore connect each final vertex to an initial vertex without having to tra- verse any vertices more than twice.

We now summarize the construction. Let y{ = Lin/sJ - ( j - 1 ) . Define a spanning subdigraph of Z, @ Z, by letting bioai0 travel by b if i, = y:" for some i, by a if not. Let y,! = remainder of y,!" on division by n , y ; = min y,!. Then 0 = y : I y ; I y ; 5 y;,, 5 . . . , so we can add paths from y;,, to Y,!+~ for all i to form C,.

From C, we must now construct the r-hyperhamiltonian closed walk (Eulerian subgraph) C . The spanning multigraph C, we have constructed has fewer than n duplicate vertices (they are all on the m th row), We have up until now used exactly sm vertical edges, and the number of horizontal edges is a multiple of n , say u n ; hence, sm + un - n < mn 5 mn + r = sm + t n , so (u - 1)n < t n , and u 5 t .

Thus, to reach the desired Eulerian subgraph C , we must add some nonnega- tive multiple of n duplicate vertice to C,. For each n duplicate vertices we wish to add, we can make every vertex of some row (except the mth row) duplicate vertices (see Fig. 5) . Each component of C, passes through this row, so adding any such row results in a connected multigraph.

Thus if t > u we can simply add rows of n duplicate vertices and produce the desired connected spanning multigraph. We can therefore assume id = t , i.e., we have already used all the duplicate vertices we are going to, and they are all on the mth row. In this case, we show how to modify C, to obtain a con- nected multigraph without changing the number of duplicate vertices.

If C, has any duplicate edges, then each component is connected to its neigh- boring components so all are connected (see Fig. 6) . Assume then that C , has no duplicate edges. Then for each duplicate vertex w , there is a unique possible structure for the edges at wab-I, wa'b-' , . . .(see Fig. 7). This pattern must continue along the diagonal wa'b-l at least until we reach a column containing another duplicate vertex. The duplicate vertex can be moved to any point along this diagonal as long as the pattern continues (see Fig. 8) without affecting the rest of the graph. Suppose duplicate vertex wI connects components 1 and 2 . Let the first duplicate vertex to the left of w1 be w2, then w,, and so on. Since w2 can be moved along this diagonal until it reaches the column of w,, it can be moved until it connects components 2 and 3 (components are numbered in order

fact at ( b n i - l a y l - i n , bm-lay2-m, . . . , brri-laYI -??I).

118 JOURNAL OF GRAPH THEORY

Row w i t h no duplicate vertices

1 1 ULj +- Row w i r h only duplicate vertices.

FIGURE 5

c2 c3 =I, = 5

+ - -/ c1

T=rir-lL-!- FIGURE 6

FIGURE 7

HAMILTONIAN CIRCUITS 119

L I

FIGURE 8

in the direction of ba- ' ) . Similarly, w3 can be moved until it connects compo- nents 3 and 4 , etc. Since r + 1 2 gcd(s, t ) = number of components, the components will eventually all be joined.

We now consider a similar generalization of hamiltonian closed walk. We in- vestigate closed walks that traverse every vertex j times.

I

Theorem 2. each vertex twice.

The digraph Z, @ Z, always has a closed walk that traverses

Proof. Each vertex of the digraph has indegree = outdegree = 2 , and the digraph is connected, so it has an Eulerian cycle. This is the desired closed walk. I

Corollary. exactly j times (for any integer j 2 2).

The digraph Z, G3 Z, has a closed walk that traverses each vertex

Proof. Everywhere the digraph has an edge representing the generator a insert j - 2 additional edges representing the generator a . Each vertex now has indegree = outdegree = j , and the digraph is still connected, so it has an Eule- rian cycle. This is the desired closed walk. I

ACKNOWLEDGMENTS

I would like to thank Professor Joseph A. Gallian, who posed this problem, for his advice and assistance that made this paper possible. I am indebted to David Witte for making numerous helpful suggestions on style and content. The work was done at the University of Minnesota, Duluth, and was funded by the NSF (Grant Number: DMS-8407498).

120 JOURNAL OF GRAPH THEORY

REFERENCES

[ I ] J . A . Gallian and D. Witte, When the Cartesian product of two directed

[2] L. E. Penn and D. Witte, When the Cartesian product of two directed cycles

(31 W. T. Trotter, Jr., and P. Erdos, When the Cartesian product of directed

(41 D. Witte and J . A. Gallian, A survey: Hamiltonian cycles in Cayley graphs.

[S] D. Rolfsen, Knots and Links, Publish or Parish, Berkeley, CA (1976).

cycles is hyperhamiltonian. J . Graph Theory, to appear.

is hypohamiltonian. J . Graph Theory 7 (1983) 441-443.

cycles is hamiltonian. J . Graph Theory 2 (1978) 137-142.

Discrete Math. 51 (1984) 293-304.