A Variant of the Round-Robin Scheduling Problem

: We consider the following variant of the round-robin scheduling problem: 2 n people play a number of rounds in which two opposing teams of n players are reassembled in each round. Each two players should play at least once in the same team, and each two players should play at least once in opposing teams. We provide an explicit formula for calculating the minimal numbers of rounds needed to satisfy both conditions. Moreover, we also show how one can construct the corresponding playing schedules


Description of the Problem
Scheduling problems for sports tournaments are a broad and extensively researched field in combinatorics, operations research and combinatorial optimization.A prominent example is the roundrobin tournament problem with applications, e.g., in computer science (see, e.g., [1][2][3][4][5][6][7] to mention just some of the most recent work on the subject).Another one is the traveling tournament problem (see, e.g., [8][9][10]).In this article we will study a variant where not fixed teams play against each other but the teams are shuffled in each round of a tournament.
We deal with the following combinatorial problem: suppose 2n people are playing a sports tournament which consists of different rounds.In each round two new teams of n people are reassembled to play against each other.We would like to find a playing schedule such that the following conditions are satisfied: (s) each two players have been at least once in the same team, and (o) each two players have played at least once in opposing teams.
The general question is: what is the minimal number f s,o (n) of rounds of the tournament so that the conditions (s) and (o) are satisfied and what is an optimal playing schedule?We shall give a complete answer to both questions.The main goal of this paper is to prove the following result: An intriguing feature of the problem is that the sequence is not monotone.The paper is organized as follows.We start by considering the conditions (s) in Section 2 and (o) in Section 3 separately.The combined problem of finding an optimal playing schedule satisfying both conditions (s) and (o) is treated in Section 4. In particular, this section will contain the proof of the main Theorem 1.But first, we fix some notation and notions that we will use in the sequel.

Notions and Notation
We write S k×m to denote an array of k rows and m columns with entries s i, j ∈ {0, 1} in row i and column j.If the dimension of the array is clear from the context, we just write S .The columns of S k×m are denoted by C j , j = 1, . . ., m.Two columns are called complementary if their componentwise sum is 1 modulo 2. We write C for the complementary column of C.
An array S k×2n is called a playing schedule of length k for 2n players.If each row of S contains n 0's and n 1's, it is called a valid playing schedule.
The interpretation is as follows: the entry s i, j ∈ {0, 1} means that in game i player j plays in team s i, j .Observe that S satisfies (s) if it does not contain complementary columns, and S satisfies (o) if all columns are different.A valid playing schedule S is called admissible if it satisfies both conditions, (s) and (o).
The concept of a playing schedule satisfying the condition (o) is related to the notion of separating systems which goes back to Rényi [11] (see also Katona [12]).Definition 1.A separating system on a finite set M is a collection {A 1 , A 2 , . . ., A k } of subsets of M such that for every pair of distinct elements x, y ∈ M, there exists i ∈ {1, 2, . . ., k} with either x ∈ A i , y A i or x A i , y ∈ A i .Moreover, a covering separating system is a separating system such that M is the union of the sets A i .More specifically, we call a covering separating system an (n, k)-covering separating system if |M| = n and for all i we have We can interpret a playing schedule S of length k for 2n players as a set M = {1, 2, . . ., 2n} and a collection {A 1 , A 2 , . . ., A k } of subsets of M with |A i | = n, such that j ∈ A i if and only if s i, j = 1.Then we clearly have that S satisfies the condition (o) if and only if {A 1 , A 2 , . . ., A k } is a separating system on M. Definition 2. Two columns C i , C j of a playing schedule S k,2n are called equivalent, be a playing schedule, then the columns C 1 , C 3 and C 4 are equivalent, and hence the characteristic of these columns is 3, while the characteristic of C 3 is 1.
is an admissible extension of S of length 2, and The playing schedule S ′ is valid and sufficient and hence admissible.

Optimal Playing Schedule for Condition (s)
In this section we neglect condition (o) and consider only condition (s).We will denote by f s (n) the minimal number of rounds needed to satisfy condition (s).We find: is a playing schedule satisfying condition (s).Here each of the four subarrays in S contains n 2 columns.If n is odd, a possible playing schedule has the form where each of the four big subarrays contained in the middle of S consists of n−1 2 columns.Each entry marked with * can be independently replaced by either 0 or 1 as long as the condition is satisfied that the last row of S contains the same number of 0's and 1's.
It remains to show that no shorter playing schedules exists.To see this, notice first that columns (and rows) of a playing schedule S which satisfies condition (s) can be permuted and the result is still a playing schedule which satisfies condition (s).In particular we may assume that the first row of S has the form 0 0 . . .0 1 1 . . . 1 .
We now state condition (s) in the following form: for each pair (k, l) with 1 ≤ k < l ≤ 2n there is a j such that s j,k = s j,l .These are 2n 2 conditions.The first row saturates 2 n 2 such conditions.So the remaining rows must satisfy the remaining 2n 2 − 2 n 2 = n 2 conditions.Suppose the second row consists of n 1 zeros and n − n 1 ones in the first n columns, and hence n − n 1 zeros and n 1 ones in the last n columns.This gives additional 2n 1 (n − n 1 ) < n 2 conditions to the conditions which are already satisfied by the first row.This implies that S cannot satisfy condition (s) if it has only two rows.
Similarly for the third row of S : It consists of n 2 zeros and n − n 2 ones in the first n columns, and hence n − n 2 zeros and n 2 ones in the last n columns.This provides at most 2n 2 (n − n 2 ) additional conditions to the conditions we already have.Observe that Hence, if n is odd, S cannot satisfy condition (s) if it has only three rows.This completes the proof.□

Optimal Playing Schedule for Condition (o)
In this section we neglect condition (s) and consider only condition (o).We denote by f o (n) the minimal number of rounds required to satisfy condition (o).In the language of separating systems we need a separating system A 1 , A 2 , . . ., A m with minimal m on the set {1, 2, . . ., 2n} such that every set A i hat cardinality n.We find the following.
For this it is enough to construct a playing schedule of length m ⌈log 2 (n)⌉ + 1 = ⌈log 2 (2n)⌉ for 2n players.Since there exist more than 2n different columns (note that 2n ≤ 2 ⌈log 2 (2n)⌉ ) of length m with entries in {0, 1}, we can find n different columns having 0 as last entry.Then we define S to be the array which contains all these columns and their complements.Since all columns in S are different, (o) is satisfied.Moreover S is valid by construction (see Example 3).
On the other hand, the minimal separating system of a set of 2n elements has at least cardinality ⌈log 2 n⌉ + 1 (see [11]).Indeed, to show the inequality f o (n) ≤ ⌈log 2 (n)⌉ + 1 we argue as follows: A playing schedule with length strictly smaller than ⌈log 2 (n)⌉+1 for 2n players contains at least one pair of identical columns by the pigeonhole principle.Hence, no such playing schedule satisfies (o).□ Example 3. We illustrate the construction of an optimal playing schedule S for n = 11.The gray subarray is our choice of columns with length 5 (the columns correspond to the binary representation of the numbers 0, 1, 2, . . ., 10) where the last entry is 0 and the white subarray is the complement of the grey one.Then S is a playing schedule of minimal length satisfying (o).

Optimal Playing Schedule for Condition (s) and (o)
To find an optimal playing schedule for 2n players that satisfies both conditions (s) and (o) is considerably harder than for just one of the two conditions.We start with lower and upper bounds for the minimal length f s,o (n) for particular values of n.These bounds are improved and extended gradually, and finally lead to a proof of the main Theorem 1.

Bounds for
Here, χ even (n) = 1 if n is even, and 0 if n is odd.In this section we would like to improve these bounds.
By using covering separating systems we can estimate k := f s,o (n) from below.Assume that we have a minimal valid playing schedule S of length k for 2n players.Without loss of generality, we can assume that player 2n is always in the team 1, i.e., the last column of S consists of 1's, and the first n players play against the second n players in the first game.Hence, the first row of S consists of n 0's followed by n 1's.Consider now the collection otherwise S would violate the conditions (s) and/or (o).Hence, by Phanalasy et al. [13,Lemma 5] we get that k ≥ ⌊log 2 (n)⌋ + 2. If n = 2 m for m ∈ N \ {0}, then this estimate coincides with the next result.In every other case we will find a better lower bound for k.
Proof.Let k := f s,o (n).Then there exists a playing schedule S with k rows and 2n columns.Since S is admissible, the columns of S are all different, and no two columns of S are complementary to each other.There exist 2 k different columns of length k.However, only 2 k−1 of these are not complementary and this number must be larger than or equal to the number of columns in S .Hence, we get 2 k−1 ≥ 2n which proves the proposition.□ In this section we determine f s,o (n) if n is a power of 2.Moreover, we find an upper bound for To prove this theorem, we need the following lemma: Proof.We show that a valid playing schedule S of length f s,o (2 m−1 ) for 2 m players can be extended to a valid playing schedule S + of length f s,o (2 m−1 ) + 1 for 2 m+1 players.To do so, we define the columns of S + by Observe that all columns of S + are different from each other and not complementary to another column in S + .Hence, S + defines a valid and admissible playing schedule for 2 m+1 players.□ With this preparation we are ready for the proof of Theorem 4.
Proof of Theorem 4. For m = 1 the statement is true by Example 4. Now we assume that this is the case for an arbitrary m and show it for m + 1.By using Proposition 1, Lemma 1 and the induction hypothesis f s,o (2 m ) = m + 2 we get the desired result Let S be a valid and admissible playing schedule for 4 players of length 3, as in Example 4: .
Following the construction in the proof of Lemma 1, we obtain an optimal playing schedule for 8 players.
We will now introduce a helpful tool which we use to prove the upper bound of f s,o (n).Proof.The case n = 2 is verified by Example 4. Therefore let n ∈ N \ {0, 1, 2}, and m ∈ N \ {0} the unique value such that 2 m < n ≤ 2 m+1 .Let S be a valid and admissible playing schedule of length m+2 for 2 m+1 players (see Theorem 4).We construct a playing schedule S + of length ⌈log 2 (n)⌉ + 3 = m + 4 for 2n players as follows.
For the columns , where ). Observe that S + is admissible because S was admissible.It remains to show that S + is valid.The first m + 2 rows contain the same number of 0's and 1's by construction.Observe, that we used all columns of S and added pairs of columns and their complements.For the last two rows we choose the * 's in the C + i as follows.The numbers of triplets in S + and the number of C + i are either both even or both odd.In the even case the extensions in the C + i must be chosen such the last two rows of the C + i contain the same number of 0's and 1's.In the odd case, there must be one more 0 than 1's in the second last row of the C + i , and three 1's more than 0's in the last row.The result is a valid and admissible playing schedule S + of length m + 4 for 2n players.□ Example 6.Consider the case n = 3.We start with a valid and admissible playing schedule S for 4 players of length 3: We have The construction in the proof of Proposition 2 yields S + = (T (C 1 ) are chosen such that S + is valid.A possibility is .

The Case n Even
So far we know that for each n ∈ N \ {0, 1} there are only two possible values for f s,o (n).In this section determine the exact value of f s,o (n) for even n.
Proof.We start with an admissible playing schedule for 4 players.For example, we can consider with columns C 1 , . . ., C 4 .Since n = 2m, an admissible and valid playing schedule for n consists of 4m players.We define the arrays with m columns for i = 1, . . ., 4. The idea is now to find a playing schedule for 2m players of length ⌈log 2 (n)⌉ + 2 = ⌈log 2 (m)⌉ + 3, of the form Here E consists of m different column vectors of length ⌈log 2 (m)⌉.Observe that two columns from different arrays S i are neither the same nor the complement of each other.Hence, S + is a valid and admissible playing schedule for 2n players.This implies f s,o (n) ≤ ⌈log 2 (n)⌉ + 2 and the result follows by Corollary 1. □ n is even, we can alternatively define a playing schedule in the following way: Choose n different pairs of columns of length ⌈log 2 (n)⌉ + 1 such that the columns in each pair are complementary.Then define S as the array containing all columns of these pairs such that the columns of each pair belong either to the first n or to the last n columns of S (note that this only works if n is even).If we extend S by the row containing n 0's followed by n 1's, then S + = S ⊕ E is valid and there are no columns in S + which are equal or the complement of each other.Hence, S + satisfies (o) and (s) and its length is

The Case n Odd
The case n odd is more delicate than the case n even.We start with some general considerations.In the proof of Proposition 2 we had to extend the triplets by an extension of length 2. We now ask, by how many rows must a given playing schedule be extended in order to obtain an admissible playing schedule.For this, the characteristic of the columns (see Definitions 2 and 3) plays the decisive role.More concretely, we find a lower bound for the length of an admissible extension as a function of its largest characteristic.Theorem 6.Let S be a playing schedule, and k be the maximal characteristic of the columns in S .Then an admissible extension of S has at least length ⌈log 2 (k)⌉.
Proof.Let C u be a column of S with maximal characteristic k, and U the array built from the columns in the equivalence class of C u .We show that the minimal length t of an admissible extension E of U is at least ⌈log 2 (k)⌉.
Observe first that the maximal characteristic of the columns of E is ≤ 2. To see this, assume that this is not the case.Then there are three equivalent columns in E, say , where C j ′ ∼ C j ′′ ∼ C j ′′′ by assumption.Since E is supposed to be sufficient, any two of the vectors C ′ j ′ , C ′ j ′′ , C ′ j ′′′ are pairwise distinct and pairwise nonequivalent.At least two of the vectors C j ′ , C j ′′ , C j ′′′ are equal, say C j ′ = C j ′′ .It follows that E j ′ = E j ′′ .But then, in the case C j ′′′ = C j ′ as well as in the case C j ′′′ = C j ′ , E j ′′′ can neither be equal to E j ′ nor to E j ′′ .So, we have a contradiction.
We know now that the characteristic of the columns in E can be at most 2. On the other hand if E is an extension of length t, then we find at most 2 t−1 different equivalence classes among the columns of E. Hence, the number of columns of E must be bounded by k because and this completes the proof.□ Remark 1.Note that the last inequality becomes an equality if there are exactly 2 t−1 equivalence classes in the columns of E, and each equivalence class consists of two columns.Also note that the number of equivalence classes of the columns of E must be at least k 2 .Example 7. Let U = 0 0 1 1 0 0 1 1 .
The maximal characteristic is k = 4, and hence the minimal length of a sufficient extension E of U is 2. For example, we can choose E = 0 1 0 1 0 1 1 0 and get In the following we will analyse the structure of the equivalence classes more closely.We only need to discuss the case when M 1 and M 2 have the same odd cardinality as we see later.In order to prove Theorem 7 we will show that the columns of E must contain at least q + 2 equivalence classes.This is done in the next two lemmas.Lemma 2. For an admissible extension E of U, the columns of E must contain more than q equivalence classes.
Proof.We have seen in the proof of Theorem 6 that each equivalence class of columns of E contains at most 2 elements.Hence, the columns of E contain at least q equivalence classes.Assume now that here are exactly q equivalence classes and work towards a contradiction.In this situation every equivalence class contains two elements.These two elements are either equal or the complement of each other.Hence, we can choose representatives E 1 , E 2 , . . ., E q of each equivalence class, and a natural number 0 ≤ c ≤ q such that, after reordering the columns if necessary, we have Since the columns of U all belong to the same equivalence class, and U ′ is admissible by assumption, there exists a column C in U such that where two consecutive * are either equal to C or C.However, the number of consecutive pairs of C and C in U must be the same.Hence, the number of * in U must be divisible by 4 and so q − c is even and c is odd.
Moreover, since E is valid, we have that ) must also be valid and hence E ′′ := (E 1 , E 2 . . ., E c ) is also valid.However, E ′′ cannot be valid because its number of columns is c and c is odd.Thus, we get a contradiction.□ Lemma 3.For an admissible extension E of U, the columns of E must contain more than q + 1 equivalence classes.
Proof.By Lemma 2 we already know that the columns of E contain at least q + 1 equivalence classes.
To obtain a contradiction, assume that they contain exactly q + 1 equivalence classes.Then there are exactly q − 1 equivalence classes with 2 elements, and 2 equivalence classes with 1 element.Hence, we can assume that there exists a natural number 0 ≤ c ≤ q − 1 such that for a choice of representatives E ).
Define now .
Since E is an admissible extension of U, E ′ is not valid because otherwise (E q , E q+1 ) would also be valid and so E q and E q+1 would be in the same equivalence class which is not the case.Thus, E c ) cannot be valid.We now consider separately the cases, c even and c odd.Let c be even.Since E ′′ is not valid, there exists a row such that the difference of 0's and 1's in this row is at least 2. Hence, there is a row in E ′ such that the difference between the 0's and 1's is at least 4. Adding the missing two columns with characteristic 1 cannot make this playing schedule valid.Therefore we have a contradiction.
Let c be odd.Then the difference of 0's and 1's in each row of E ′′ must be at least 1, and the difference of 0's and 1's in each row of E ′ is at least 2. Thus, adding two columns to E ′ to make it valid means that the two added columns E q and E q+1 must be equal and this is a contradiction because they do not belong to the same equivalence class by assumption.□ Theorem 7 follows now from the lemma above.
Proof of Theorem 7. We showed that the columns of E contain at least q + 2 different equivalence classes.Then the result follows from the inequality 2 t−1 ≥ q + 2.

□
Remark 2. For q = 1 it is not possible to find an admissible extension.However, we will now show that for q > 1 we can construct an admissible extension with q + 2 equivalence classes.This will be the last building block we need to prove Theorem 1. ).

Example 4 .
Consider a playing schedule S for 2n = 4 players.By the inequality 2 k−1 ≥ 2n in the proof of Proposition 1 where k := f s,o (n), we have that k ≥ 3.In fact, we can find the following valid and admissible playing schedule for k = 3, and hence f s,o (2) = 3:

Definition 4 .Proposition 2 .
For a column C of a playing schedule, we call the array T (C) consisting of the three columns C, C, C a triplet of C. For all n ∈ N \ {0, 1} we have f s,o (n) ≤ ⌈log 2 (n)⌉ + 3.

Theorem 7 .
Let S be a playing schedule, and [C u ] be the equivalence class of a column of S with characteristic k > 1. Assume that the setsM 1 := {C j ∈ [C u ] : C j = C u } and M 2 := {C j ∈ [C u ] : C j = C u } have odd cardinality q := |M 1 | = |M 2 | > 1.Let U be the array built from the columns in [C u ].Then the minimal length t of an admissible extension E of U satisfies t ≥ ⌈log 2 (q + 2)⌉ + 1.

Proposition 3 .
Let S be a playing schedule, and [C u ] be the equivalence class of a column of S with characteristic k > 1. Assume that the setsM 1 := {C j ∈ [C u ] : C j = C u } and M 2 := {C j ∈ [C u ] : C j = C u }, have odd cardinality q := |M 1 | = |M 2 | > 1.Let U be the array built from the columns in [C u ].Then the minimal length t of an admissible extension E of U is t = ⌈log 2 (q + 2)⌉ + 1.Proof.By Lemma 3 it remains to show that an admissible extension E of U exists such that the columns of E contain exactly q + 2 equivalence classes.Without loss of generality (by renumbering players), we can assume that U has the form U = (C, . . ., C q times , C, . . ., C q times Definition 3. Let S k×2n and E t×2n be two playing schedules.Then we can build a new playing schedule S ′ = S ⊕ E with k+t rows by putting the array S on top of E (see Example 2).E is called an extension of S of length t.If all columns of S ′ have characteristic 1, then E is called sufficient.If E is valid and sufficient, then it is called an admissible extension.
1 , E 2 , . . ., E q+1 of all equivalence classes.As in Lemma 2, we find a column C in U such that U = (C, C, . . ., C, C