1 Introduction

Teams of high school students have been competing annually at the International Young Physicists’ Tournament (IYPT for short), sometimes referred to as Physics World Cup, since 1988. Each year the international jury publishes a set of 17 problems. In the preparation phase that takes several months, teams can use any resources to solve the problems theoretically and/or experimentally and to prepare a carefully polished presentation of the results they obtain. The competition culminates in regional, national, and international tournaments that are organized in several rounds of small scientific workshops, called Fights. During a Fight, students practice how to lead scientific discussion, ask questions and evaluate the work of their adversaries by taking the roles of a Presenter, an Opponent, a Reviewer, and, occasionally, an Observer. Detailed information about the exact rules, schedule, past problems, winners, etc., can be found on the international webpage http://iypt.org and on the webpages of national committees.

The rules of the international final specify that a team can challenge another team to present a solution of any of the 17 published problems, but for their national and regional tournaments, each of the participating 37 countries can set the rules on their own. This paper deals with the situation that occurs in a few countries (Austria, Germany, Slovakia, Switzerland), where a regional tournament consists of three rounds so that each team participates in exactly three Fights, and in each of these Fights it presents a different problem, taken from the set of three problems it has chosen in advance.

The authors of the present paper have been contacted by members of the Slovak IYPT organizing committee who felt that besides guaranteeing the fulfillment of the necessary criteria stated in the international rules, it is desirable to create comparable conditions for all the participants, to ensure their equal treatment. The first aim of this paper is to formally define the necessary (feasibility) constraints for the schedule of the regional and national tournaments. Then we formulate several fairness conditions, proposed by the organizers of these tournaments. On the theoretical side, we draw a connection between feasible and fair schedules and edge colorings of graphs. On the practical side and to construct fair schedules we propose several integer linear programs and test them on real and randomly generated data.

1.1 Related work

Scheduling problems appear in real life, often connected with the construction of timetables at schools or schedules of sports matches. They are also a popular research topic in Mathematics and Computer Science. Many variants of scheduling problems are difficult to solve in practice even for small instances. Also, scheduling problems were among the first problems proven to be computationally hard theoretically (Ullman, 1975; Even et al., 1976). In solving scheduling problems many different approaches have been used, among them variants of graph coloring problems (Lewis & Thompson, 2011; Januario et al., 2016), integer programming (Briskorn & Drexl, 2009; Atan & Çavdaroǧlu, 2018), constraint programming (Baptiste et al., 2012), application of SAT encoding (Achá & Nieuwenhuis, 2014), and various heuristic algorithms, such as ant colony optimization (Lewis & Thompson, 2011).

Fairness in connection with scheduling appears in different contexts. Several works (Mühlenthaler & Wanka, 2016; Martin et al., 2013) incorporate fairness requirements in the form of soft constraints in addition to hard constraints that define the feasibility of the proposed schedule. Violation of soft constraints incurs penalty and the authors use various aggregation functions (MinMax, MinDev, MinError, Jain index, etc.) to incorporate penalties into the objective function of their model. Here we review progress on the study of fair schedules in the three most relevant fields to our study: work shifts, timetables, and sports tournaments. Finally, we mention several types of student scientific or debating competitions where it might be possible to incorporate some fairness criteria into the preparation of their schedules.

Work shifts Typically, the shift scheduling problem involves determining the number of employees to be assigned to each shift while minimizing the total staffing cost and the number of employees needed. Stolletz and Brunner (2012) consider the following fairness aspects in scheduling work shifts of doctors: stable shift starting times within each week, an even distribution of working hours, and an even assignment of on-call services. The choice of these fairness aspects is based on interviews of the authors with physicians. Bruni and Detti (2014) implement fairness in the form of balancing the total workload among doctors, and also aim for an even distribution of night and weekend shifts within the same department. Martin et al. (2013) consider fairness of shift scheduling for nurses with respect to the assignment to their primary skill, rest times, and time-related constraints concerned with sequences of shift patterns.

Timetables A widespread application of timetable design is creating a timetable for students and teachers in a school. The soft constraints introduced by Mühlenthaler and Wanka (2016) for a university timetable require that each lecture be assigned to a room of sufficient size, the lectures of each course be distributed over a certain minimum, all lectures associated to a curriculum be scheduled in adjacent time slots, the lectures of each course be assigned to the same room, etc. Muklason et al. (2017) deal with examination timetabling. Based on an extensive survey seeking student preferences they use equitability of preparation time between examinations among all student cohorts to form a measure of fairness that is added as a new objective in addition to the standard objectives.

Sports tournaments Fairness plays an essential role also in professional sports tournament scheduling (Drexl & Knust, 2007; Briskorn & Knust, 2010; Van Bulck & Goossens, 2020). In works dealing with the scheduling of round robin tournaments, fairness criteria appear in various forms. Ribeiro and Urrutia (2009) balance the number of cases when teams play two consecutive home or away games, Durán et al. (2021) balance the travel distances of the various teams, Miyashiro and Matsui (2005) aim at equitable home-away assignment, Atan and Çavdaroǧlu (2018) balance the time after the most recent game of two opposing teams, Zeng and Mizuno (2013) try to avoid situations when a team has to play against extremely strong/weak teams consecutively, Suksompong (2016) wants to guarantee at least a certain number of rest days between any consecutive games for each team and balances the difference between the number of games played by any two teams at any point in the schedule, Günneç and Demir (2019) minimize carry-over effects that relate to the opponent’s previous game. In a recent book chapter (Goossens et al., 2020) three fairness issues, namely consecutive home games, the carry-over effect, and the number of rest days each team has between consecutive games are discussed with respect to the necessary trade-offs that have to be made. Timetables that reconcile overall fairness with an equitable distribution of unfairness over the teams are compared and a number of official timetables from major European football competitions are evaluated with respect to fairness criteria.

Student scientific and debating competitions IYPT has its counterpart in mathematics, the International Tournament of Young Mathematicians (ITYM), which has a similar tournament structure, with teams playing the roles of the Presenter, Opponent, Reviewer, and Observer. Another branch of student competitions organized in rounds in which teams take turns are debating tournaments (Neumann & Wiese, 2016; Bradbury et al., 2017). The World Universities Debating Championship is the world’s largest debating tournament and one of the largest annual international student events in the world. At their events, the British Parliamentary format is used, in which four teams participate in each round (The World Universities Debating Championships, 2014). Two teams form the “government” and the other two the “opposition” in each debate room, and the order of speeches assigns a different role to each of the teams. Such competitions promote democratic education and they are shown to significantly enhance student performance in the subject, hence they are currently on the rise (Spies-Butcher, 2007; Pang et al., 2018).

Compared to professional sports tournaments, scheduling scientific or debating competitions for students is an admittedly much less profitable, but highly noble branch of tournament scheduling. To our knowledge, no formal scheduling model for organizing student competitions has been reported on yet. In this work, we make an attempt to demonstrate how students’ competitions can be organized with the aid of integer programming, which not only automates the cumbersome task of scheduling, but also calculates a solution that is provably more fair for the participating students.

1.2 Outline

In Sect. 2 we outline the rules and organization of the IYPT in more detail and in Sect. 3 we formally introduce the studied problem and the related notions. Section 4 is devoted to a discussion of how the edge coloring of bipartite graphs leads to a feasible schedule and to schedules that give each team 3 different order positions in its 3 Fights. We formulate several fairness criteria for schedules; as far as we know, fairness criteria similar to ours have not been considered before in scheduling problems. In Sect. 5 we formulate integer linear programs to find fair schedules fulfilling alternative—weaker and stronger—forms of fairness. Then, in Sect. 6 we report on the results we obtained when the designed ILPs were applied to real data: we used the application sets from regional tournaments in Slovakia in recent years. We also randomly generated sets of applications that have some features similar to the expected situations and performed numerical tests on these random data.

2 Organization of regional tournaments

According to the rules of the Austrian, German, Slovak, and Swiss regional and national tournaments, each team applying for participation announces a subset of exactly 3 problems from the published set of 17 problems. This subset is called the team’s portfolio and it contains the 3 problems the team will present at the tournament. A set of portfolios may look similar to the ones presented in Table 1, which shows the real situation in regional tournaments in the years 2017-2020.

Table 1 Profiles of regional tournaments in years 2017-2020. We use regional tournament Bratislava 2018 as an example instance throughout the entire paper. The participating teams are anonymized by having been given animal names. To indicate which teams are from the same school we use the name of the same animal and distinguish the different teams only by the final digit. Notice that in 2020 in reality two independent regional tournaments were organized, the city of Košice hosted the teams with numbers 1-13 while teams 14-16 were competing in Poprad

The tournament is organized in 3 rounds. In each round, the set of teams is partitioned into rooms, each of which hosts a so-called Fight. The number of teams participating in a Fight is 3 or 4, and the number of stages in a Fight is also 3 or 4, respectively. Now we describe the structure of a Fight.

An assignment of teams to rooms in the rounds also specifies which team will present which problem from their portfolio. Suppose that the set of teams in a room is A, B, C (see Table 2) and assume that these teams have been assigned problems \(p_A\), \(p_B\), and \(p_C\), respectively, to present. In the first stage of the Fight, team A is the Presenter; it delivers a report on problem \(p_A\). Team B is the Opponent. After the report of the Presenter team, the Opponent team evaluates the report, stressing its pros and cons. Afterwards the third team C, the Reviewer, can ask questions to both other teams and then the Reviewer presents an overview of the performance of the Opponent. The stage ends by the Presenter stating some concluding remarks. After that, the jury may ask some short questions to all three active teams. Finally, each jury member shows integer marks from 1 to 10 which are used to calculate the points awarded to each team in that stage.

After a short break, another stage with the same structure begins, but the roles of teams are rotated, as illustrated by Table 2. This means that in stage two, team B is the Presenter, team C is the Opponent and team A is the Reviewer; in stage three team C is the Presenter, team A is the Opponent and team B is the Reviewer. Hence, each team performs each role during a Fight exactly once. The final ordering of the teams is based on the highest number of points collected over all three stages.

Table 2 Schemes for 3- and 4-team Fights, extracted from the IYPT official regulations

If the total number of teams is not divisible by three or if the organizers have some other issues to deal with (e.g., there are not enough rooms on the premises where the tournament takes place, or the number of available qualified jurors is small, etc.), the number of teams in a room may be 4. In such a Fight, the 4 teams also exchange their roles cyclically (see the right hand-side of Table 2), with one of them playing the role of the Observer, which is the team not participating actively in the given stage.

Table 3 The real schedule used in the regional tournament Bratislava 2018

Given the set of portfolios, an important task of the organizers is to prepare a schedule of the tournament. For each team, the schedule specifies the problem, the room, and the stage for each of the three rounds. For example, the schedule depicted in Table 3, which corresponds to the profile Bratislava 2018, instructs team Sharks1 to present problem 4 in room 1 in the first round as the Presenter in the first stage in that Fight. According to the same schedule, Sharks1 will present problem 6 in room 4 in the second round, and it will be the third team to present a problem in that Fight; and, finally, it will present problem 14 in room 3 in the third round, again as the third Presenter in that Fight.

Each schedule has to fulfill the following obvious conditions.

  1. (a)

    Each team presents exactly the 3 problems from its portfolio.

  2. (b)

    No problem is presented more than once during the same Fight.

  3. (c)

    In each Fight, the correct number of problems (3 or 4) is presented.

A schedule fulfilling conditions \((a)-(c)\) is said to be feasible. In Sect. 4 we will see that feasible schedules are guaranteed to exist under very mild conditions.

Table 4 A fair schedule for the regional tournament Bratislava 2018. Since no Fight contains two teams from the same school, this schedule is non-cooperative. Strong fairness does not hold; e.g., team Whales1 deals with problem 4 in Round 2 and Round 3 as well. Team Lions plays role A in all its Fights, thus the schedule is not order fair

A usual requirement of the organizers is to group the teams into Fights so that all participating teams in a Fight come from different schools. Besides avoiding bias and possible help between teams from the same school, such non-cooperative schedules encourage scientific interaction between students who have not met before.

Recall now the cyclic exchange of roles of teams within a Fight, defined in Table 2. A team may feel to be put at a disadvantage if it plays the role of team A in all its Fights, because then it has to start each of these Fights as the first Presenter. So we introduce another fairness notion: we say that a schedule is order fair if each team has three different order positions in its three Fights.

We now explain the most challenging fairness concern for schedules on an intuitive level and by an example. Assume that teams \(t_i\) and \(t_j\) are in the same Fight and team \(t_i\) presents problem p. If team \(t_j\) has problem p in its portfolio too, then it has either presented p before in a previous round or will present it in some later round. In the former case, team \(t_j\) had prepared its own presentation for p, moreover, it has already heard the comments of its own Opponent and Reviewer on problem p, so now team \(t_j\) is likely to be better prepared for the tasks of the Opponent as well as of the Reviewer. In the latter case, team \(t_j\) has a chance to update its own presentation based on what it has heard during the presentation of problem p by team \(t_i\) and also be better prepared for answering the challenges of its future Opponent and Reviewer on problem p. The organizers wish to avoid that such injustice happens.

We say that a feasible schedule is fair if the following condition for each pair of teams \(t_i,t_j\) is fulfilled: If teams \(t_i,t_j\) are in the same Fight at any time during the tournament and team \(t_i\) presents problem p in this Fight, then problem p is not in the portfolio of team \(t_j\).

In reality, it has not always been the case that the used schedules fulfilled the fairness requirements. Table 3 depicts the real schedule of the regional tournament Bratislava 2018, corresponding to the set of portfolios from Table 1. Have a look at team Lions. In the first round, it presents problem 9 and sees team Sharks1 presenting problem 4 in the same Fight. In the second round, team Lions presents problem 4 and sees team Sharks2 presenting problem 10. In the final round, team Lions presents problem 10. This means that team Lions had seen two problems from its portfolio, namely problems 4 and 9, before it had to present them. This is clearly unfair, as team Lions had a great advantage to other teams. For the set of portfolios in this regional tournament a fair schedule exists, and it is presented in Table 4.

Notice further that the schedule in Table 4 is also unbalanced in another way. Team Sharks1 has to oppose or review 6 different problems during the tournament, namely problems 2, 3, 7, 9, 10, and 17. By contrast, team Turtles1 opposes or reviews only four problems: 1, 4, 5, and 7. Clearly, this gives Turtles1 another form of advantage to team Sharks1. We will say that a feasible schedule is strongly fair if each team deals with each problem (in any role) during the tournament at most once.

3 Notation and optimality concepts

We start this section with introducing the notation used in this paper. In Sect. 3.1 we define feasible schedules and Sect. 3.2 formalizes various fairness notions.

\(T=\{t_1,\dots ,t_n\} \) is a set of n teams with a partition \({{\mathcal {T}}}=\{T_1,T_2,\dots ,T_\varLambda \}\), where the partition sets are called schools. \(P=\{p_1,\dots ,p_m\}\) is a set of m problems.

Each team t applies with a set of exactly 3 problems from set P; these three problems will be called the portfolio of team t and denoted by P(t). The profile is an n-tuple of portfolios \(\varPi = (P(t_1), P(t_2),\dots , P(t_n))\). For a given \(S\subseteq T\), we denote by P(S) the set of problems that appear in the portfolio of at least one team from S, that is, \(P(S)=\cup _{t\in S} P(t)\). If \(p\notin P(t)\) for team \(t\in T\) and problem \(p\in P\), then we say that team t avoids problem p.

There are s rooms \(R=\{r_1,\dots ,r_s\}\). The set of rooms is partitioned into two subsets \(R_3\) and \(R_4\). If \(r\in R_3\) then room r hosts 3-Fights (i.e., exactly three teams perform a Fight in r); if \(r\in R_4\) then room r hosts 4-Fights (Fights of 4 teams). The size of room r is denoted by \({{\,\mathrm{size}\,}}(r)\). Obviously, \({{\,\mathrm{size}\,}}(r)=3\) for \(r\in R_3\) and \({{\,\mathrm{size}\,}}(r)=4\) if \(r\in R_4\).

An instance of IYPT is a tuple \((T,P,\varPi ,R)\), denoting the teams, the problems, the profile, and the rooms. Now we describe the output, denoted by \({\mathcal {P}}, {\mathcal {R}},{\mathcal {O}}\). For an integer k, the notation [k] represents the set \(\{1,2,\dots ,k\}\).

There are 3 rounds, and a Fight is uniquely defined by the pair (jr), where j is a round and r is a room. For each of the 3 rounds, each team needs to be assigned the problem it will present, the room in which this presentation will take place, and its stage of presentation within the Fight. We formalize this as follows. The collection \({\mathcal {P}}=\{\pi _j:T\rightarrow P; \ j\in [3]\}\) consists of functions \(\pi _1, \pi _2, \pi _3\), where each of these three functions maps exactly one problem to each team. The value \(\pi _j(t)\) for a given team t is the problem t will present in round j. Another collection of functions is \({\mathcal {R}}=\{\rho _j: T \rightarrow R; \ j\in [3]\}\); where \(\rho _j(t)\) for a given team t specifies the room t is assigned to for round j.

3.1 Feasibility

Now we are ready to define a feasible schedule formally.

Definition 1

A feasible schedule is a pair \(({\mathcal {P}}, {\mathcal {R}})\) where \({\mathcal {P}}=\{\pi _j:T\rightarrow P; \ j\in [3]\}\), \({\mathcal {R}}=\{\rho _j:T\rightarrow R; \ j\in [3]\}\) are mappings of teams to problems and rooms respectively, such that

  1. (i)

    \(\{\pi _1(t),\pi _2(t),\pi _3(t)\}=P(t)\) for each team \(t\in T\);

  2. (ii)

    if \(\rho _j(t)=\rho _j(t')\) then \(\pi _j(t)\ne \pi _j(t')\) for each round \(j\in [3]\) and each pair of different teams \(t,t'\in T\);

  3. (iii)

    \(|\{t\in T\ :\ \rho _j(t)=r\}|={{\,\mathrm{size}\,}}(r)\) for each round \(j\in [3]\) and each room \(r\in R\);

Condition (i) of Definition 1 makes certain that each team presents exactly the problems from its portfolio during the tournament; condition (ii) means that in no Fight the same problem is presented more than once; condition (iii) ensures the correct number of teams for each room, i.e., this should be equal to the size of the respective room. These points correspond to the requirements \((a)-(c)\) listed in Sect. 2.

Fig. 1
figure 1

The portfolios Bratislava 2018 from Table 1, represented by the bipartite graph \(G(T)=(T \cup P(T),E_T)\). The team names are abbreviated to their first letter and team number, e.g., S1 denotes Sharks1

Having a feasible schedule, we still have to make sure that exactly one team is chosen to be the Presenter in each stage of a Fight. This is ensured by a collection of three functions \({\mathcal {O}}=\{ \omega _j: T \rightarrow \{A,B,C,D\};\ j\in [3]\}\) that map each team to an element in the order set \(\{A,B,C,D\}\). For team \(t\in T\), function \(\omega _j(t)\) tells in which stage team t will be the Presenter in round j. To simplify notation, capital letters A, B, C, and D will be reserved for denoting that a team plays the role of the Presenter in stage 1, 2, 3, and 4, respectively, within a Fight, see the explanation in Table 2.

Definition 2

Given a feasible schedule \(({\mathcal {P}}, {\mathcal {R}})\), the three mappings \({\mathcal {O}}=\{ \omega _j:T\rightarrow \{A,B,C,D\};\ j\in [3]\}\) such that

\(\{ \omega _j(t)\ :\ \rho _j(t)=r\) for \(t\in T\}=\{A,B,C\}\) for each \(j\in [3]\) and \(r\in R_3\)

and

\(\{ \omega _j(t)\ :\ \rho _j(t)=r\) for \(t\in T\}=\{A,B,C,D\}\) for each \(j\in [3]\) and \(r\in R_4\)

are called the ordering in the schedule \(({\mathcal {P}}, {\mathcal {R}})\).

3.2 Fairness properties

To avoid cooperation of teams from the same school, a schedule might be required to prevent two teams from the same school from participating in the same Fight. We remind the reader that one partition subset from \({\mathcal {T}}\) corresponds to the set of teams from the same school.

Definition 3

A schedule \(({\mathcal {P}}, {\mathcal {R}})\) is non-cooperative if it is feasible and

$$\begin{aligned} \rho _j(t)\ne \rho _j(t') \hbox { for each } j\in [3] \end{aligned}$$

whenever t and \(t'\) belong to the same partition subset \(T_\lambda \in {\mathcal {T}}\), \(\lambda \in [\varLambda ]\).

The following definition ensures that no team has the same ordering position (A, B, C, D) in two Fights it participates in.

Definition 4

An ordering \({{\mathcal {O}}}\) in a feasible schedule \(({\mathcal {P}}, {\mathcal {R}})\) is said to be fair if

$$\begin{aligned} |\{ \omega _1(t), \omega _2(t), \omega _3(t)\}|=3 \hbox { for each } t\in T. \end{aligned}$$

The most striking problem with feasible schedules is that certain teams have considerable advantage to others, if they repeatedly encounter the problems in their own portfolio. In the following, we define 3 degrees of fairness based on restrictions applied to what presentations a team can witness. The condition that no team can see a presentation of a problem in its portfolio by some other team is captured by Definition 5.

Definition 5

A schedule is fair if it is feasible and the following condition holds for all rounds \(j\in [3]\):

$$\begin{aligned} \hbox {if } \rho _j(t)= & {} \rho _j(t') \hbox {for two different teams}\nonumber \\&\quad t,t'\in T \hbox {then}~\pi _j(t)\notin P(t'). \end{aligned}$$
(1)

In some cases, a fair schedule does not exist or it cannot be computed. For these cases, the organizers suggested to ‘sacrifice’ the fairness of the last round. Enforcing the fairness condition (1) only for the first two rounds ensures that no team presents a problem after having watched some other team presenting the same problem, which would be a hard violation of fairness. However, it allows a team to play the role of the Opponent or the Reviewer for a problem it presented in an earlier round. This is perceived to be a milder violation of fairness. The following definition captures this relaxation of fairness.

Definition 6

A schedule is weakly fair if it is feasible and condition (1) holds for rounds \(j=1,2\).

To define a stronger form of fairness, let us introduce the following notation that represents the set of problems that team t deals with in round j in any role (Presenter, Opponent, Reviewer, or, in case of 4-rooms, Observer).

$$\begin{aligned} P(j,t)=\{\pi _j(t') : \rho _j(t)=\rho _j(t') \ \hbox {and}\ {t' \in T}\}. \end{aligned}$$

Definition 7

A schedule is strongly fair if it is feasible and for each team \(t\in T\) the following holds:

$$\begin{aligned}&|P(1,t)\cup P(2,t)\cup P(3,t)| = {{\,\mathrm{size}\,}}(\rho _1(t))\nonumber \\&\quad +{{\,\mathrm{size}\,}}(\rho _2(t))+{{\,\mathrm{size}\,}}(\rho _3(t)). \end{aligned}$$
(2)

In other words, Definition 7 means that no two problems a team t deals with during the tournament are identical. In particular, if \(p\in P(t)\) and team t can see the presentation of problem p in some Fight, then this implies that team t deals with p at least twice (the other occasion is when t presents p) and hence condition (2) is violated for team t. Therefore we have the following relation between fairness notions.

Observation 1

Each strongly fair schedule is fair and each fair schedule is weakly fair.

4 Finding solutions via graph coloring

In this section we utilize edge colorings and basic theorems in matching theory to derive necessary and sufficient conditions for the existence of feasible schedules in Sect. 4.1, and to give a constructive algorithm to compute a fair ordering for a feasible schedule in Sect. 4.2.

4.1 Feasible schedules

We first characterize the existence of solutions that keep the composition of the teams in each room fixed in all three rounds; such schedules will be called simple. The drawback of a simple schedule is that the students can only meet and exchange ideas with a very small subset of other participants. Thus, although simple schedules should be avoided in reality, they represent a convenient approach for the study of the existence of feasible schedules.

Definition 8

A schedule is simple if it is feasible and \(\rho _1(t)=\rho _2(t)=\rho _3(t)\) for each team \(t\in T\).

Let us recall some basic notions of graph theory. A graph is a pair \(G=(V,E)\), where V is a set of vertices and E is a set of edges, i.e., pairs of vertices. We say that G is bipartite, if the vertex set V can be partitioned into two sets so that each edge connects two vertices from different partitions. If \(e=\{u,v\}\) is an edge, we say that edge e is incident to vertices u and v, and that vertices uv are adjacent. The number of edges incident to a vertex v is called its degree and is denoted by \(\deg (v)\); while \(\varDelta (G) = \max _{v \in V(G)}{\deg (v)}\) is the maximum degree in graph G. The neighborhood of a vertex set \(U\subseteq V\) in G is the set of all vertices that are adjacent to vertices in U. For a set of vertices U, we denote by G(U) the subgraph of G containing U, all the edges incident to vertices in U, and the other vertices incident to these edges. A matching in G is a set of edges M such that no two edges in M have a vertex in common. A function \(c:E\rightarrow {{\mathbb {N}}}\) is an edge coloring of G if \(c(e)\ne c(e')\) whenever two edges \(e,e'\) share a common vertex. In this section we shall use König’s edge coloring theorem ( König (1916), see also Diestel (2005), Proposition 5.3.1.), which asserts that a bipartite graph G admits an edge coloring by \(\varDelta (G)\) colors. For a thorough review on the listed and other basic graph-theoretic notions, we recommend consulting the book of Diestel (2005).

For a set of portfolios \(\varPi \) and a subset of teams \(S\subseteq T\) we shall denote by G(S) the bipartite graph \(G(S)=(S\cup P(S),E_S)\) such that the pair \(\{t,p\}\in E_S\) if and only if \(t\in S\) and \(p\in P(t)\). Figure 1 illustrates the graph G(T) for the instance Bratislava 2018 from Table 1.

Fig. 2
figure 2

A special profile \(\varPi \) of 8 portfolios for 17 problems, out of which \(q_7, \ldots , q_{14}\) are not chosen by any team. This instance admits no simple schedule

The official rules of the IYPT prefer 3-team Fights and admit 4-team Fights only if the total number of teams n is not divisible by 3. In such cases, the number of 4-team Fights, i.e., \(|R_4|\), should be equal to n modulo 3. We will deal with the cases when n modulo 3 is equal to 0, 1, and 2 separately.

Theorem 1

If the number of teams n is divisible by 3, then a simple schedule exists.

Proof

Partition the set of teams into 3-rooms arbitrarily. The only thing to ensure a feasible schedule is to decide for each room who will present which problem in which round—without scheduling two presentations of the same problem for the same Fight. Fix a room r and assume that the three teams assigned to the three Fights to be performed in r are \(T(r)=\{t_1,t_2,t_3\}\). Notice that in the bipartite graph G(T(r)) the maximum degree of a vertex is \(\varDelta (G(T(r)))=3\). This is because the degrees of vertices in T(r) are exactly 3 (the size of the portfolio of each team is 3) and the degrees of vertices in P(T(r)) are at most 3. Therefore, by König’s theorem G(T(r)) admits an edge coloring by 3 colors. One color class corresponds to the assignment of problems to be presented by teams in one stage of the Fight. \(\square \)

If n is not divisible by 3, then we need one or two rooms with 4 teams. Now we only need to ensure that the set of portfolios contains a suitable set of 4 teams (or two disjoint quadruples of teams) that can be organized in the same room during the tournament, as the rest of teams can be dealt with according to the previous theorem. Notice that the assignment of problems to be presented in the three rounds in a 4-room containing the set of teams S again corresponds to a 3-coloring of graph G(S). Again, by König’s theorem, this is ensured if \(\varDelta (G(S))=3\). We will call a set of teams \(S\subseteq T\) with \(|S|=4\) fine if \(\varDelta (G(S))=3\).

Now we discuss the case of one 4-room only.

Theorem 2

If the number of teams n fulfills \(n \equiv 1\ (\text {mod}\ 3)\), then a simple schedule exists if and only if each problem \(p\in P\) is avoided by at least one team.

Proof

As we argued above, a simple schedule exists if and only if a fine set of teams exists. Let \(t_1\in T\) be an arbitrary team and let \(P(t_1)=\{p_1,p_2,p_3\}\). Let team \(t_2\) be any team that avoids problem \(p_1\). Now we distinguish three cases. If \(|P(\{t_1,t_2\})|=6\) then the quadruple \(t_1,t_2,t_3,t_4\) is fine for any two teams \(t_3,t_4\). If \(|P(\{t_1,t_2\})|=5\), assume w.l.o.g. that \(P(t_1)\cap P(t_2)=\{p_2\}\). Then choose any team \(t_3\) that avoids problem \(p_2\) and add an arbitrary team \(t_4\). Finally, if \(|P(\{t_1,t_2\})|=4\), then \(P(t_1)\cap P(t_2)=\{p_2,p_3\}\). To get a fine quadruple, choose any team \(t_3\) that avoids \(p_2\). If \(t_3\) happens to avoid \(p_3\) too, choose \(t_4\) arbitrarily, otherwise choose \(t_4\) that avoids problem \(p_3\). The other direction is straightforward: each problem adjacent to any of the four teams in the fine set S is avoided by at least one of the teams in S, because \(\varDelta (G(S))=3\). All other problems are avoided by all teams in S. \(\square \)

Finally, we turn to the case of two 4-rooms. A necessary and sufficient condition for the existence of two disjoint fine sets of teams follows from Corollary 1 of Keszegh (2020). To be able to formulate this assertion, let us call a set \(\varPi \) of n portfolios special if it has the following structure: there are \(n-3\) portfolios of the form \(\{p_i,p_j,p_k\}\) for some \(i,j,k\in [m]\) and the remaining 3 portfolios are of the form \(\{p_i,q_1,q_2\}\), \(\{p_j,q_3,q_4\}\), and \(\{p_k,q_5,q_6\}\), where \(q_u\notin \{p_i,p_j,p_k\}\) for each \(u\in [6]\). A special set of portfolios is illustrated by Figure 2.

Theorem 3

(Keszegh, 2020) For the number of teams n such that \(n \equiv 2\ (\text {mod}\ 3)\) and \(n\ge 8\), a simple schedule with just two 4-rooms exists if and only if the profile \(\varPi \) simultaneously fulfills the following two conditions:

  1. (i)

    each problem is avoided by at least two teams;

  2. (ii)

    \(\varPi \) is not special.

Now we turn to feasible schedules that are not necessarily simple.

Theorem 4

For \(n\ge 8\), a feasible schedule with \(|R_4|=\ell \) exists if and only if each problem is avoided by at least \(\ell \) teams where \(\ell \) is such that \(n\equiv \ell \ (mod\ 3)\).

Proof

Theorems 1 and 2 imply that for \(\ell =0,1\) the condition is sufficient, as in this case a simple schedule exists, which is by definition feasible.

Conversely, if \(n=3k+1\) for some k and a problem p is chosen by all teams, then p must be presented \(3k+1\) times, but the number of Fights is only 3k. Similarly, if \(n=3k+2\) for some k, if a problem p is chosen by at least \(n-1\) teams, then p must be presented at least \(n-1=3k+1\) times in only 3k Fights, which again violates condition (ii) of Definition 1.

Finally, we deal with the case when \(n=3k+2\) for some k and all problems are avoided by at least two teams. If \(\varPi \) is not special, Theorem 3 ensures the existence of a feasible simple schedule. Now we show that a feasible non-simple schedule exists for special profiles. So let problems \(p_i,p_j,p_k\) be chosen by all but 3 teams (among them teams \(t_1,t_2,\dots , t_5\)) and let \(\{p_i,q_1,q_2\}\), \(\{p_j,q_3,q_4\}\), and \(\{p_k,q_5,q_6\}\), where \(q_u\notin \{p_i,p_j,p_k\}\) for each \(u\in [6]\) be the portfolios of teams \(t_6,t_7\), and \(t_8\), respectively. It is easy to see that if we schedule teams \(t_1-t_8\) into two 4-rooms according to Table 5, then for the remaining teams a feasible schedule exists. \(\square \)

Table 5 A feasible schedule for the special set of portfolios in Figure 2

Let us remark that while Theorems 14 imply that a feasible schedule with \(|R_4|\in [0,2]\) can be found in polynomial time, we do not have a necessary and sufficient condition for the existence of a feasible schedule for cases when more 4-rooms are to be used and leave this problem open.

4.2 Fair ordering for a feasible solution

Fair ordering means that no team takes up the same ordering position in any two of its Fights. We now prove that, using methods of graph theory, it is possible to find a fair ordering efficiently.

Theorem 5

A fair ordering can be constructed in polynomial time for each feasible schedule.

Proof

Let a feasible schedule \(({\mathcal {P}}, {\mathcal {R}})\) be given. We construct the collection \({\mathcal {O}}\) that encodes the order of teams within Fights in such a way that it fulfills Definition 4.

This time, we reach this goal with the help of a different bipartite graph than in Theorem 1. We start with constructing the bipartite graph \(H({\mathcal {P}},{\mathcal {R}})=(T \cup F,E)\) where the sets T and F of vertices correspond to the set of teams and to the set of Fights—i.e., pairs (jr) where j is a round and r is a room—defined by \(({\mathcal {P}},{\mathcal {R}})\), respectively. The pair \(\{t,f\}\) where \(f=(j,r)\) is an edge in H if and only if \(\varrho _j(t)=r\), i.e., team t is assigned in round j to room r.

An ordering of teams in Fights corresponds to an edge coloring in H by four colors A, B, C, and D, with a special condition: color D can only be used for edges incident to vertices in F that are of degree 4, i.e., based on rooms from \(R_4\). Team t plays the role of the first Presenter in Fight f if edge \(\{t,f\}\) is colored by A. Similar holds for the remaining three colors. The special condition on color D is necessary, because the role of a fourth Presenter should only be allocated to 4-Fights.

We propose a simple algorithm to construct an edge coloring respecting our conditions. In the first step, we calculate a matching \(M_D\) covering all vertices \(f \in F\) with \(\deg (f) = 4\). Such a matching is guaranteed to exist, because any vertex set of 4-Fights fulfills the Hall-criterion (Hall, 1935). We know that k 4-Fights are incident to 4k edges, which lead to some team vertices forming the neighborhood of the k 4-Fights. Each of these team vertices is counted at most 3 times in the enumeration of the 4k edges, because of \(\deg (t)=3\) in H. Thus the neighborhood of the k chosen vertices in F has cardinality at least k and so a matching \(M_D\) covering all 4-Fight vertices must exist. For the edges in \(M_D\) we fix color D, and remove these edges from the edge set E. Notice that the maximum degree in the remainder of H is 3, and each \(f \in F\) now has \(\deg (f) = 3\). By König’s theorem, an edge coloring with 3 colors exists in this graph, and it can be found efficiently, by iteratively coloring all edges of a matching covering all vertices in F with a fixed color (König, 1916). This coloring defines the roles A, B, and C so that each Fight will have exactly one team in each of these three roles.

This algorithm computes a maximum matching for each of the four roles. Computing such a matching is of computational complexity \(O(\sqrt{|T \cup F|}|E|)\) (Hopcroft & Karp, 1973). Since the graph is of bounded degree, there are at most as many Fights as teams, and there is a constant number of matchings to be calculated, the computational complexity reduces to \(O(n^{1.5})\). \(\square \)

We now demonstrate our algorithm on the Example from Table 4, which contains a fair schedule \(({\mathcal {P}},{\mathcal {R}})\) for the real data from the tournament Bratislava 2018. Figure 3 depicts the bipartite graph \(H({\mathcal {P}},{\mathcal {R}})\) built for this schedule, and Table 6 contains the schedule computed with the help of this graph.

Fig. 3
figure 3

The four matchings from Theorem 5 constructed for the tournament Bratislava 2018. The team names are abbreviated to their first letter and team number, e.g., S1 denotes Sharks1, while the Fights can be identified based on the round and room in this order, e.g., F1.4 denotes round 1, room 4. Matching \(M_D\) and role D is marked by wavy orange edges, role A is marked by dashed green edges, role B is marked by dotted black edges, and finally, role C is marked by solid gray edges

Table 6 A fair schedule with a fair ordering for the regional tournament Bratislava 2018

5 Integer program for a fair schedule

In this section we present a family of integer linear programs to find fair schedules. First, we develop a compact representation of portfolios in order to model the scheduling problem with a small number of variables. Then we define the ILPs corresponding to our fairness notions.

From now on we assume that the profile \(\varPi \) is given in the form of ordered triples, where \(P(t_i)=(p^i_1,p^i_2,p^i_3)\) denotes the three problems in the portfolio of team \(t_i\). We denote by \(\ell (i,q)\) the index of the problem that is in the \(q^{th}\) position in the portfolio of team \(t_i\), \(i\in [n], q\in [3]\). Further, we construct for each \(\ell \in [m]\) the list \(T(\ell )\) of pairs (iq) such that problem \(p_\ell \) is the \(q^{th}\) problem in the portfolio of team \(t_i\), i.e.,

$$\begin{aligned} T(\ell )=\{(i,q)\ |\ p^i_q=p_\ell , i\in [n], q\in [3]\}. \end{aligned}$$

Let matrix C with n rows and m columns be

$$\begin{aligned} c_{i\ell } = \left\{ \begin{array}{ll} 1 &{} \hbox { if } p_\ell \in P(t_i)\\ 0 &{} \hbox {otherwise.} \end{array}\right. \end{aligned}$$

We illustrate this notation using the profile Bratislava 2018 from Table 1. Let us consider team Sharks1 to be team \(t_1\). Then \(P(t_1)=(p_4,p_6,p_{14})\), hence \(\ell (1,1)=4, \ell (1,2)=6\), and \(\ell (1,3)=14\). If we take problem \(p_{16}\), then \(T(16)=\{(2,2),(11,3)\}\), when we take team Sharks2 to be team \(t_2\) and team Eagles to be team \(t_{11}\).

Let us introduce binary variables

$$\begin{aligned} x_{ijkq} \in \left\{ 0,1\right\} \quad \hbox {for} \quad i\in [n]; \quad j\in [3]; \quad k\in [s]\quad q\in [3] \end{aligned}$$

with the following interpretation.

$$\begin{aligned} x_{ijkq} = \left\{ \begin{array}{ll} 1 &{} \hbox { if team}~t_i~\hbox {presents the}~q^{th}~\hbox {problem from its portfolio in round} j~\hbox {in room}~r_k\\ 0 &{} \hbox { otherwise} \end{array}\right. \end{aligned}$$

A feasible schedule is defined by the following system of equations and inequalities:

$$\begin{aligned} \sum _{j=1}^3\sum _{k=1}^s x_{ijkq}= & {} 1 \quad \hbox { for each team}~t_i~\hbox {and each}~q\in [3] \end{aligned}$$
(3)
$$\begin{aligned} \sum _{k=1}^s\sum _{q=1}^3 x_{ijkq}= & {} 1 \quad \hbox { for each team}~t_i~\hbox {and each round}~j \end{aligned}$$
(4)
$$\begin{aligned} \sum _{i=1}^n\sum _{q=1}^3 x_{ijkq}\!=\! & {} {{\,\mathrm{size}\,}}~(r_k) \quad \hbox {for each round}~j \hbox {and each room}~r_k\!\in \! R \end{aligned}$$
(5)
$$\begin{aligned} \sum _{(i,q)\in T(\ell )}\! x_{ijkq}&\!\le \!&1~\hbox {for each round}~j,\hbox {each room}~r_k, \hbox {and each problem}\,p_\ell \nonumber \\ \end{aligned}$$
(6)

Binary solutions of system (3)-(6) correspond to feasible schedules, because these equations and inequalities mean the following.

(3): Each team presents each problem from its portfolio exactly once.

(4): Each team presents in each round exactly one problem.

(5): In each round and in each room \(r_k\) the number of presented problems is equal to \({{\,\mathrm{size}\,}}(r_k)\).

(6): In each round and each room each problem is presented at most once.

These conditions are equivalent to criteria (a)–(c) from Sect. 2. We remark that choosing an ordering of Presenters so that it fulfills Definition 2 can be done easily, for example by assigning roles A, B, C—and D, in the case of 4-rooms—in an increasing order of team indices in each Fight. Fair ordering, if required, can be obtained afterwards using our algorithm in Sect. 4.2.

Let us now recall the fairness condition from Definition 5. A feasible schedule is fair if the following holds: If team \(t_\alpha \) is in some round j in a room \(r_k\) together with team \(t_i\) who presents problem \(p_\ell \) then \(p_\ell \notin P(t_\alpha )\). This can be expressed by the following inequalities:

$$\begin{aligned}&x_{ijkq}+\sum _{w=1}^3 x_{\alpha jkw}+c_{\alpha \ell (i,q)}\le 2 \hbox {for each}~k\in [s], \hbox {each}~q\in [3],\nonumber \\&\quad \hbox {and each pair}~i\ne \alpha . \end{aligned}$$
(7)

Let us see how (7) ensures fairness. Assume that team \(t_i\) presents the problem that is stated in the \(q^{th}\) position in \(P(t_i)\) during the Fight that takes place in room \(r_k\) in round j. This means that \(x_{ijkq}=1\). Team \(t_\alpha \) is assigned to the same Fight if and only if it presents some problem in room \(r_k\) in round j; this holds if and only if the second term on the left hand-side of inequality (7) is equal to 1. In this case, inequality (7) implies \(c_{\alpha \ell (i,q)}=0\), i.e., problem \(p_{\ell (i,q)}\) is not in the portfolio of team \(t_\alpha \).

Table 7 Summary of computations of non-cooperative fair schedules for real tournaments. The columns contain the number of teams, the number of 3-rooms and 4-rooms, the number of variables and constraints in the constructed ILP, the computation time in seconds, and the degree of fairness, respectively. For all instances, we attempted to ensure first strong fairness, then fairness, then weak fairness. We always include the data belonging to the highest degree of fairness that was reached within one hour

This discussion implies the following assertion.

Observation 2

Fair schedules for IYPT correspond to the solutions of the integer linear program consisting of the feasibility constraints (3)–(6) and the fairness constraint (7) formulated for each round \(j\in [3]\). Weakly fair schedules correspond to the solutions of (3)–(6) and the constraint (7) for \(j=1,2\).

Let us now consider the strong fairness condition. Recall that a feasible schedule is strongly fair if no team \(t_i\) deals with a problem \(p_\ell \) more than once during the tournament (in any role). To formulate this condition, we introduce another set of non-negative variables:

$$\begin{aligned} y_{ijk\ell } \ \ge 0 \quad \hbox {for} \quad i\in [n]; \quad j\in [3]; \quad k\in [s];\quad \ell \in [m]. \end{aligned}$$

The desired interpretation of these variables is that \(y_{ijk\ell }\ge 1\) if team \(t_i\) can see problem \(p_\ell \) during its presentation in round j in room \(r_k\); this is ensured by the inequalities (8):

$$\begin{aligned}&y_{ijk\ell }\ge \sum _{w=1}^3 x_{ijkw}+ \sum _{(\alpha ,q)\in T(\ell )} x_{\alpha jkq}-1 \hbox { for each } i\in [n],\nonumber \\&\quad j\in [3],k\in [s],\ell \in [m]. \end{aligned}$$
(8)

To see this, notice that the first sum on the right-hand side is equal to 1 if team \(t_i\) presents some problem in round j in room \(r_k\), which is equivalent to team \(t_i\) being in this room in the respective round, otherwise it is equal to 0. The second sum is equal to 1 if problem \(p_\ell \) is presented in round j in room \(r_k\) by some team \(t_\alpha \), otherwise it is equal to 0. The inequalities ensuring strong fairness are

$$\begin{aligned} \sum _{j=1}^3\sum _{k=1}^s y_{ijk\ell }\le 1~\hbox {for each}~i\in [n]~\hbox {and each}~\ell \in [m], \end{aligned}$$
(9)

as they mean that each team \(t_i\) can see any problem \(p_\ell \) at most once.

Observation 3

Strongly fair schedules for IYPT correspond to the solutions of the integer linear program consisting of the feasibility constraints (3)–(6), and inequalities (8) and (9).

Finally, we express the condition of non-cooperativity in the form of an inequality. A schedule is non-cooperative if the inequality

$$\begin{aligned} \sum _{i\in T_\lambda }\sum _{q=1}^3 x_{ijkq}\le 1. \end{aligned}$$
(10)

holds for each \(j\in [3]\), each \(k\in [s]\) and each \(\lambda \in [\varLambda ]\).

6 Computations

We now present our computational work on real and generated data in Sects. 6.1 and 6.2, respectively.

6.1 Real data

The members of the two regional committees of the IYPT in Slovakia (based in Bratislava and in Košice) provided us with the portfolios for the years 2017 (Bratislava), 2018-2021; these are given in Table 1. They also showed us the schedules they prepared for regional tournaments in these years. All schedules used in reality were non-cooperative, but none of them was fair, not even weakly. More so, we encountered a team that had seen presentations of two of its problems before it presented them—see team Lions in Table 3.

We attempted to compute schedules that are non-cooperative and fair. In our simulations we used the open source solver lpsolve (Berkelaar et al., 2007), version 5.5 under Java wrapper library. We kept the default parameter settings for integer and mixed integer problems. The solver was running on a desktop computer with the processor Intel (R) Core (TM) i5-2500 3.3 GHz and 6 GB RAM.

A summary of the computations with real data is given in Table 7. In 2018, the organizers of the regional tournament in Košice used three 4-rooms and only one 3-room for 15 teams and for this case the solver was not able to either find a solution or prove infeasibility within 1 hour. However, we found a non-cooperative weakly fair solution for this case, and also a non-cooperative fair solution if the 15 teams were scheduled to fill up five 3-rooms. For all other available real portfolios from years 2017 and 2019 we obtained a non-cooperative, fair, in two cases a strongly fair schedule within seconds.

Table 8 Summary of computations for randomly generated data - room sizes according to the international rules
Table 9 Summary of computations with minimum number of rooms, randomly generated data

We first became involved in the preparation of the schedules for regional tournaments in 2020. In this year, the organizers expanded the number of regional tournaments from 2 to 4, in order to provide access to the competition to students from rural schools. The two additional tournaments took place in smaller cities of Martin (closer to Bratislava) and Poprad (closer to Košice), each of them involving just 3 teams. This drained the Bratislava round to only 5 participating teams, while the Košice event took place with 13 teams. Moreover, one of the teams in Bratislava, called MIX, involved students from different schools and the portfolio of MIX contained the same problem twice. This highly unusual makeshift team does not fit the standard input conditions. For these reasons, our only real challenge was to prepare a non-cooperative fair schedule for the Košice event, which we succeeded in. Additionally, a non-cooperative fair schedule were also possible if the three teams from Poprad would have joined the Košice event. When we merged the teams at the Bratislava and the Martin events, and deleted the makeshift team MIX, we got a profile with 8 teams. However, 3 of them belonged to the same school and that precluded even the possibility of a noncooperative schedule without any additional fairness requirements. The solver needed 0.09 seconds to prove the infeasibility of the ILP for a non-cooperative fair schedule and 0.056 seconds for the variant with weak fairness.

We remark that for the strong fairness criterion, the solver did not reach any conclusion within the time limit of 1 hour for any of the instances from the years 2018-2020.

Year 2021 was again special. Because of the COVID-19 pandemic, only one tournament in Slovakia was organized with 9 participating teams, moreover, it took place online. One of the teams proposed to present either problem 13 or problem 17. We offered a strongly fair solution using problem 17. When we used problem 13, we were able to compute a fair solution, however, in this solution the same composition of a Fight was repeated in all three rounds. For the strong fairness criterion we were not able to reach any conclusion within more than one hour.

6.2 Randomly generated data

We randomly generated profiles that resemble situations that could typically occur in practice. The structure of the generated samples was derived from the structure of profiles in recent years and from our knowledge of the situation in Physics education and schools in the respective regions.

Teams for the competition are nominated by schools and we assume that a ‘big’ school nominates between 2 and 4 teams whilst a ‘small’ school nominates 1 or 2 teams. Higher numbers were less probable. In more detail, we set the probabilities that a big school nominates 2, 3, and 4 teams to 0.5, 0.3, and 0.2, respectively. For small schools, the probability of nominating one team was 0.75 and that of nominating 2 teams 0.25.

Further, we assumed that not all problems are equally popular. Based on the situation in years 2017-2020 we estimated that in the set of 17 published problems there are 8 problems with low popularity, 6 problems with medium popularity and 3 problems with high popularity. We assumed that a team chooses a problem of low popularity with probability \(\mu \), a problem of medium popularity with probability \(2\mu \) and a problem of high popularity with probability \(4\mu \). To achieve this, we used a special modification of Pólya’ s urn model (Mahmoud, 2009). First, we put one ball with the number of each low popularity problem into a virtual urn, so we have balls 1,2,...,8. Then we added to the same urn two balls for each problem with medium probability and four balls for each problem with high popularity. So we have additionally the balls numbered as follows: 9,9,10,10,...,14,14,15,15,15,15,16,16,16,16,17,17,17,17. When a ball with a certain number is randomly drawn from the urn, all the balls with the same number are removed from the urn and the next ball is drawn.

We generated 50 samples for region Bratislava and another 50 samples for region Košice. We assumed that in region Bratislava there are 3 big schools and 3 small schools, whilst in region Košice there are 2 big schools and 6 small schools. The number of teams n in the generated samples was between 9 and 15 for Bratislava and it was between 10 and 16 for Košice.

The results of computations of non-cooperative weakly fair, fair, and strongly fair schedules are summarized in Table 8. The column labelled undecided shows the number and ratio of instances for which the solver stopped after 5 minutes due to the prescribed time-out without any result. Computation times are summarized separately for feasible and infeasible instances. Notice that we performed the computations of fair and strongly fair schedules even for instances where we already knew that a schedule fulfilling a weaker form of fairness does not exist so as to obtain a comparison of computation times.

The computations depicted in Table  8 correspond to the choice of room sizes that follow the international rules. This means that 4-rooms are only used when necessary, i.e., when the number of teams n is not divisible by 3, hence the number of 4-rooms is 0, 1, or 2. However, sometimes the organizers of regional tournaments want to minimize the number of rooms used and prefer 4-rooms. A different composition of room sizes is possible in our case if \(n=12\), 15 or 16. For \(n=12\) and \(n=16\), a schedule that uses only 4-rooms is possible, and for \(n=15\), one can use 3 rooms of size 4 and one 3-room. The number of instances with such n among Bratislava-type data was 14 and among Košice-type data it was 21. In this case chances of the existence of a fair schedule are much lower. For Bratislava region and non-cooperative weak fairness, 8 instances out of 14 were infeasible, for 3 of them the solver was not able to find an answer within 1 hour, and only 3 instances admitted a weakly fair schedule; for one of them the answer was output after 19 minutes. For these 3 instances we attempted fairness; the solver proved in 2 cases infeasibility and one case remained undecided within 1 hour. The results are given in Table 9.

7 Conclusion, open problems, and directions for further research

In this paper we studied the scheduling problem arising in the organization of regional competitions of the International Young Physicists’ Tournament. Based on considerations of organizers, we introduced novel fairness criteria for scheduling problems. To find fair schedules we employed algorithms based on graph colorings and proposed integer linear programs, applied them successfully to real profiles from recent years, and explored their behaviour on randomly generated data.

Using the free software package lpsolve has its limitations, as we were not able to find a fair solution or a proof of its non-existence in quite a large number of instances within an acceptable time limit. It could be interesting to explore various possibilities of speeding up the computations. In addition to exploiting faster commercial software one can try to find a more compact ILP formulation. Other options may be the use of constraint programming or SAT encoding.

Our simulations revealed that if teams are allowed to choose their portfolios completely arbitrarily, then the chances of a non-cooperative fair schedule may be low. Let us therefore think about another approach. Suppose that instead of submitting a fixed portfolio, each team submits a preference ordering of the problems—perhaps it might even be allowed to label some problems as unacceptable. We seek a matching of teams to triples of problems, which enables a fair schedule, and is in a sense optimal. Several optimality criteria can be thought of, for example minimizing the position of the least preferred problem in the final portfolio of each team, or minimizing the weighted sum of ranks of assigned problems in the portfolio.

Notice that we leave the theoretical complexity of the existence of a fair schedule open. The feasibility constraints (3)–(5) resemble a multi-index transportation problem (MITP) (Queyranne & Spieksma, 2001) known to be an NP-hard problem, but constraint (6) and the additional constraints on non-cooperativity and fairness make our problem different.

Practically, in some cases it is easy to see why a fair schedule does not exist, e.g., if the portfolios are too similar to each other. The next theoretical step could be deriving some easily verifiable combinatorial certificates for unsolvable fair schedule instances.

Let us recall here that the countries participating in IYPT are free to state their own rules for the organization of the regional tournaments. For example, up to the academic year 2020/2021, German national committee organized Fights similarly as described in the current paper and they stated three fairness conditions to be fulfilled in decreasing order of importance: : (1) no two teams from the same school (center) compete within one Fight, (2) no team has the same Opponent more than once, (3) if possible, each team competes with 6 different teams in its 3 Fights in the tournament. Notice that the first condition was our non-cooperativity constraint and the last condition was similar to our strong fairness, but we enforce a lower bound on the number of problems a team encounters during the tournament, instead of teams.

For the academic year 2021/2022, as published in the German national IYPT webpage https://www.gypt.org/, Germany defines Fights with only two teams: the Reporter and the Opponent. Each team reports on the problems it announced beforehand, and the organizers prepare a schedule stating who will oppose which problem of which team. No fairness criteria have been officially formulated, so a questions for possible future research may be to find plausible ones and explore their computability.

Let us recall that teams taking part in the international final cannot choose the problems to present in advance, because the Opponent team is allowed to challenge the Presenter team with any of the 17 problems. Here, one cannot foresee which problems will be presented in the Fights, so to define fairness, only teams participating in common Fights can be taken into account.

We hope to have opened a new perspective on scheduling student scientific or debating competitions with our work. Our ILP model seems to be useful for the preparation of fair schedules of regional tournaments that are consistent with the IYPT rules of at least four countries: Austria, Slovakia, Switzerland and, until recently, Germany. Furthermore, other competition schedules could potentially be automated as well. A good starting point here is the analogous version of IYPT in mathematics, the International Tournament of Young Mathematicians. By applying an ILP approach to the rules at The World Universities Debating Championship or other debating tournaments one could also potentially determine fair schedules for debate rooms.