Documentos de Académico
Documentos de Profesional
Documentos de Cultura
Invited Review
An introduction to timetabling
D. d e W E R R / I
education
networks,
1, Intro~tuetion
During the last twenty years many contributions related to timetabling have appeared and it
will p r o b a N / condnue with the same ra'e for
years. One reason for this may be the huge variety
of problems which are included in the field of
timetabling; another reason is the fact that educational methods are changing, so that the models
have to be modified. Fina!ly. ~,._,mputiag facilities
are now available in most schools and, zs ,; conse
quence, the approach to timembling has to take
this phenomenon into account. This means in particular that interactive methods are now becoming
more important and, furthermore, they have to be
adapted to microcom[~'uters
C.,,uaily one considers dne ;.ic,eutbfiag proce.as,
t~t:~ consisl.~ c,f 2 distinct phases [71:
a) First. the curricula are defined for each class
Recciveg Aug=5: ~.')S;t
N.;,r',h- H,',~!~,~cl
E u : o p e ~ Journ?.! of Operat:onal R-zsea~c0 19 ..i9,35) !51-162
D. de Werm / An i n t ~ i o n
152
2. The-dass-teacher model
..~.
A simple moael
,.~V"x,i~=r,j
( i = 1 ..... n . ; j = l ,
..,n),
(1)
to ametabling
~., r,j<~p
( j = l ..... n),
i=I
N
rO <~p
( i = 1 . . . . . m).
j--1
Xrl; ~ a t
(i =
. . . . . m; k = 1 . . . . . p ) ,
(5)
( j = 1 . . . . . n; k = 1 ..... p ) ,
(6)
1=1
nl
:1
~_, x,j~ ~ 1
(2)
E x,:
b,
i=1
i~ 1
x,j k>tO
Ex,:<l
.x~:~ = 0 or 1
(3)
(4)
....,p),
integer,
( i = l . . . . . m , j = l . . . . . n,
k = l ..... p).
(7)
ill
177
With this formulation we may associate a bipartite multigraph G = (C, T..~): It. nodes are the
classes and the teachers; node c, and no.te tj are
linked bv r,, para!!,:! edges. If each periad correspot~.ds :o a color. ~he problem consists in finding
an assignment cf or~e among p colors to e,:tch edge
of G in such a wa-,: that no two adjaceF,t edges
have the same color; so x,i ~. wilt be 1 if SO'he edge.
[c.t:] gets colc.r k.
v~, r,i<~pb,
(j= 1,...,n),
t=l
E r,,
(i= 1. . . . .
.,).
j=!
This problem also has art immediate _formulation in terms of edge coloring in a bipartite multigraph: We have to assign one among p colors to
each edge in such a way that no more than a,
1 il)
/~=1
rq/a,
j=l
(i = 1 . . . . . re, k = 1 . . . . . p ) ,
rq/p <~
i=1
Xqk <~
i=i
(8)
rJp
i
[r,/p]
(9)
(t0)
153
f(x,l)
Z(x~y)
154
c,
t2
Here
P
t3
k=l
' p = 3 days.
[I 0'I]
xijk >t P, ik
(11)
..... n),
(12)
( i = l . . . . . .:; k = l . . . . . p ) ,
(13)
~14)
Fropositi~n 2.4 [9]. I f in C T 4 every teacher is available during at most 2 periods, there is an O(n 2)
a:gonthm for finding a timetable (or showing that
a,gne exists ).
15)
.t ,= 1
Y, ,~ = 0 or 1
(i = 1 . . . . . m ; j = ! ..... n;
k=l
.... ,p).
~j
ta
c1-1,
c2-2
e2-1,
cl-2
tz
c~-2,
c~-3
cl-2,
c2-3
t3
c 3 -- 1,
c~ - 1 ,
c a -- 3
c 3-- 2
C4--1,
c3-1,
c3--3
t4
cl-2
Available
at periods
Must meet
classes
t1
1, 2
2, 3
1, 3
I, 2
ct,
c~, c 2
c 3, c 4
t2
t3
t,t
01, C 3
(5
155
If the reverse decision has been examined previously, then no timetable can exist as we shall see.
If we have taken ~ implications into account
and there are still some teachers whose schedule is
not fixed, then we consider the last decision as
permanent and take a new decision and we continue as before.
Let us now show that when decisions x~ and 2j
have been examined and when both imply that no
timetable can be found, then none exists. !ndeed
there is no need to backtrack to some earlier
decision: At some stage decision x: and 2j had to
be taken because there was no implication fixing
the schedule of any of the yet unscheduled tea.cbers.
So the subproblem containing only tacher tj and
all those who were unscheduled when x: and ~j
were examined ha.~ no timetable. Hence the problem itself has no timetable.
It is not difficult to see that since we backtrack
only to the last decision, there is an O(n 2) algorithm to solve the 9roblem.
Remark. The above proof in fact says that there is
an O(n 2) algorithm to determine whether for a
graph G = (X, E) with a perfect matching, there is
a stable set of ]Xi/2 nodes.
156
c,
tl
/'2
t3
[2
1]
t2/
t3
',I1t 1 !
1
1
with
[1
0
if ts available at periad k,
otherwise.
!(tl
ti
t2
4
t3
5
]
3. Course scheduling
3.1. Basic formulation
While the problems CT1-CT3 could be formulated as edge coloring problems with some additional restrictions on the colors assigned to the
edges (because of preassignments or unavailabilities), we shall have to use a more general model for
tackling the following timetabling problems.
T h e course scheduling problem arises when a
university (or even a school) offers a collection of
courses (each one consisting of a given number of
lectures) and there is no fixed curriculum: Each
student may choose a certain number of courses.
The problem consists in assigning each lecture to
some period of the week in such a way that no
student is required to take more than one lecture
at a time. The situation is quite similar for the
examination scheduliag problem.
For the course scheduling problem, the following graph-theoretical model is used: We associate
with each lecture I~ of each course K b a
lecture-node mab; for each course Kt, we introduce
edges between all pairs of lecture-nec!es in K b.
Also whenever there is a student taking courses K b
# of lectures
1
2
K3
)
Fi,~ure 4
157
I58
period-nodes
lecture-nodes
Figure 5
obvious that there is a 1-1 correspondence between the colorings of G' and the colorings of
respecting the precoloring.
It is easy to see that problem CT4 can be formulated as a node coloring problem in G; one
should bear in mind that one can always transform an edge coloring problem in a graph G into
an equivalent node coloring problem in a graph G,
but the converse is not true. So ~he formu!atien k-.
terms of node coloring is more general and allows
us to handle more general timetabling problems.
Not surprisingly, many heuristic methods have
been proposed in the timetabling literature for
coloring the nodes of graphs; we shall describe
some basic ideas of these procedures.
3.2. Node coloring methods
Some methods have been devised ~-hich will
find a node coloring of a graph with p colors
whenever such a coloring exists [3,26,27]. These
procedures do in fact enumerate implicitly all possible colorings with p colors and so they cannot
handle very large graphs; presently one cannot go
beyond a few hundred nodes, which is a strong
limitation since most timetabling graphs have many
more nodes.
Experiments on randomly generated graphs
having up to 1000 nodes have been carried out [16]
aad very good estimates of the minimum number
of colors needed have been obtained. One may
wonder however whether timetabling graphs are
close to randomly generated graphs.
Besides the so called exact algorithms which
can find a node coloring with p colors whenever
there is one, various heuristic methods have been
developed for coloring the nodes of a course
scheduling graph.
Most of them color one node at a time; so one
may consider that they are based on an assignmevt
strategy: At each step one chooses according to
some nde a lecture which has to be scheduled and
then one chooses according to some criterion a
pericd where this lecture ,Mll be scheduled.
Th~se methods can be classified in two groups.
a) Those which choose the period independently of the lecture.
b) t'hose which choose the period and the lecture simultaneously.
in most of these methods, one chooses first a
159
160
Max
(16)
E C, kY~,
i=1 k=l
P
s.t.
E y,g = k,
( i = l ..... q),
(17)
(18)
( I = 1 . . . . . r,
k = 1 . . . . . p ),
(19)
k=l
q
~'~y,,<~l k
i=l
Y,k = 0
(20)
or 1,
k=l
i~_S t
3. 5. Classroom assignment
4. General re~,mrks
4.1. Th~ real case
] 61
Referenc~
tl~ B,.".rg~,C . Graphe'.. Gautkier-Viltars, Pans, 1983.
12! Bl,x~mfiefd, SD., a_r:d McSharry, M.M., ~'Pre|erer.:iui
course scheduling", Interface; 9 (I 979) 2,I- 3?.
[31 Brdl~z D . "New methods ~o color file vertices of a
g~aph", C~.,,,m:',nica'i.ons : f tb,~, ~.C54 22 .q979) 251-256
[41 Carter, M., "A decomposition algomtm~ iBi p:'a,:;ical
timeiab!i~,~ probl-:ms", W3rking Paper 83-06. Dept.. (~f
Industrial Engineering University of 1oronto, 19;~3.
[51 Carzer. M., "A suiwe? of practica[ application, s on exao,inur~o:~ timetabling", Working P~pcr 83-r7;7 Dept. of
Engineering Unwer'.d:y of "io:on~o, ~983.
[6] Ciemet.m:on, A.q.. and E!phick C H.. "Ccnfinuous timetabiing problems", JourJ,al o f r~e Operat.ionat.Reseaz c'z So.~ ~,.~
33 (19821 I8].-183.
{7] Dcmpste:r, M.~k.H., Lethridge. D.G.. an:5 U!ph, . < M
Scb.oot t.#,m~t,~lin2 by Co,;~p~er .- A Tec',:i.'.~; tIt,io.v (3z-
162
~I0] F,~'ri~d, LA,, and 'R.oy, S. "Course scheduling and classroom as~,2:nment in a z:,-,iversity", P-abticatiot~ 459, University of Iqontreal. 19~2.
[It] Ford, L.R.. and Fulk.e;~on, D.R.~ Flows in Networks,
Princetor. University Press, Princeton. 1962.
[t2] Gans, O.B. de, "A computer timetabling system or
secuada_ry schools in ib.e Netherlands". European Journal
of Operational Research 7 (1981) 175-182.
[13] ,..qarey, MR., and Jolar~c~a, D.S., C~,nputers r:nd Intractab,l~.:~,, a Guide to ~he Theo~ of NP. completeness, Freeman,
Sa~ Francisco, ;979.
[14] Gotlieb, C.C, "T-nz cen.~;truction of clas-~-teacher timetablef' Proceeding 1FfP Congress 1962, A~asterdam, 1963,
73-77.
[15] Hil~.oa, A.J.W., "'Sci,,ool timetables", A~,,,als of Discrcie
~,lath:m.rr~.cs 11 (1981) !77-138.
~16] Johri. A.. and Matula, D.W., "Probabilistic bounds m,d
~euri5tic algorithms for coloring large random graphs",
Dept. of Computer ~ience Engi.n~r~,g. Southe,~ Meth
.>dist University Dallas, Texas, 1982.
[17] Junginger, W., "Zur~ckff~brung des S~udenplanprobb~ms
attf eta dreidimensionaies Transportprobtem", Zeitsthrift
fi~r Operations Eesearch 16 (1972) 11-25.
[18] Junginger, W., "Zum aktuel!en Stand der automadschen
Studenptanerstellung", Angewandte lnforma#k 1 (1982)
20-25.
i191 Krarup, J., ".Chromatic oFtirnisation: Limitations, objecfives, uses, referenc~', European Journal of Operational
hesearch 11 (i982) 1-19.
[20] Lawrie, N.L., ".a.n integer programming mcdel of a school
timetabting problem", Computer Journal 12 (1969) 307[211 Leighton, F.T., "A graph coloring algorithm for large
sclzexluling problems". Jo:,rnal of Research of the National
Bureau o] Standm'd 84 (1979) 489-506.
122] ~,.~;Lhadev, N.V.R., and de Werra, D., "On a class of
~erfectly orderable graphs", Report CORR 83/27, Uni, ersity of Water!oo, Ontario, 1983.
123] Mebta, N.K., "The application of a graph c,,.loring meth~
to an examination scheduling problem", Interfaces 11
(1981) 5"/--64.
[2~] Mulvey, J.M., "A classroom/tmae assignment model",
European Journal of Operational Researck 9 (1982) 64-70.
[25] Osrerar~a.~n, R., and de Werra. D., "Some expertments