Conference PaperPDF Available

Optimal University Course Timetables and the Partial



University course timetabling is the conflict-free assignment of courses to weekly time slots and rooms subject to various hard and soft constraints. One goal is to meet as closely as possible professors' preferences. Building on an intuitive integer program (IP), we develop an exact decomposition approach which schedules courses first, and matches courses/times to rooms in a second stage. The subset of constraints which ensures a feasible room assignment defines the well-known par- tial transversal polytope. We describe it as a polymatroid, and thereby obtain a complete characterization of its facets. This enables us to add only strong valid inequalities to the first stage IP. In fact, for all practical purposes the number of facets is small. We present encouraging compu- tational results on real-world and simulated timetabling data. The sizes of our optimally solvable instances (respecting all hard constraints) are the largest reported in the literature by far.
Optimal University Course Timetables and the
Partial Transversal Polytope
Gerald Lach and Marco E. L¨ubbecke
Technische Universit¨at Berlin, Institut f¨ur Mathematik, MA 5-1,
Straße des 17. Juni 136, 10623 Berlin, Germany,
{lach, m.luebbecke}
Abstract. University course timetabling is the conflict-free assignment
of courses to weekly time slots and rooms subject to various hard and
soft constraints. One goal is to meet as closely as possible professors’
preferences. Building on an intuitive integer program (IP), we develop an
exact decomposition approach which schedules courses first, and matches
courses/times to rooms in a second stage. The subset of constraints
which ensures a feasible room assignment defines the well-known par-
tial transversal polytope. We describe it as a polymatroid, and thereby
obtain a complete characterization of its facets. This enables us to add
only strong valid inequalities to the first stage IP. In fact, for all practical
purposes the number of facets is small. We present encouraging compu-
tational results on real-world and simulated timetabling data. The sizes
of our optimally solvable instances (respecting all hard constraints) are
the largest reported in the literature by far.
Keywords: integer programming; partial transversal polytope; university
course timetabling
1 Introduction
Timetabling comes in many flavors, in education and sports, in industry and
public transport. This diversity and its relevance in practice made timetabling
an active research area in operations research; a series of conferences (Practice
and Theory of Automated Timetabling, PATAT) is devoted to the topic [1]. In
this paper, we aim for optimal solutions to one of the core problems of the field,
the NP-complete university course timetabling problem.
A university timetable is an assignment of an appropriate number of time slots,
or periods, and rooms to each weekly occurrence of each course. It is usually valid
for one term. Customarily, one distinguishes between hard and soft constraints
which have to be respected [2]. Typical hard constraints are: A professor cannot
teach two classes at the same time; lectures belonging to the same curriculum
must not be scheduled simultaneously; a room cannot be assigned to different
courses in the same period; etc. A timetable is infeasible if one of these require-
ments is violated (which frequently occurs in practice). Soft constraints e.g., call
for not exceeding a room’s capacity; to provide the necessary equipment like
beamer/PC; to spread the lectures of one course over the week; etc. A violation
of these constraints is tolerated but penalized. Professors express preferences as
to when to teach; an optimal timetable minimizes the total deviation from these
1.1 Our Contribution
This paper makes a contribution to practical problem solving via integer pro-
gramming, as well as it adds to the theory of combinatorial optimization.
On the practical side, we give a proof-of-concept that optimal timetables can be
computed for larger universities in acceptable time. Our focus in on meeting all
hard constraints, where we take some of the constraints traditionally considered
soft (like room capacity) as hard ones.
In the integer program we propose, instead of simultaneously assigning courses
to time slots and rooms, we only schedule rooms, providing for a later feasible
room assignment. This is done by interpreting feasible course/room pairs on a
bipartite graph, and enforcing the classical Hall’s conditions [3], a.k.a. “marriage
theorem,” on the existence of perfectly matchable sets (or transversals). This
allows a simpler formulation and results in much improved solution times.
Hall’s conditions directly lead us to an investigation of the partial transversal
polytope [4]. We obtain a complete description of its facets by stating it as a
polymatroid. Thereby, on the theoretical side, we obtain an interesting strength-
ening of Hall’s Theorem. Finally, we are interested in the number of facets of
the partial transversal polytope, and obtain a generating set of facets, of linear
size. All facets can be obtained from this set by an intuitive operation.
We tested our approach on instances from the second international timetabling
competition [5]. It turns out that we are able to compute optimal solutions
within negligible running times. We therefore used simulated data which are
almost identical to real data from Technical University of Berlin. To the best of
our knowledge, we are the first to obtain optimal solutions to university course
timetabling instances of this size.
It is our impression that integer programming has been used for timetabling only
because of its modeling power. It was not realized that a deeper understanding of
combinatorial properties of the problem may be the key to actually solving large
instances to proven optimality. In this sense, we consider our work a significant
step forward in this field of research.
1.2 Related Work
University course timetabling problems are well studied, see e.g., the surveys [6,
7]. Much has been written about practical details [8], and the non-negligible
human factor of timetabling [9].
Meta heuristics clearly constitute the main solution approach, see [2,10, 11], and
the references therein. Several integer programs were suggested as well [8, 9, 12–
14], however, optimally solvable problem instances are (i) smaller than ours by
at least an order of magnitude, or (ii) are much simpler (and thus less realistic)
than ours.
Interestingly, complete polyhedral descriptions of problems closely related to
finding transversals are well known. We have Edmonds’ seminal work on the
matching polytope [15]. Also, the perfectly matchable subgraph polytope for
bipartite graphs is fully characterized [16]. Yet, we are not aware of any previous
attempts to give a strong formulation of the partial transversal polytope.
2 Integer Programs and Decomposition
2.1 An Intuitive Integer Program
We give a generic integer program (IP) for the university course timetabling
problem which concentrates on hard constraints (time conflicts and room con-
flicts). However, it is easy to enhance this IP by soft constraints.
Denote by Cthe set of courses, by Rthe set of rooms, and by Tthe set of time
slots. For each course c∈ C we know its eligible time slots T(c)⊆ T , and eligible
rooms R(c)⊆ R. Further, R1(r)⊆ C is the set of all courses which may take
place in room r∈ R. Each course c∈ C consists of (c) lectures, that is, we have
to provide (c) different time slots for course c. The instructor of course c∈ C
assigns a preference prio(c, t) to all eligible time slots tT(c); the smaller it is,
the better.
Time conflicts are represented via a conflict graph Gconf = (Vconf , Econf ): A
vertex (c, t) represents an eligible combination of a course cand a timeslot t.
Two nodes (c1, t1) and (c2, t2) are adjacent iff it is forbidden that c1is scheduled
at t1and c2at t2(typically, t1=t2). We see that time conflicts introduce a
stable set flavor into our problem.
A binary variable xc,t,r represents whether course cis scheduled at time tin
room r, or not. The following IP for the generic university course timetabling
problem guarantees a sufficient number of time slots per course (2), avoids room
conflicts (3), and time conflicts (4).
min X
prio(c, t)·xc,t,r (1)
s.t. X
xc,t,r =(c)c∈ C (2)
xc,t,r 1t∈ T , r ∈ R (3)
xc1,t1,r +X
xc2,t2,r 1((c1, t1),(c2, t2)) Econf (4)
xc,t,r ∈ {0,1} ∀(c, t)Vconf , r ∈ R (5)
This integer program will be infeasible for any reasonable practical data since
usually some courses cannot be scheduled without conflicts. Thus, one tries to
schedule as many courses as possible; a modification to accomplish this is straight
forward. However, the computation times and solution qualities (cf. Table 3) do
not advise to actually work with this formulation.
2.2 Decomposition into Time and Room Assignment
Instead, we reduce the problem in three dimensions to a problem in two di-
mensions, implicitly taking care of room conflicts. To this end, we represent
eligible combinations of courses and rooms as undirected bipartite graphs Gt=
(Ct∪ Rt, Et), one for every time slot t T . Courses which may be scheduled at
tare given in set Ct; and Rtdenotes the set of all eligible rooms for all courses
in Ct. A course cand a room rare adjacent iff ris eligible for c. For ease of
exposition let G= (C ∪ R, E ) be the graph consisting of all components Gt,
t∈ T .
For any subset Uof vertices, denote by Γ(U) := {i C ∪ R | jU, (i, j)E}
the neighborhood of U; in particular, Γ(U)⊆ R for any U⊆ C. The set of all
vertices which are adjacent only to vertices in Uis denoted by Γ1(U) := {i
U ∪ R | Γ({i})U}. In particular, Γ1(U)⊆ C for any U⊆ R.
Hall’s Theorem [3] states that a bipartite graph G= (C ∪ R, E ) has a matching
of all vertices in Cinto Rif and only if |Γ(U)| ≥ |U|for all U⊂ C. This enables
us to state a simpler integer program which schedules courses in such a way that
a later assignment of rooms is possible. It is thus based on binary variables xc,t,
but obviously has an exponential number of constraints.
min X
prio(c, t)·xc,t (6)
s.t. X
xc,t =(c)c∈ C (7)
xc,t ≤ |Γ(U)| ∀U⊆ C, t ∈ T (8)
xc1,t1+xc2,t21((c1, t1),(c2, t2)) Econf (9)
xc,t ∈ {0,1} ∀(c, t)Vconf (10)
Once this IP is solved, the second stage merely consists of solving a sequence
of minimum weight bipartite matching problems; clearly, this decomposition
approach is exact.
Even though Hall’s inequalities (8) can be separated in polynomial time via a
maximum flow computation, we would like to work with a strongest possible
formulation: We are interested in the facets of the polytope defined by (8) (and
3 The Partial Transversal Polytope
In the context of Hall’s Theorem, Cis known as system of distinct representatives
or transversal. A partial transversal is a subset of Cwhich can be perfectly
matched (we may assume that all r∈ R will be matched). The partial transversal
polytope P(C) is the convex hull of all incidence vectors of partial transversals
of C. It is full dimensional in |C |.
The deficiency of a vertex set U⊆ C is defined as defG(U) := |U| − |Γ(U)|. The
deficiency of a graph Gis def(G) := maxU⊆C defG(U). We will often consider
the deficiency of induced subgraphs (UΓ(U), E ), and denote it by def(U),
slightly abusing notation. Graph deficiency is known to be supermodular [3],
that is, def(UV) + def (UV)def(U) + def (V) for U, V ⊆ C. Finally, denote
by ν(G) the cardinality of a maximum matching in G.
We consider two equivalent descriptions of the partial transversal polytope P(C).
We use the common shorthand notation x(U) := PiUxi.
Lemma 1 (The Partial Transversal Polytope) Given a bipartite graph G=
(C ∪ R, E ), the partial transversal polytope P(C)|C| is defined by
x(U)≤ |Γ(U)| ∀U⊆ C (11)
0x1 (12)
or equivalently by
x(U)≤ |U| − def(U)U⊆ C (13)
The advantage of the latter description is that x1 is not explicitly required.
This will facilitate characterizing facets.
3.1 Facets
A theorem by Edmonds on the facets of polymatroids [4, Thm. 44.4] allows us to
easily give a complete and non-redundant description of the partial transversal
polytope. For a consistent presentation we define the set function
f: 2C, U 7→ f(U) := |U| − def(U),(15)
which is submodular by supermodularity of the deficiency. Note also that fis
nondecreasing, that is, f(U)f(T) for UT. Further, f() = 0 and f({i})>0
for i∈ C.
A subset U⊆ C is called an f-flat if f(U∪ {i})> f(U) for all i C \ U; and U
is f-inseparable if there are no U1, U26=with U1U2=and U1U2=U
such that f(U) = f(U1) + f(U2).
Edmonds has the following theorem: With the properties of a set function fas
given in (15), the facets of {x|C| |x0, x(U)f(U) for U⊆ C} are
given by (i) x0, and (ii) x(U)f(U) for each nonempty f-inseparable f-flat
U⊆ C.
Definition (Defining C-set) Given a bipartite graph G= (C ∪ R, E ), and f
as defined in (15). A set ∅ 6=U⊆ C is called defining C-set, iff Uis an f-flat, and
{def(U1) + def (U2)}.(16)
This definition reflects the intuition that a C-set is important, if it bears more
information than the union of its parts. Inequality (16) will guarantee f-insepa-
Theorem 2 Given a bipartite graph G= (C ∪ R, E), then a set U⊆ C is facet
inducing for the partial transversal polytope P(C), if and only if Uis a defining
Proof. To prove necessity, let V⊆ C be facet inducing. Vis an f-inseparable
f-flat by definition. Hence there are no disjoint V1, V26=with V=V1V2with
|V1| − def(V1) + |V2| − def(V2) = |V| − def(V).
Equivalently, for all disjoint ∅ 6=V1, V2V:
|V| − def(V)<|V1| − def(V1) + |V2| − def(V2)
def(V)>def(V1) + def(V2),
so Vis a defining C-set. For sufficiency, let Vbe a defining C-set. Vis an f-flat
by definition. Further it holds that
{def(U1) + def (U2)}.
That is, for arbitrary disjoint ∅ 6=V1, V2Vwith V1V2=Vwe have
def(V)>def(V1) + def(V2)
|V| − def(V)<|V1| − def(V1) + |V2| − def(V2)
f(V)< f(V1) + f(V2).
So Vis facet inducing for the partial transversal polytope.
Corollary 3 (Strengthening of Hall’s Conditions) Let G= (C ∪ R, E )be
a bipartite graph, and D1, .., Dn⊆ C the collection of all defining C-sets. There
exists a matching covering all elements of A⊆ C, if and only if for all Diand
for all XA
|DiX| ≤ |Γ(Di)|.(17)
3.2 Generating all Facets, and a Generating Subset
Now that we know how to strengthen constraints (8), we would like to make
algorithmic use of this knowledge. We will first see that taking unions of defining
C-sets again yields a defining C-set, if we preserve the f-flat property.
Definition (The flat-union )Given a bipartite graph G= (C ∪ R, E ) and
two sets U1, U2⊆ C, then the flat-union is defined as follows:
U1U2:= U1U2∪ {c∈ C :Γ({c})Γ(U1)Γ(U2)}.
Lemma 4 (The flat-union of defining C-sets) Given a bipartite graph G=
(C ∪ R, E ), a set function fas in (15), and two defining C-sets U1, U2⊆ C such
f(U1) + f(U2)> f(U1U2).
Then U=U1U2is a defining C-set.
Proof. By definition, Uis an f-flat. We assume for contradiction that there are
disjoint V1, V26=with
f(U) = f(V1) + f(V2).(19)
U1, U2and V1, V2both partition U. Thus, U1or U2cannot be completly contained
in V1or V2, so at least one of U1, U2has to have a non trivial intersection with
V1and V2. W.l.o.g., U1V16=and U1V26=. A consequence of (19) is
ν((U1Γ(U1))) = ν(((U1V1)Γ(U1V1)))+ ν(((U1V2)Γ(U1V2))) (20)
which is equivalent to
|U1Γ(U1)| − def((U1Γ(U1), E))
=|U1V1| − def(((U1V1)Γ(U1V1), E)) +
|U1V2| − def(((U1V2)Γ(U1V2), E)) .
That is, U1is not f-inseparable, hence it is not facet inducing, and thus no
defining C-set.
The number of defining C-sets can be as large as 2|R| 1. Consider G= (C ∪R, E )
described by the incidence matrix
One can see, that for all R⊆ R, with |R| ≤ 2, Γ1(R) is a defining C-set. It is
a consequence of Lemma 4 that Γ1(R) is a defining C-set for all R⊆ R.
Even though the number of facets can be large, we will show we can obtain all
facets from a (practically small) subset via Lemma 4.
Definition (Atomic defining C-set) Given a bipartite graph G= (C ∪ R, E).
A defining C-set Ais called atomic, if |A|>1, and no two defining C-sets
U1, U2Aexist, such that
Γ(U1)Γ(U2) = Γ(A)
All other defining C-sets are called non-atomic.
Theorem 5 (Number of atomic defining C-sets) Given a bipartite Graph
G= (C∪R, E ). The number of atomic defining C-sets is at most def(C) = def(G).
Proof. Proof by induction on r=|R|:
The assertion is easily verified for r= 1 and r= 2. For the induction step, let A
be the set of all atomic defining C-set and h: 2C, U 7→ |{C∈ A :CU}|.
Case I: Cis an atomic defining C-set. Let A1,...,Ak⊂ C be all inclusion maximal
subsets of C, from Lemma 4 we know that
A∈ A ∃Di:ADi.(21)
Now the assertion is easy to show.
def(C)Lemma 12
def(Di) + 1
by ind. hyp.
h(Di) + 1
Case II: Cis not a defining C-set or a non-atomic defining C-set.
Let Ci=C\{c∈ C :iΓ({c})}. Clearly, we have
C ≥
Further, one can conclude from Lemma 10 and the f-flat condition of a defining
D∈ A R⊂ R :D=Γ1(R).(23)
By supermodularity of def(·) we can proof the assertion.
Lemma 8
by ind. hyp.
Lemma 9
3.3 Facet Enumeration
In our present implementation we enumerate all defining C-sets, basically using
Lemmas 4 and 11. If the number of defining C-sets is polynomially bounded,
the running time of the algorithm is polynomial. As pointed out below, for
real-world instances this is a reasonable assumption. Theorem 5 suggests an
algorithm which first constructs all atomic C-sets, and repeatedly takes all non
disjoint flat-unions. We postpone a detailed description of such an algorithm to
the full paper.
4 Consequences
In real-world instances of the university course timetabling problem a room can
be described by various attributes (or features). These may be capacity, location,
seating, beamer, blackboard, etc. We distinguish between two types of features,
exclusive and inclusive. Exclusive features cannot be requested at the same time
(e.g., different room capacities). It is characteristic to exclusive features that
the graph Gt= (Ct∪ Rt, Et) decomposes into independent components. We will
show that for each component of Gtthe maximum number of defining C-sets
only depends on the number of different (inclusive) features.
Lemma 6 (Number of defining C-sets) If the number of different features
in a connected bipartite graph G= (C ∪ R, E)is φ, then the number of defining
C-sets in Gis at most 2φ1.
Proof. Let Fbe the set of features and F⊆ F . We then denote with CFall
the courses, that apply for a room, which has to be provided with all features
fF. Let
D={CF:F⊆ F} .
We show that if A⊆ C is a defining C-set and |A|>1, then A∈ D. We assume
that A⊆ C is a defining C-set and A /∈ D. Then there exists a c∈ C\A, such
that Γ(c)Γ(A).
Case I: ν((AΓ(A), E)) = |Γ(A)|. Then, |Ac| − def (Ac) = |A| − def (A),
so Ais not an f-flat and hence no defining C-set.
Case II: ν((AΓ(A), E)) <|Γ(A)|. Then, Acannot be a defining C-set (Lemma
This has important consequences for the applicability of our apporach to real-
world instances.
Corollary 7 For a fixed number of features, the number of defining C-sets is
Practical evidence shows that the number of defining C-sets is in fact small.
For example, we added a total of about 6400 non-trivial facets to our largest
instance, cf. Table 2.
5 Computational Results
All our results were obtained on a 3.2GHz Pentium 4 Linux PC with 1GB mem-
ory. Integer programs are solved using CPLEX 10.1. We separately list running
times for three steps: (i) facet generation, (ii) solution of the integer program
(6)–(10), and (iii) allocating rooms to all assigned periods of all courses via a
sequence of perfect matching calculations.
5.1 The Second International Timetabling Competition
Accompanying the PATAT08 conference, the second international timetabling
competition, ITC2007, is held. The data of seven problems were published [5].
We present the statistics of our approach for these instances in Table 1. Note
that we only report computation times for respecting all given hard constraints.
Almost all soft constraints can be easily included in our IP without significantly
worsen the running time.
5.2 Statistics and Results on Simulated Data
As we can see, the ITC2007 instances are no challenge to our approach. To obtain
a better idea of its potential performance, we developed a simulation tool which is
able to create large problem instances with near real-world character. We present
Name Courses Course-Slots Rooms Violations Step1 Step2 Step3
comp01 30 160 6 0 <0.01 sec. 0.05 sec. 0.02 sec.
comp02 82 283 16 0 <0.01 sec. 0.19 sec. 0.02 sec.
comp03 72 251 16 0 <0.01 sec. 0.17 sec. 0.02 sec.
comp04 79 286 18 0 <0.01 sec. 0.24 sec. 0.03 sec.
comp05 54 152 9 0 <0.01 sec. 0.56 sec. 0.02 sec.
comp06 108 361 18 0 <0.01 sec. 0.43 sec. 0.04 sec.
comp07 131 434 20 0 <0.01 sec. 0.57 sec. 0.04 sec.
Table 1. Statistics and results for ITC2007 instances
statistics of three representative instances of different sizes, cf. Table 2. The key
data (not listed here) of the large instance is almost identical to that of Technical
University of Berlin (which is a rather large university). Computation times
are acceptable, even though for an interactive timetable design, some tuning is
necessary. Almost 80% of instructors teach at their first choice time slots.
Name Courses Course-Slots Rooms Violations Step1 Step2 Step3
small 180 420 35 0 45 sec. 9 sec. 3 sec.
medium 950 2100 165 0 307 sec. 52 sec. 6 sec.
large 2100 4640 345 0 1235 sec. 5106 sec. 5 sec.
Table 2. Statistics and results for simulated instances
For comparison, we list in Table 3 the results for the same instances when using
the intuitive integer program (1)–(5).
Name # Variables # Constraints Runtime Gap
small 13 000 7000 30 sec. <2%
medium 100 000 31 000 510 sec. 7 %
large 240 000 80 000 1 day no solution
Table 3. Sizes, solution times, and quality for the intuitive integer program (1)–(5).
6 Discussion
We did not discuss several extensions, which are (or can easily be) incorporated in
our practical implementation, most notably practical soft constraints. However,
our generic model (in particular using the concept of a conflict graph) is well
suited for this purpose. One can model e.g., that two courses have to be scheduled
on consecutive time slots, or that no two lectures of the same course are given
on the same day, etc. We report experiences with a soft constraint solver in a
companion paper [17].
One could think of solving the integer program (6)–(10) via branch-and-cut.
However, even for our largest instances, the number of facet inducing Hall in-
equalities (8) was rather small. This is why we simply added all facet inducing
inequalities up-front.
We have access to the courses database at Technical University of Berlin. It
comprises 2100 courses (to be scheduled to about 4500 time slots), 345 rooms
of about 50 types, and 1550 instructors; there are seven time periods each day.
The only reason for using simulated data instead of the real instance, is that
the database is severely inconsistent and incomplete [18]. It is planned to man-
ually repair and complete the necessary data in the near future, and to test our
implementation for the construction of timetables for the whole university.
1. Burke, E., Rudov´a, H., eds.: PATAT 2006: Proceedings of the 6th International
Conference on the Practice and Theory of Automated Timetabling. Lect. Notes
Comp. Science, Berlin, Springer (2007) To appear; available online at http://
2. Burke, E., Jackson, K., Kingston, J., Weare, R.: Automated university timetabling:
The state of the art. Comput. J. 40(9) (1997) 565–571
3. Lov´asz, L., Plummer, M.: Matching Theory. North-Holland, Amsterdam (1986)
4. Schrijver, A.: Combinatorial Optimization Polyhedra and Efficiency. Springer,
Berlin (2003)
5. : ITC2007: 2nd International Timetabling Competition.
6. Burke, E., Petrovic, S.: Recent research directions in automated timetabling. Eu-
ropean J. Oper. Res. 140(2) (2002) 266–280
7. Schaerf, A.: A survey of automated timetabling. Artificial Intelligence Review
13(2) (1999) 87–127
8. Daskalaki, S., Birbas, T., Housos, E.: An integer programming formulation for a
case study in university timetabling. European J. Oper. Res. 153 (2004) 117–135
9. Schimmelpfeng, K., Helber, S.: Application of a real-world university-course
timetabling model solved by integer programming. OR Spectrum 29 (2007) 783–
10. Lewis, R.: A survey of metaheuristic-based techniques for university timetabling
problems. OR Spectrum (2007) In press.
11. Meyers, C., Orlin, J.: Very large-scale neighborhood search techniques in
timetabling problems. [1] 36–52
12. Carter, M.: A comprehensive course timetabling and student scheduling system at
the university of Waterloo. In Burke, E., Erben, W., eds.: PATAT 2000: Proceed-
ings of the 3th International Conference on the Practice and Theory of Automated
Timetabling. Volume 2079 of Lect. Notes Comp. Science., Berlin, Springer (2001)
13. Daskalaki, S., Birbas, T.: Efficient solutions for a university timetabling problem
through integer programming. European J. Oper. Res. 127(1) (January 2005)
14. Qualizza, A., Serafini, P.: A column generation scheme for faculty timetabling.
In Burke, E., Trick, M., eds.: PATAT 2004: Proceedings of the 5th International
Conference on the Practice and Theory of Automated Timetabling. Volume 3616
of Lect. Notes Comp. Science., Berlin, Springer (2005) 161–173
15. Edmonds, J.: Maximum matching and a polyhedron with 0,1-vertices. J. Res. Nat.
Bur. Standards 69B (1965) 125–130
16. Balas, E., Pulleyblank, W.: The perfectly matchable subgraph polytope of a bi-
partite graph. Networks 13 (1983) 495–516
17. Lach, G., L¨ubbecke, M.: Curriculum based course timetabling: Optimal solutions
to the Udine benchmark instances. Preprint 2008/9, Technische Universit¨at Berlin,
Institut f¨ur Mathematik (2008)
18. Lach, G.: Modelle und Algorithmen zur Optimierung der Raumvergabe der TU
Berlin. Master’s thesis, Technische Universiat Berlin, Institut f¨ur Mathematik
(2007) In German.
19. Grinstead, C., Snell, J.: Introduction to Probability. Second edn. American Math-
ematical Society (2003) Available at
A Auxiliary Results
The first two lemmas follow directly from the inclusion-exclusion principle in
probability theory [19].
Lemma 8 Given a set Vand a supermodular function f: 2V, then for
arbitrary A1,...,AnVthe following inequality holds:
f(Ai1...Aik) (24)
Lemma 9 For each nthe following equation holds:
1 = 1 (25)
Lemma 10 Given a bipartite graph G= (C ∪ R, E)and a defining C-set U⊆ C
with cardinality larger one, then we have
ν((UΓ(U), E)) = |Γ(U)|.
Proof. Assume for contradiction that ν((UΓ(U), E)) <|Γ(U)|. Then there
exists at least one unmatched r∈ R for all maximal matchings. So we choose
cΓ({r}) and define:
Clearly, U1and U2are disjoint. Furthermore,
f(U1) + f(U2) = |U1| − def(U1) + |U2| − def(U2)
=|U| − def(U1)
Thus, Udoes not induce a facet of P(C). This is a contradiction to Lemma 2.
Lemma 11 Given a bipartite graph G= (C ∪R, E )and an atomic C-set U⊆ C,
then all inclusion maximal defining subsets D1,...,DkUare disjoint, and
furthermore their neighbourhoods Γ(D1),...,Γ(Dk)are disjoint.
Proof. Assume for contradiction that there exist two inclusion maximal defining
disjoint subsets D1, D2with Γ(D1)Γ(D2)6=.
Case I: Γ(D1)Γ(D2) = Γ(U)
Then Uis not atomic.
Case II: Γ(D1)Γ(D2)(Γ(U)
Then D1D2is defining and D1is not an inclusion maximal defining subset of
Lemma 12 Given a bipartite graph G= (C ∪R, E ), an atomic C-set U⊆ C and
all inclusion maximal defining subsets D1,...,Dk(Uof U, then the following
inequality holds:
def(Di) + 1 .
Proof. For all defining C-sets Dwe have
def(U) = |U| − |Γ(U)|
|Di| − |Γ(Di)|+|U\
Di| − |Γ(U)\
def(Di) + 1
... University timetabling problems [1][2][3][4][5][6] are known to be NP-complete [7] since the search space for possible solutions grows exponentially with the number of events. University timetabling can be classified into two major categories: examination timetabling [8] and course timetabling problems. ...
... There are many different approaches to solve these problems. For example, Constraint Programming (CP) [6,9], Integer Linear Programming (ILP) [2,3,10,11], multi-agent [12,13] and local search [14][15][16] approaches have already been successfully applied. The UniTime [17] 1 tool is a success case of applying CP techniques to the university timetabling problem. ...
... days where a student timetable has only one lecture assigned). This type of decomposition is common since it reduces the problem complexity without loosing any solutions [2]. Another approach [20] follows the same decomposition for examination timetabling: it applies a greedy heuristic to the first task (exams assigned to timeslots) and ILP to the second (exams assigned to rooms). ...
Full-text available
This paper discusses the problem of room usage optimization for university timetables: given a timetable, we want to optimize the room occupation by determining the events allocated to each room, while ensuring that the rooms have enough capacity to “seat” all people participating in those events. This paper contributes with two approaches to the problem of optimizing the timetable scheduled for each room. The first approach consists of a two-stage Integer Linear Programming (ILP) which applies a lexicographic optimization wherein the goal of the first stage is to maximize the number of students seated and that of the second stage is to optimize the room occupation. This is provably optimal, in both optimization criteria. However, it is computationally demanding, requiring significant computation time for large problems. To address this issue, we propose a second approach, consisting of a greedy algorithm. The algorithm assigns lectures to rooms greedily, according to a specific cost function that seeks to maximize the number of students seated. We show that the proposed cost function guarantees that the greedy algorithm performs within 63% of the total number of students. We apply both algorithms in a case study involving real data from Instituto Superior Técnico (IST), the engineering school from Universidade de Lisboa. Our results confirm that the greedy algorithm is two orders of magnitude faster than ILP when considering large data sets. Comparing the performance of the two methods we observe that the performance of the greedy algorithm, when compared to the ILP-based approach, is within 2% for the number of seated students and 34% for the room occupation. The GRASP algorithm is a good extension of the greedy algorithm, which is able to improve in 12% the quality of the solution (in terms of compactness) without adding significant CPU time. Overall, the two proposed approaches provide significant gains for both optimization criteria when compared to the current hand-made solutions.
... major categories: examination timetabling (Müller 2009) and course timetabling problems (Di Gaspero et al. 2007). Many different approaches have been successfully applied for solving these problems, namely Constraint Programming (CP) (Müller et al. 2004), Answer Set Programming (ASP) (Banbara et al. 2019), Boolean Satisfiability (SAT) (Asín Achá and Nieuwenhuis 2014;Lemos et al. 2020a, b), Integer Linear Programming (ILP) (Lemos et al. 2019;Lindahl et al. 2019;Lach and Lübbecke 2008;Vermuyten et al. 2016;Cacchiani et al. 2013), genetic algorithms (Pillay and Özcan 2019) and local search (Lemos et al. 2019;de Souza Rocha et al. 2012;Bellio et al. 2012). ...
... However, it would also cause unnecessary constraints since some constraints do not depend on both lecture-room and lecture-time assignments. Moreover, it makes the application of decomposition techniques impossible (Lach and Lübbecke 2008). ...
Full-text available
Solving university course timetabling problems is a large and complex task. Moreover, every new academic term, a new timetable is likely to be scheduled due to disruptions (e.g. changes in teacher-lecture allocation). Nevertheless, the university infrastructure, the overall curricular plans, and the number of students/teachers are still very similar in consecutive terms. For this reason, a timetable does not need to be always scheduled from scratch since it can produce a completely different solution from the previous one, thus creating undesirable changes for many actors. This paper addresses the Minimal Perturbation Problem in university course timetabling. Given a set of disruptions that make a timetable no longer feasible, a solution to the MPP is the closest new feasible timetable with respect to the original timetable. We propose and analyze two different integer programming models to encode the MPP. To validate the proposed models, disruptions are randomly generated based on the probability distributions learned from the history of timetables over the last five years in the IST, the engineering school from Universidade de Lisboa. Overall, our models, combined with an incremental approach, are shown to be able to efficiently solve all problem instances.
... The organization of timetabling competitions in the past has led to important advances in solving University Course Timetabling Problem (UCTTP) [42,61]. In the literature, there are several different approaches to solve UCTTP, namely: constraint programming [54,[62][63][64][65][66], Answer Set Programming (ASP) [67], Boolean Satisfiability (SAT) [68], MaxSAT [69,70], integer programming [44,47,[71][72][73][74][75][76][77][78][79], genetic algorithms [80][81][82], multi-agent [83,84], reinforcement learning [85], and local search [1,64,[86][87][88][89][90][91][92]. ...
Full-text available
Scheduling problems are common in many applications that range from factories and transports to universities. Most times, these problems are optimization problems for which we want to find the best way to manage scarce resources. Reality is dynamic, and thus unexpected disruptions can make the original solution invalid. There are many methods to deal with disruptions well described in the literature. These methods can be divided into two main approaches: (i) create robust solutions for the most common disruptions, and (ii) solve the problem again from scratch extended with new constraints. The goal of creating robust solutions is to ensure their validity even after the most common dis�ruptions occur. For this reason, it requires a detailed study of the most likely disruptive scenarios. The main disadvantage of creating a robust solution is a possible reduction in the overall quality (e.g., financial cost, customer satisfaction) to support the most likely disruptive scenarios that may never occur. Regardless of the robustness of the solution, we may need to solve the problem again. Most of the methods developed to recover solutions after disruptions occur consist of re-solving the problem from scratch with an additional cost function. This cost function ensures that the new solution is close to the original. In other words, the methods solve the Minimal Perturbation Problem (MPP). However, all these methods require more execution time than the original problem to find a new solution. This can be explained by the fact that we solve a different problem (with more optimization criteria). One can mitigate this problem by re-using the search. Moreover, they use generic cost functions (e.g., Hamming distance) that may have little significance in practice. In this work, we propose novel algorithms to solve the MPP applied to two domains: university course timetabling and train scheduling. We tested our algorithms to solve university timetabling prob�lems with data sets obtained from Instituto Superior Técnico and the 2019 International Timetabling Competition. One of these algorithms was ranked in the top 5 of the competition. When considering the train scheduling case study, we tested our algorithms with data from the Swiss Federal Railways and from PESPLib. The evaluation shows that the new algorithms are more efficient than the ones described in the literature. Summing up, the proposed algorithms show a significant improvement on the state-of-the-art to re-solve scheduling problems under disruptions.
... Integer programming is a member of this group, which has been used in recent works such as [14], [15], [16], [17], [18], [19]. More recent work in this group have been accomplished by Lach and Lubbecke [20], [21]. A subgroup within this group is mixed integer programming, which was used by [22]. ...
... Therefore, when formulating a Mixed Integer Program (MIP), it seems natural to define binary variables with three indices corresponding to a course, period and room where the binary variable would then take value one if the course is scheduled in the specified room at the period. Formulating the MIP of the problem this way is the most commonly used, see Lach and Lübbecke (2008). We show that such a formulation will create an unnecessarily large amount of binary variables and instead we formulate two MIPs containing a significantly smaller number of integer variables. ...
Full-text available
In this paper we present two mixed-integer programming formulations for the curriculum based course timetabling problem (CTT). We show that the formulations contain underlying network structures by dividing the CTT into two separate models and then connect the two models using flow formulation techniques. The first mixed-integer programming formulation is based on an underlying minimum cost flow problem, which decreases the number of integer variables significantly and improves the performance compared to an intuitive mixed-integer programming formulation. The second formulation is based on a multi-commodity flow problem which in general is NP-hard, however, we prove that it suffices to solve the linear programming relaxation of the model. The formulations show competitiveness with other approaches based on mixed-integer programming from the literature and improve the currently best known lower bound on one data instance in the benchmark data set from the second international timetabling competition. Regarding upper bounds, the formulation based on the minimum cost flow problem performs better on average than other mixed integer programming approaches for the CTT.
... In Lach and Lübbecke (2012), the problem is decomposed into two stages: The first finds a feasible time-schedule, and the second assigns the rooms to the lectures. This is based on the work of Lach and Lübbecke (2008), where they consider only hard constraints and show that specific cuts could be added to the first-stage problem to ensure feasible solutions. In Lach and Lübbecke (2012), they show how the RC constraint can be included in the first-stage problem leaving only the RStab constraint for the second stage. ...
Full-text available
In this paper, we propose an integer-programming relaxation for obtaining lower bounds for the curriculum-based course timetabling problem in which weekly assignments for courses to rooms and periods are considered. The model is a pattern formulation where a pattern is an assignment of a course into a set of periods on one day. Different preprocessing techniques are implemented to reduce the number of variables, and valid inequalities are derived and added to the model. The proposed model is tested on 21 real-world data instances. On 17 of these instances, the best known solutions have been proven optimal, and out of the remaining four, our model improves the lower bounds for three of them.
School timetabling is a complex problem in combinatorial optimization, requiring the best possible assignment of course sections to teachers, timeslots, and classrooms. There exist standard techniques for generating a school timetable, especially in cohort-based programs where students take the same set of required courses, along with several electives. However, in small interdisciplinary institutions where there are only one or two sections of each course, and there is much diversity in course preferences among individual students, it is very difficult to create an optimal timetable that enables each student to take their desired set of courses while satisfying all of the required constraints. In this paper, we present a two-part school timetabling algorithm that was applied to generate the optimal Master Timetable for a Canadian all-girls high school, enrolling students in 100% of their core courses and 94% of their most desired electives. We conclude the paper by explaining how this algorithm, combining graph coloring with integer linear programming, can benefit other institutions that need to consider student course preferences in their timetabling.
At universities, the timetable plays a large role in the daily life of students and staff, showing when and where lectures are given. But whenever a schedule is executed in a dynamic environment, disruptions will occur. It is then desirable to find a new timetable similar to the old one, so only a few people will be affected. This leads to a minimum perturbation problem, where the goal is to find a feasible timetable by changing as few assignments as possible. This solution will, however, often lead to timetables of low quality as it can have many undesired features that will cause much inconvenience for effected parties. In this paper we show that minimum perturbation solutions often have low quality and how using additional perturbations results in timetables with significantly higher quality while still keeping the number of perturbations low, so the solutions can be practically implemented. We formulate a bi-objective model and propose a method to solve it by using mixed integer programming. We test the method on standard instances of the Curriculum-based Course Timetabling Problem with four different types of disruptions. The use of bi-objective optimization enables us to generate multiple solutions whereby we provide the decision makers with multiple choices for handling the disruption. This allows the decision makers to determine the best trade-off between the number of perturbations and the quality, ultimately leading to better timetables for students and staff when disruptions occur.
Full-text available
In this paper we applied Benders' decomposition to the Curriculum-Based Course Timetabling (CBCT) problem. The objective of the CBCT problem is to assign a set of lectures to time slots and rooms. Our approach was based on segmenting the problem into time scheduling and room allocation problems. The Benders' algorithm was then employed to generate cuts that connected the time schedule and room allocation. We generated only feasibility cuts, meaning that most of the solutions we obtained from a mixed integer programming solver were infeasible, therefore, we also provided a heuristic in order to regain feasibility.We compared our algorithm with other approaches from the literature for a total of 32 data instances. We obtained a lower bound on 23 of the instances, which were at least as good as the lower bounds obtained by the state-of-the-art, and on eight of these, our lower bounds were higher. On two of the instances, our lower bound was an improvement of the currently best-known. Lastly, we compared our decomposition to the model without the decomposition on an additional six instances, which are much larger than the other 32. To our knowledge, this was the first time that lower bounds were calculated for these six instances.
Technical Report
The timetabling problem consists in fixing a sequence of meetings between teachers and students in a prefixed period of time (typically a week), satisfying a set of constraints of various types. A large number of variants of the timetabling problem have been proposed in the literature, which differ from each other based on the type of institution involved (university or high school) and the type of constraints. This problem, that has been traditionally considered in the operational research field, has recently been tackled with techniques belonging also to artificial intelligence (e.g. genetic algorithms, tabu search, simulated annealing, and constraint satisfaction). In this paper, we survey the various formulations of the problem, and the techniques and algorithms used for its solution.