[north-holland mathematics studies] annals of discrete mathematics (11) - studies on graphs and...

15
P. Hansen, ed., Studies on Graphs and Discrete Programming @ North-Holland Publishing Company (1981) 381-39.5 SCHEDULING IN SPORTS D. de WERRA Dkparternent de Mathkrnatiques, Ecole Polytechnique Fkdkrale de Lausanne, Switzerland The purpose of this paper is to present the problem of scheduling the games of a hockey or football league. It is shown how a graph theoretical model may be used and how some constraints related to the alternating pattern of home-games and away-games can be handled. Finally some other requirements occurring in practice are also discussed and introduced into the model. 1. Introduction When scheduling the games of a season for say a football or a hockey league, one has to satisfy a lot of different requirements [3,4]. In this paper we will be concerned with some of them; we will focus on the Home-and-Away pattern of the schedule. Our purpose will be to show how these requirements can be handled in a graph-theoretical model. Graph theoretical terms not defined here are to be found in Berge [2]. Let the league consist of 2n teams; each one has to play one game against each other. One associates with this league a complete graph K2, on 2n nodes: edge [i, j] represents the game between team i and team j. If there are no specific requirements a schedule is given by a 1-factorization of K2, [5, Ch. 91 i.e. a decomposition of the edge set of KZn into 1-factors F1,. . . , F2n-1; each Fd consists of a collection of n non adjacent edges which represent the n games scheduled for the dth day of the season. Results on decomposition of complete graphs into subsets of non adjacent edges were given by Baranyai [l]. Since each game between i and j is played in the home city of either team i or team j, one can represent the game by an arc (i, j) oriented from i to j (or j to i) if it is played in the home city of j (or i); we say that it is a home-game for j (or for i) and an away-game for i (or for j). A 1-factorization of K2, together with an orientation defined for each edge is an oriented coloring of K2,; it will be denoted by (fil,. . . , FZnp1). It defines a schedule in the sense that for each game between teams i and j, the orientation of the arc joining i and j and its color (i.e. the index p of the 1-factor fip which contains this arc) specify where and when the game is to be played. Usually one tries to alternate as much as possible home-games and away- games for each one of the teams. With each schedule we can associate a Home- - 381

Upload: d

Post on 14-Mar-2017

215 views

Category:

Documents


3 download

TRANSCRIPT

Page 1: [North-Holland Mathematics Studies] Annals of Discrete Mathematics (11) - Studies on Graphs and Discrete Programming Volume 59 || Scheduling in Sports

P. Hansen, ed., Studies on Graphs and Discrete Programming @ North-Holland Publishing Company (1981) 381-39.5

SCHEDULING IN SPORTS

D. de WERRA Dkparternent de Mathkrnatiques, Ecole Polytechnique Fkdkrale de Lausanne, Switzerland

The purpose of this paper is to present the problem of scheduling the games of a hockey or football league. It is shown how a graph theoretical model may be used and how some constraints related to the alternating pattern of home-games and away-games can be handled. Finally some other requirements occurring in practice are also discussed and introduced into the model.

1. Introduction

When scheduling the games of a season for say a football or a hockey league, one has to satisfy a lot of different requirements [3,4]. In this paper we will be concerned with some of them; we will focus on the Home-and-Away pattern of the schedule. Our purpose will be to show how these requirements can be handled in a graph-theoretical model. Graph theoretical terms not defined here are to be found in Berge [2].

Let the league consist of 2n teams; each one has to play one game against each other. One associates with this league a complete graph K2, on 2n nodes: edge [i, j] represents the game between team i and team j. If there are no specific requirements a schedule is given by a 1-factorization of K2, [ 5 , Ch. 91 i.e. a decomposition of the edge set of KZn into 1-factors F1,. . . , F2n-1; each Fd consists of a collection of n non adjacent edges which represent the n games scheduled for the dth day of the season. Results on decomposition of complete graphs into subsets of non adjacent edges were given by Baranyai [l].

Since each game between i and j is played in the home city of either team i or team j, one can represent the game by an arc (i, j ) oriented from i to j (or j to i) if it is played in the home city of j (or i ) ; we say that it is a home-game for j (or for i) and an away-game for i (or for j ) . A 1-factorization of K2, together with an orientation defined for each edge is an oriented coloring of K2,; it will be denoted by (fil, . . . , FZnp1). It defines a schedule in the sense that for each game between teams i and j , the orientation of the arc joining i and j and its color (i.e. the index p of the 1-factor f i p which contains this arc) specify where and when the game is to be played.

Usually one tries to alternate as much as possible home-games and away- games for each one of the teams. With each schedule we can associate a Home-

-

381

Page 2: [North-Holland Mathematics Studies] Annals of Discrete Mathematics (11) - Studies on Graphs and Discrete Programming Volume 59 || Scheduling in Sports

382

2n = 4

D. de Werra

days

1 2 3

A - A

- H E

H teams

d n A

(Y)

Fig. 1.

and-Away pattern (HAP): it is a 2n x (2n - 1) array where entry (i, d ) is H if team i has a home-game on the dth day or A otherwise.

If in some row i, there are 2 consecutive entries, say d - 1 and d with the same symbol (A or H), we say that team i has a break at day d (the alternating pattern is broken at day d ) . For instance Fig. 1(p) shows a schedule for a league of 4 teams a, b, c and d. In the associated HAP (Fig. l(y)) one sees that there are 4 breaks: for team a on day 3, for team b on day 2 and for team c on days 2 and 3.

In the next section we shall deal with breaks and formulate some properties using a graph-theoretical terminology. Notice that in terms of oriented color- ings a break occurring on day d for team i appears as follows: the (unique) arc adjacent to node i in Fdp1 and the (unique) arc adjacent to i in Fd are both oriented either out of i or into i. We shall similarly say that node i has a break for color d.

2. Oriented colorings

We shall first state some results related to the breaks in an oriented coloring of complete graphs K2n.

Proposition 1. In any oriented coloring of K2,,, there are at least 2n - 2 breaks.

Page 3: [North-Holland Mathematics Studies] Annals of Discrete Mathematics (11) - Studies on Graphs and Discrete Programming Volume 59 || Scheduling in Sports

Scheduling in sports 383

Proof. Suppose there exists an oriented coloring (g1,. . . , g2n-1) of K2, with less than 2n - 2 breaks. This means that there are p 2 3 nodes without any break. Among these p nodes, there must be 2 nodes x and y such that in the HAP corresponding to this coloring rows x and y are identical. This means that there cannot be any arc (x, y ) in K2,. This contradicts the fact that the graph is complete and Proposition 1 is proven.

Remark 1. One can as well consider oriented colorings of graphs which are not complete and define breaks in a similar way: if G is a regular bipartite multigraph then there exists an oriented coloring with no breaks (this is an immediate consequence of the fact that G has a l-factorization [5, Ch. 91).

If G is not regular, there is n o l-factorization, but one can define oriented colorings (each Fd is simply a subset of non adjacent arcs) and breaks: let u be the unique arc of fid adjacent to some node x and let A C d - 1 be the largest index such that FA contains an arc, say u, adjacent to node x. There is a break at node x (for color d) if u and u are both oriented either out of x or into x.

With this definition, one can show that if G is a bipartite multigraph with even degrees, then there exists an oriented coloring with no breaks (this follows directly from results in [7]).

A l-factorization (Fl, . . . , F2n-1) of K,, will be called canonical if for i = 1 , . . . , 2 n - 1 Fi is defined by

8 ={[2n, i])U{[i + k, i - k]; k = 1 ,2 , . . . , n - 1)

where the numbers i+k and i-k are expressed as one of the numbers 1 , 2 , . . . , 2 n - 1 (mod2n-1).

It will be convenient to denote by aio the edge [2n, i] for i = 1,2, . . . , 2 n - 1 and by @ k the edge [ i + k , i-k] for i = 1,2, . . . , 2 n - 1 and k = 1 ,2 , . . . , n-1. Thus

8 = { q o , ail, ai2, * * * 9 a i . n - 1 ) -

Table 2(a) shows the array ( q k ) for the case 2n = 8 . Given a canonical l-factorization of KZn and a node p we will associate with

p a sequence S(p) consisting of the edges in F1, F2, . . . , F2n-1 consecutively which are adjacent to node p.

For instance if p =2n, S(2n)=(alo, . . , ~ ~ " - 1 . ~ ) i.e. ([2n, 11, [2n, 21,. . . , [2n, 2n- 11). For p = 1, S(l) starts with alo (it is Part I) and continues with n - 1 edges aik with i - k = 1 where i takes consecutively values 2 ,3 , . . . , n while k increases from 1 to n - 1; this is Part 11. Next Part I11 consists of n - 1 edges a i k with i + k = 1 where i = n + 1, n + 2, . . . , 2 n - 1 while k = n - 1, n - 2, . . . , 2 . S(1) is represented in Table l(a) and an example for 2n = 8 is given in Table 2(b). Now if p is a node of K2,, with 2 S p S 2 n - 1, we

Page 4: [North-Holland Mathematics Studies] Annals of Discrete Mathematics (11) - Studies on Graphs and Discrete Programming Volume 59 || Scheduling in Sports

384

Table 1

D. de Werra

[i+k, i-k=lI [i+k=l, i-kl

i = 2,. . . ,n i=n+l, ..., 2n-1 I I1 I11

i, 2n-i

i=n+l, ..., 2n-1 = 1 '10 1 ai,i-l

i = 2 , ..., n

[i+k,i-k=pl Ii+k=p, i-k]

i=l,..,p-1 i=p+l,..,n+p-1 i=n+p,..,2n-l

I I1 111 IV 1 apO I ai,i-p l a ' i,p-1+2n-l j = j.irp-i i=1,. . ,p-1 i=p+l,..,n+p-1 i=n+p,..,2n-l

! [2n,pl Ii+k,i-k=pl

i=p+l,..,2n-l

IV

I ! I I1 I11

lap0 I ai,i-p j i=p+l, . . ,2n-1

will describe the sequence S(p); two cases are to be considered: (A) 2 S p s . n : S(p) starts with p - 1 edges aik with i + k = p

( i = 1 , 2 , . . . , p - 1 and k = p - i); this is Part I of S(p); then upo = [an, p] is Part I1 of S(p). Next Part I11 consists of n - 1 edges a i k with i - k = p ( i = p + 1 , p + 2, . . . , n + p - 1 while k = i - p). Finally Part IV contains n - p edges a , k

with i + k = p (i = n + p, . . . ,2n - 1 while k = 2n - 1 + p - i). Table l(b) shows S(p) and Table 2(b) gives S(3) for the case 2n = 8.

(B) n + l s p S 2 n - l . In this case S(p) also consists of 4 parts. Part I consists of p - n edges aik with i - k = p ( i = 1,2, . . . , p - n while k = 2 n - I + i - p ) . Part 11 is a sequence of n - 1 edges a i k with i + k = p ( i = p - n + l , . . . , p - 1 while k = p-i) . Part I11 is upo and Part IV is formed by 2n - 1 - p edges a i k with i - k = p ( i = p + 1, . . . , 2 n - 1 while k = i -p). S(p) is represented in Table l(c) and S(6) for the case 2n = 8 is given in Table l(b).

Page 5: [North-Holland Mathematics Studies] Annals of Discrete Mathematics (11) - Studies on Graphs and Discrete Programming Volume 59 || Scheduling in Sports

Scheduling in sports 385

Table 2

a)

s ( 3 ) = “ 3 , 6 1 [ 3 , 1 1 1 18, 31 1 [5 , 3 1 [ 7 , 3 1 [ 2 , 31 I [ 3 , 4 1 )

I 1

I I1 I11 IV

= a 1 2 a 2 ~ 1 a30 1 a 4 1 a52 a63 1 a73 J

We will now show that the lower bound on the number of breaks for complete graphs given in Proposition 1 is best possible.

Proposition 2. There exists an oriented coloring of K,, with exactly 2 n - 2 breaks.

Proof. We shall start from a canonical 1-factorization (Fl, F,, . . . , FznPl) and orient each arc in order to obtain an oriented coloring (ply pZy. . . pzn-,) of

(a) For each i edge aio becomes arc ( i , 2 n ) if i is odd or arc (2n, i) if i is even. Kzn :

Page 6: [North-Holland Mathematics Studies] Annals of Discrete Mathematics (11) - Studies on Graphs and Discrete Programming Volume 59 || Scheduling in Sports

386 D. de Werra

days 1 2 3 4 5

6‘i 2’5 $4

22 $1 85 2

3

$1

$2

F3 6c3 22 A -t A A gl teams

-

(a)

2n = 6

Fig. 2.

(b) For each i edge aik becomes arc (i + k, i - k) if k is odd or arc ( i - k, i + k ) if k is even. An example for 2n = 6 is given in Fig. 2(a) ; in the corresponding HAP (Fig. 2(p)), one notices that the number of breaks is 2n - 2 = 4.

One immediately observes that node 2n has no breaks. Furthermore by examining the sequences S(p) and the orientation rule (b) we notice that no break can occur within any one of the parts of the S(p) because p is alternately initial endpoint and terminal endpoint of the arcs of the same part. So breaks can occur only at the boundary of 2 consecutive parts of a sequence S(p).

For each node p with 1 S p S 2n - 1 there are 2 consecutive parts, say A and B, such that the last arc in A and the first arc in B both correspond to k = n - 1. Since one of them is generated from an edge [i + k, p] and the other from an edge [p, i - k], the orientation rule (b) implies that one of the arcs is directed out of p while the other is directed into p. Hence there is no break at the boundary of Parts A and B. Hence there is no break at the boundary of Parts A and B. Thus node 1 cannot have any break at the boundary of Parts I1 and 111. Since the (last) arc of Part I is (1 ,2n) from (a) and the first arc of Part I1 is (3, 1) from (b), it follows that node 1 has no breaks.

We will show that each one of the nodes p with 2 d p S 2n - 1 has exactly one break: this will show that there are 2n - 2 breaks. Let us consider case (A) where 2 d p d n. Part I of S(p) ends with (p, p - 2), Part I1 is (2n, p) if p is even or (p, 2n) if p is odd; Part I11 starts with (p + 2, p); since no break can occur at the boundary of Parts I11 and I V (from the above remark about consecutive arcs in S(p) corresponding both to k = n - l), p only has one break (it occurs for color p if p is odd and for color p + 1 if p is even).

Case (B) can be handled similarly giving node p a break for colour p if p is odd or for color p + 1 if p is even. This ends the proof. 0

Page 7: [North-Holland Mathematics Studies] Annals of Discrete Mathematics (11) - Studies on Graphs and Discrete Programming Volume 59 || Scheduling in Sports

Scheduling in sports 387

If we define breaks for graphs without 1-factorization as in Remark 1, we can state

Corollary 2.1. K2n+l has an oriented coloring without breaks.

Proof. Starting from an oriented coloring of K2n+2 constructed as above, we may remove all arcs adjacent to node 2n +2. This gives an oriented coloring of K2,,+l; an inspection of the sequences S ( p ) in Table 1 shows that no node has a break.

Remark 2. It is known that in a canonical 1-factorization of K2,,, Fi U F,+l forms a hamiltonian cycle (i = 1,2 , . . . , 2 n -2). One can easily verify that the oriented coloring constructed in the above proof is such that FlUp2, g 3 U F4, . . . , F2,,-3 U F2n-2 are hamiltonian circuits. - -. -

3. Multiperiod schedules

In the previous model, each team had to play exactly one game against every other team; in some cases, each pair of teams i , j has to meet twice during the season: once in the home city of i and once in the home city of j . In fact the season is divided into 2 periods: each pair of teams has to meet once during the first period and once during the second period. This corresponds to replacing K2,, by an oriented graph G2,, on 2n nodes where each pair of nodes i, j is joined by an arc (i, j ) and an arc (j, i). A schedule is represented by a decomposition (fil, f i 2 , . . . , fi4,,-2) of the arc set of G2,, such that

(al,. . . , f i2 , - , ) and consequently (fi2,,, . . . , I&,,-*) are (1) oriented colorings of K2,,.

It is easy to find a decomposition (fil, . . . , fi4n-2) of G2,, satisfying (1) and such that the total number of breaks is 4n -4 and no node has 2 consecutive breaks. Such a decomposition is obtained for instance by taking fii = and IfZnPlci = FznPi (i = 1 ,2 , . . . , 2 n - 1) where (pl, . . . , p2n-1) is an oriented col- oring of Kzn giving 2n -2 breaks and is obtained from f i by reversing the directions of the arcs. An illustration is given in Fig. 3 for 2n = 4.

In practice such a schedule would not be good since the teams which meet on day 2n - 1, meet again on day 2n.

One may thus require that the following holds

c

(2) - . -

if Hi = F,, then fi2n-l+i = Ri (i = 1,2, . . . , 2 n - 1).

Page 8: [North-Holland Mathematics Studies] Annals of Discrete Mathematics (11) - Studies on Graphs and Discrete Programming Volume 59 || Scheduling in Sports

388

+ + F1 = H1

F2 = H2 + +

+ + F3 = H3

D. de Werra

$1 2-3 ii4 = $3 1’2

$2 h

A $3 1’2 g6 = $1 $3

days

- Notice that if Pl,. . . , F2,-, is the oriented coloring constructed in the proof of Proposition 2, (Q,, . . . , Q4,,-2) would give 6n - 6 breaks and some nodes could have 2 consecutive breaks (this would mean that some teams have 3 consecu- tive home-games (or away-games)).

Proposition 3. Any decomposition (G1, Q2,. . . , f i4n-2) of the arc set of GZn satisfying conditions (1) and (2) has at least 6n - 6 breaks.

- Proof. Since from (1) X1 = (a,,. . . , fi2,-,) and X 2 = (fi2,, . . . , H4n-2) are oriented colorings of K2,,, there will be 2n - 2 breaks for XI and 2n - 2 breaks for X 2 . If a node p has an even number of breaks in X,, there will be no break at the boundary of 2, and X2 (the first and the last arc in the sequence S 1 ( p ) associated to X, are both directed into p or out of p and the first arc in the sequence S 2 ( p ) associated to Xi has the opposite orientation). If the number of breaks in X, for some node p is odd, there will be an additional break at the boundary. Since each break introduced into X, will create a similar break in X2 (from (2)) , the minimum number of breaks is obtained when 2, and X2 each have 2n - 2 breaks. this gives 6n - 6 breaks since there are 2n - 2 nodes having exactly one break in X,. 0

Proposition 4. There exists a decomposition X = (Ql, fi2, . . . , G4n-2) of the arc set of G2, satisfying (1) and (2) and such that the total number of breaks is 6n - 6 . Furthermore i f 2n + 4, no node has 2 consecutive breaks in Sce.

For 2n = 4, at least 2 breaks will occur in any oriented coloring (p,, F2, p3) of K4. If a node has 2 breaks, then these breaks will necessarily be consecutive. So assume each node has one break at most in (Fl,g2,F3).

This break can occur for color 2 or for color 3; if it is for color 2 (color 3), then there will be breaks for colors 4 and 5 (4 and 6 ) . In all cases, there will be 2 consecutive breaks when 2n = 4, Clearly for 2n = 2, there are no breaks at all in X. So we shall assume that 2n 5 6 in the proof.

Page 9: [North-Holland Mathematics Studies] Annals of Discrete Mathematics (11) - Studies on Graphs and Discrete Programming Volume 59 || Scheduling in Sports

Scheduling in sports 389

6'i $5 $4 1

2

3

4

6+2 $1 4's

<3 4+2 $1 teams

k 5+3 l'i 5

€?5 fi $3 6

(a)

days

1 2 3 4 5

A H A H A

A H H A H

A H A A H

A A H A H

n ~ f i n ~

H A H H A

n u ( B )

6 7 ... H A ... H A

A H

H A

A H

A n ...

Fig. 4.

Proof of Proposiiion 4. We shall again start from a canonical 1-factorization (Fl, F2,. . . , F2n-1) of &,,; the orientation is defined by rule (b) in Proposition 2 and by rule (a'):

(a') for each i edge aio becomes arc (i, 2 n ) if i S 2 n - 5 is odd or if i = 2n - 2 ; it becomes arc ( 2 4 i ) otherwise.

This construction is illustrated for K6 in Fig. 4(a); the corresponding HAP is represented in Fig. 4(p). One can see that in the decomposition of G2, derived from the oriented coloring fil, . . . , fi2n-1, no node has 2 consecutive breaks.

In fact we have just reversed the orientation of the arcs corresponding to the last three edges of S(2n) , namely a2n-3 .0 , a2n-2,0 and a2n-1,0. There is clearly no change for the first 2 n - 4 nodes; their breaks occur for colors i with 3 s i s 2 n -3.

Node 2n now has one break; it occurs for color i = 2n - 3, but node 2n - 1 no longer has a break: this can be seen in Fig. 5(a) which represents a portion of f i for i = 2n - 3, 2n - 2, 2n - 1 as constructed in Proposition 2. Fig. 5 ( p ) represents the same portion after reversing the orientation of 3 arcs according to rule (a') ( R has become c).

One sees also that the break of node 2n - 3 has moved from color 2n - 3 to color 2n - 2 and similarly the break of node 2n - 2 has moved from color 2n - 1 to color 2n - 2 .

(2n, 2n-4)

(2n-3, 2n)

(In, 2n-2)

(2n-1, 2n)

(a)

(2n-3, 2n-5)

(2n-2, 2n-4)

(2n-1, 2n-3)

( 1, 211-2)

(Zn, 2n-4)

(2n, 2n-3)

(2n-2, 2x1)

(2n, 2n-1)

ce,

( 2n-2,2n-4)

(2n-1,2n-3)

( 1 , 2n-2)

Fig. 5 .

Page 10: [North-Holland Mathematics Studies] Annals of Discrete Mathematics (11) - Studies on Graphs and Discrete Programming Volume 59 || Scheduling in Sports

390 D. de Werra

So the total number of breaks in (& . . . , Fin-l) constructed with (a’) and (b) is still 2 n - 2 ; since all breaks occur for colors c with 3 S c s 2 n - 2 , (& . . . F2n-1, F;, . . . , Fin-l) will give a decomposition of the arc set of Gz, without consecutive breaks. The total number of breaks will be 6 n - 6 .

c - 1 -

0

Remark 3. If each pair of teams has to play an even number 2p of games during a season, then one can repeatedly use a decomposition of G2,; new breaks will be introduced at the boundaries for nodes having 3 breaks. The total number of breaks will be 6 p ( n - 1 ) + 2(p - l ) ( n - 1).

Remark 4. Instead of requiring that (2) holds one could as well ask that the decomposition of the arc set of G2, satisfies: for each pair i , j of nodes if arc ( i , j ) is in fiC and arc ( j , i ) in Rd, then lc - d [ a q where q is some parameter. We have dealt with the case q = 2 n - 1 ; this gave at least 6 n - 6 breaks; if q = 0, we have seen that we can have as few as 2n - 2 breaks.

4. Complementary patterns

In a league, the different teams are generally located in different cities (some of these cities may in fact have more than one team). For obvious reasons it may not be desirable to have all teams located in some small region to play home games at the same time or to be all away simultaneously. Thus, in order to get an admissible schedule, one could for instance divide the 2n teams and group them into n groups of 2 teams which are geographically located quite close to each other. In a good schedule one would like to have in each group 2 teams with HAP’s (the HAP of a team i is simply the ith row of the HAP) as different as possible.

The HAP’s of 2 teams i and j are said to be complementary if for each day d, teams i and j are not both away or both at home; the HAP of a team will correspond to the pattern of a node: H means of course that the arc is directed into the node and A that it is directed out of the node.

Proposition 5. Let PI, . . . , p2n-1 be any oriented coloring of F2, with exactly 2n - 2 breaks; then the set of nodes of K2, can be partitioned into n subsets TI,. . . T, such that lTil = 2 and in each Ti the nodes have complementary patterns.

Proof. In such a coloring, there are 2 nodes without breaks; these nodes clearly have complementary profiles (since no two nodes can have the same pattern). Each one of the remaining nodes has one break. One can never have

Page 11: [North-Holland Mathematics Studies] Annals of Discrete Mathematics (11) - Studies on Graphs and Discrete Programming Volume 59 || Scheduling in Sports

Scheduling in sporrs 391

an odd number of breaks for some colour d, because in each column of the HAP, there are exactly n H’s and n A’s.

So let i be one of the nodes with one break; choose i to be one of the nodes which is the first to have a break (i.e. it occurs for colour d and for any d ’ < d , no node has breaks).

Suppose that the pattern of i contains a H in column d and a H in column d + l . From the above remarks, there must exist a team j with a break for color d and more precisely with an A in the dth and in the ( d + 1)th column of its pattern. Since i and j have exactly one break, their patterns must be complementary (also for colors c # d, d + 1); nodes i and j are placed into a subset ti and removed. By repeating this argument, one gets the partition into subsets Tl, . . . , T2,. 0

Remark 5. Obviously if there are more than 2n - 2 breaks, each node i may not be grouped with a node j having a complementary pattern (see Fig. 1).

In the oriented coloring constructed in the proof of Proposition 2 , we have

An immediate consequence of Proposition 5 is the following: the following partition: Ti = {2i, 2i + 1) ( i = 1 , 2 , . . . , n - 1) and T1 = {2n, 1).

Corollary 5.1. In any oriented coloring Fl, . . . , p2n-1 of K2, with 2n - 2 breaks, for any c ( 2 s c S 2n - 1) there are 0 or 2 nodes having a break for color c.

Proof. If there were 4 nodes having a break for the same color c, there would exist 2 nodes with the same HAP, which is impossible.

So for Kzn a HAP with 2n - 2 breaks can be completely characterized (up to a permutation of its rows) by the n - 1 indices c ( 2 d c d 2n - 1) where breaks occur (in pairs). Let B(X) = ( b l , . . . , bn-J where 2 bl < b2 < * - < bn-l S

2n - 1 be the sequence thus associated with a HAP X having 2n - 2 breaks.

5. Feasible and canonically feasible sequences

A sequence B = (b , , . . . , bn-l) is feasible for K2, if there is an oriented coloring of K2, (with 2n - 2 breaks) whose HAP X can be characterized by a sequence B(X) = B. Not all sequences B with 2 < bl < * * * < bnWl are feasible: for instance for 2n = 6, only (2,4), (3,4) and (3,5) are feasible.

Proposition 6. Any feasible sequence B = ( b l , . . . , bnp1) satisfies bl 6 n and b,-l L n + 1.

Page 12: [North-Holland Mathematics Studies] Annals of Discrete Mathematics (11) - Studies on Graphs and Discrete Programming Volume 59 || Scheduling in Sports

392 D. de Werra

In other words, in any oriented coloring of K2,, with 2 n - 2 breaks, the first breaks must occur for some color c C n and the last ones must occur for some color c z n f l .

Proof. Let (g1, . . . , g2,,-,) be an oriented coloring of K2,, with 2n - 2 breaks; suppose b, > n; then there are no breaks for colours 1,2, . . . , n.

The only way of getting such a coloring is to split the 2n nodes of K2,, into 2 subsets A and B with \A\ = \I31 = n.

Each f i (for i = 1 , 2 , . . . , n) must be a 1-factor in the bipartite complete graph constructed on A and B.

Then the arcs in U. - U g2n-1 must form 2 disjoint complete graphs G,, G2 on n nodes each. If n is odd, the arc set of Gi (i = 1 , 2 ) cannot be partitioned into 1-factors; if n is even, there will be i n nodes in each Gi with a break for color n. If n 2 4 , according to Corollary 5.1 (Pl,. . . , F2,-,) cannot give 2 n - 2 breaks. Hence bl 6 n. The case b,,-.l 3 n + 1 is obtained by taking F1,. . . , FZnpl in reverse order. 0 -, -

- Remark 6. If n is even, there may exist oriented colorings (PI, g2,. . . , F2n-1) of Kzn such that no breaks occur for colors 1,2 , . . . , n. But if n 3 4, Proposi- tion 6 says that the total number of breaks will be more than 2 n - 2 . For 2n = 6, Proposition 4 implies that the sequences B , = (2 ,3) and B2 = (4,5) are not feasible. Notice that (2 ,5) is also not feasible (if it were feasible, then from any oriented coloring (P1,. . . , p5) one could get another oriented coloring (g2, p3, g4, g5, g1) corresponding to the sequence B2.

Before stating the next result related to canonical 1-factorization, we will need the following property.

Lemma 1. Let F,, F,, Fq (1 < p C q 6 2 n - 1) be 1-factors in a canonical 1- factorization of K2n; then the partial graph generated by Flu F, UF, has a triangle.

Proof. Consider nodes q + p - 1 and q - (p - 1) (these numbers are taken modulo 2 n - 1 and satisfy l G q + p - l S 2 n - l , l G q - ( p - l ) 6 2 n - l ) . Nodes q + p - 1 and q - (p - 1) are distinct: otherwise we would have p - 1 = -(p - 1) (mod 2n - l), i.e. 2p - 2 = 0 (mod 2n - l), i.e. 2p - 2 B 4n - 2 because 2p - 2 is even; but p s 2n - 2 implies 2p - 2 G 4 n - 6 , which is impossible.

Furthermore q + p - 1 and q - (p - 1) are joined by an edge of Fqe since the edges of Fq are of the form (q + k, q - k).

Besides neither q + p - 1 nor q - (p - 1) can be node 2n. We will now show that q + p - 1 and q - (p - 1) are joined by a chain of length 2 in Fl U F, ; this will prove that the partial graph generated by F1 U Fp U Fq has a triangle.

Page 13: [North-Holland Mathematics Studies] Annals of Discrete Mathematics (11) - Studies on Graphs and Discrete Programming Volume 59 || Scheduling in Sports

Scheduling in sports 393

Let e be the edge of Fp which is adjacent to node q + p - 1; since q + p - 1 is neither 2n nor p (this would imply q = 1 mod(2n - l), which is impossible since l < q < 2 n - l ) , e is of the form (p+k ,p - k), so its second endpoint is p - q + l ; now let f be the edge of F1 which is adjacent to p - q + l . Again p -q + 1 is neither 2n nor p, so f is of the form (1 + k, 1 - k); so its second endpoint is q - p + 1. Hence the chain consisting of edges e and f has length 2 and joins nodes q + p - 1 and q - p + l .

A sequence B = (bl , b2, . . . , b,,-,) will be called canonically feasible for K,, if there exists an oriented coloring of K2, (with 2n - 2 breaks) obtained from a canonical l-factorization of K,, whose HAP is characterized by sequence B.

Proposition 7. B is canonically feasible for K,, if for any color i (2 S i S 2n - 1) there is a break either for color i or for color i + 1.

Proof. (A) Suppose that B satisfies the condition; then there exists at most one pair of consecutive colors c, c + 1 with breaks (if there were 3 consecutive such colors or more than one such pair, there would exist 2 consecutive colors without breaks because we have n - 1 colors with breaks in a collection of 2n - 2 colors). We shall start from the oriented coloring con- structed in the proof of Proposition 2 and reorient if necessary the arcs adjacent to node 2n. As before we refer to entry (i,j) of the corresponding HAP when we consider the element located in row i (i.e. node i) and column j (i.e. color j ) . The reorientation consists in modifying the values of entries (i, i) and (2n, i) for i = 1,. . . , 2 n - 1. Notice that all entries (i, i + 1) are H‘s and all entries (i + 1, i) are A’s (see Fig. 2(p)).

If there are no consecutive colors with breaks, one can fill the cells (i, i) with A’s and H’s alternately starting with H if bl = 2 or with A if b, = 3; in entry (2n, i) we put an H if (i, i) has an A and conversely. One verifies that in both cases breaks are occurring for colors bl, b,, . . . , bnPl. Otherwise let c, c + l be the pair of consecutive colors with breaks; we start filling the entries ( i , i) as before until we reach row c + 1; we place the same symbol in (c+1, c + l ) as in (c, c) and then we continue filling cells (c+2, c+2), (c+ 3, c + 3), . . . , (2n - 1,2n - 1) alternately with H’s and A’s. Again one verifies that breaks are occurring for colors b l , b2,. . . , bn-l; here nodes c and c - 1 have a break for color c, while nodes c + l and 2n have a break for color c + l .

Fig. 6 shows an example of this construction for 2n = 8 and for B = (3 ,4 ,6) . (B) Conversely if B is a sequence which does not satisfy the condition, there

must exist 2 consecutive colors i, i + 1 (with i S 2) for which no breaks occur. If (GI,. . . , fi2n-1) is an oriented coloring associated with B, then the partial graph generated by fii-l U l!fi U Ri+, where fip is the set of arcs with d o u r p

Page 14: [North-Holland Mathematics Studies] Annals of Discrete Mathematics (11) - Studies on Graphs and Discrete Programming Volume 59 || Scheduling in Sports

3 94 D. de Werra

1

2

3

4

5

6

7

nodes

a

4 . 4 .

3l = $1 277 ... 5., = $2 3 3

b3 = $3 z2

b4 = $4 <3 ... $5 = $5 $4

b6 = $6 ?5

??7 = $7 1"6 ...

B = ( 3 , 4 , 6 )

Fig. 6.

must satisfy the following: for each node j the arcs of f i i - ] and of f i i + , which are adjacent to j must be both either directed out of j or directed into j, while the arc of fii-l adjacent to j has the opposite orientation. This implies that

U f i i U I f i + l generates a bipartite graph. But this is impossible from Lemma 1, hence B is not canonically feasible. 0

Notice that for 2n = 8 , among the 20(=CZT2) possible sequences B = (bl , b2, b3) only 4 are canonically feasible, namely (3,5,7), (3,5,6), (3,4,6) and (2,4,6). There are 4 more sequences which are feasible but not canoni- cally feasible: (2,4,5), (3,4,7), (2,5,6) and (4,5,7). One can show that the 12 remaining sequences are not feasible.

6. Find remarks

One reason for being interested in oriented colorings derived from canonical 1-factorizations is given in the following result:

Proposition 8. Let fi= (Fl, . . . , F2n-1) be an oriented coloring derived from a canonical 1-factorization of KZn; let hl , hZ, . . . , 9 be a sequence of positive integers such that h , + * * * + 9 = n(2n - 1) and hi C n for i = 1, . . . , p (where h i = n only if h,+.-.+hi=O (modn)).

Then there exists a partition fi = (a1, fi2, . . . , fip) of PI U * * * U F2n-1 such that

(1) each Hi is a subset of hi nonadjacent arcs, (2 ) the total number of breaks in k is the same as in F.

Page 15: [North-Holland Mathematics Studies] Annals of Discrete Mathematics (11) - Studies on Graphs and Discrete Programming Volume 59 || Scheduling in Sports

Scheduling in sports 395

Recall that in fi a node i has a break for color d if there is a color c < d such that no fie (c C e < d ) has an arc adjacent to node i and the arcs of fiC and of fid adjacent to i are both oriented out of i or both oriented into i (see Remark 1).

Proof. Let (qo, ai l , . . . , q,) be the edges corresponding to the arcs of Fi as defined previously. Clearly by taking the edges of F1 first, then the edges of F2 and so on in the order aio, ail, . . . , a,,, we get a sequence S of n(2n - 1) edges. Any set of c (with c < n ) consecutive edges in the sequence corresponds to nonadjacent edges: this is obvious if all c edges belong to the same 6 (in this case we can have c = n); otherwise Hi ={aik, a i , k + l , . . . , a,,, u , + ~ , ~ , u , + ~ , ~ , . . . , u , + ~ , ~ } also correspond to nonadjacent edges if p 6 k -2 because the edge of F, , , adjacent to node i+q ( q a k ) is ai+l,q-l and the edge of adjacent to node i-q ( q z = k ) is u , + ~ , ~ + ~ and neither ai+l,q-l nor ai+l,q+l are in Hi. Hence by splitting the sequence S into subsequences of hl, h2 , . . ., h, elements, one gets the required coloring. 0

This situation corresponds to the case where all games cannot be played simultaneously &I: for commercial reasons, this may happen when the different teams are concentrated on a rather small area where the public may easily attend games played in different places.

In practice there are other constraints which are to be introduced into the model such as unavailability constraints which compel some teams to have more than one break in their schedule.

These constraints generate many problems which can be formulated in graph theoretical terms; some of these will be discussed later.

References

[l] Z. Baranyai, On the factorization of the complete uniform hypergraph, in: Hajnal, Rado, S s ,

[2] C. Berge, Graphs and Hypergraphs (North-Holland, Amsterdam, 1973). [3] W.O. Cain, Jr., The computer-assisted heuristic approach used to schedule the major league

baseball clubs, in: S.P. Ladany, R.E. Machol, eds., Optimal Strategies in Sports (North- Holland, Amsterdam, 1977) 32-41.

[4] R.T. Campbell and D.S. Chen, A minimum diaance basketball scheduling problem, in: R.E. Machol, S.P. Ladany, eds., Management Science in Sports (North-Holland, New York, 1976),

eds., Infinite and Finite Sets I (North-Holland, Amsterdam, 1975) 91-108.

15-25. [5] F. Harary, Graph Theory (Addison-Wesley, Reading, MA, 1969). [6] U. Weisner, Planung von Turnieren-Kombinatorische Analyse und Algorithmen, Dissertation

[7] D. de Werra, Partial compactness in chromatic scheduling, Operations Res. Verfahren 32 Nr. 5313, Swiss Federal Institute of Technology, Zurich (1974).

(1979) 207-219.