109 PDF

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

Big Bang-Big Crunch Optimization Algorithm to

Solve the Course Timetabling Problem

Ghaith M. Jaradat Masri Ayob


Data Mining and Optimization Research Group Data Mining and Optimization Research Group
The National University of Malaysia The National University of Malaysia
B.B.Bangi, Selangor, Malaysia B.B.Bangi, Selangor, Malaysia
gm45973@ftsm.ukm.my masri@ftsm.ukm.my

Abstract— In this study, we present the Big Bang-Big Crunch problems. For example, Erol and Eksin [6] applied the
(BB-BC) method to solve the post-enrolment course original BB-BC on truss optimization problem, and
timetabling problem. This method is derived from one of the compared it against genetic algorithm (GA) and an improved
evolution of the universe theories in physics and astronomy. GA called Combat-GA (CGA). They showed that the BB-
The BB-BC theory involves two phases (Big Bang and Big BC outperformed the CGA in most of the test functions
Crunch). The Big Bang phase feeds the Big Crunch phase with instances in terms of quality and speed. In the other work,
many inputs and the Big Crunch phase is the shrinking destiny Kaveh and Talatahari [7] compared the BB-BC against
of the universe into singularity. Generally, the BB-BC particle swarm optimization (PSO), harmony search (HS),
algorithm generates a population of random initial solutions in
and ACO. [6, 7] They showed that the performance of the
the Big Bang phase and shrinks those solutions to a single good
quality solution represented by a centre of mass. Experimental
BB-BC demonstrates superiority over PSO, HS and ACO in
results show that the BB-BC can produce good quality terms of computational time and the quality of obtained
solutions and comparable with some of the methods applied in solutions.
the literature (with regards to Socha’s benchmark instances). Therefore, in this study, we modify the BB-BC algorithm
to solve the course timetabling problem. We have chosen
Keywords- big bang-big crunch; post-enrolment course this approach due to: less parameterized structure, the ability
timetabling problem; to distribute the search over a various number of solutions
instead of one, and the capability of quick convergence even
I. INTRODUCTION in the existence of multiple local minima [8]. Hopefully this
enables the search to rapidly find good quality solutions in
The post-enrolment course timetabling problem mainly different regions in the search space. This study aims to
comprises of assigning a set of courses, and students to a investigate the performance of the BB-BC in solving the
specific number of timeslots and rooms in a week, while course timetabling problem. In order to demonstrate the
satisfying some constraints [1]. There are two types of performance of our algorithm, we test it over the post-
constraints: hard and soft. In order to produce a feasible enrolment course timetabling test datasets introduced by [1].
timetable, all of the hard constraints must be satisfied. We compare them with other related methods reported in the
Whereas, the violation of the soft constraints must be literature.
minimized in order to produce a good quality timetable.
Each violation of soft constraints will incur a penalty cost II. PROBLEM DESCRIPTION
(lower penalty value indicates good quality solution). In this study, we test our algorithm on the course
The university course timetabling problems are timetabling instances that were introduced by Socha et al.
considered as NP-hard problems which are difficult to solve [1]. The characteristics of Socha’s instances are:
for optimality [2]. For such complex search and
x A set of N courses that need to be scheduled into 5
combinatorial optimization problems, natural inspired
working days a week of 9 timeslots each day, in
(including population-based) approaches are among the
methods that were proved to be promised ones in handling which, T=45 timeslots,
these problems [3]. x A set of R rooms is given, in which, each room has a
During the last decade, various nature inspired number of F features including their capacities
approaches have been intensively applied to solve course required by the course,
timetabling problem. Some of the common techniques are x A number of M students who will attend the course.
the Ant Colony Optimization [1] [4], Simulated Annealing Each student enrolled a number of courses.
and Genetic Algorithm [5]. The hard constraints for this dataset are:
However, there are many other nature inspired
H1: No student attends more than one course at the same
approaches that have not been applied in course timetabling
time;
problem. Such as, BB-BC (Big Bang-Big Crunch). BB-BC
has been applied to some combinatorial optimization H2: The room is big enough for all the attending students

978-1-4244-8136-1/10/$26.00 2010
c IEEE 1448
and satisfies all the features required by the assigned TABLE I. COMPARISON BETWEEN MA AND BB-BC

course; Features Memetic BB-BC


H3: Only one course is assigned into each room at any
timeslot. Population Chromosomes, large size Stellar objects, large size
A feasible timetable is one in which all courses have Probabilistic selection in Probabilistic selection in
Reproduction
been assigned to timeslots and rooms (i.e. all hard constraints Hamming space Euclidean space
are satisfied). The quality of timetable is measured (as in [5]) Crossover & mutation rely No combinations,
Combination
on randomization mutation is a perturbation
by penalising equally each violation of the following soft
Strongest gravitational
constraint (i.e. penalty cost=1 times the number of students Evolution Survival of the fittest
pole
involved for each violation):
Local Search Significant intensification Significant intensification
S1: A student should not has a class in the last slot of the
day; Search update Randomized selection Pseudo- random selection
S2: A student should not has more than two classes Memory use Memory less Memory less
consecutively; Search Limited information about Limited information about
S3: A student should not has a single class on a day. experience solution’s components solution’s components
The aim is to minimize the violation of the soft Diversification Mutation Euclidean distances
constraints which represent the quality of the timetable.
Selection, Crossover,
More information about the problem's instances can be found Intensification
Replacement
Centre of mass
in [1].
III. THE BIG BANG-BIG CRUNCH ALGORITHM Generally, our algorithm differs from the original BB-BC
algorithm [6] in term of representing exploration and
BB-BC algorithm is derived from one of the evolution of exploitation phases (solution construction and improvement).
the universe theories in physics and astronomy, describing That is: (i) We exploit a collection of elite solutions to
how the universe was created, evolved and how would end. generate new promising population in successive Big Bang
The BB-BC theory involves two phases: Big Bang and Big phases, where the elite collection contains best found
Crunch. The Big Bang phase is a set of procedures of energy solutions based on their quality. Whereas, the original BB-
dissipation in nature term of disordering and randomness. BC rebuilding new solutions from scratch to generate new
The Big Crunch phase is a procedure that randomly generation. (ii) We employ variable neighborhood structures
distributes particles and draws them into an order. and simple descent heuristic (as a local search), whilst [6]
The Big Bang and Big Crunch phases represent the large examined solution neighbors either using greedy descent or
search space exploration and best solution exploitation, steepest descent. (iii) We simply use the quality of the
respectively. The Big Bang phase (energy dissipation) generated solutions to represent the centre of mass (i.e. the
randomly generates an initial population of feasible best quality solution) and maximum, minimum cost values of
candidate solutions (similar to the GA in respect to solutions in the elite pool to determine the boundaries
generating a random initial population). Generally, this phase (allowable space) of the successive population. Whereas, the
represents the search space exploration process. original BB-BC calculates solutions’ positions relatively to
The populations produced by the Big Bang phase will be the centre of mass in the search space, and the magnitude of
gradually reduce in Big Crunch phase. This aims to reduce gravitational attraction that affects the population to
computational time and have quick convergence, while converge toward the centre of mass in the Euclidean space
maintaining search diversity and quality of solutions. The (refer to equation 2 in [6]).
cost function value of a candidate solution in the population The new off-springs for the successive iteration Big Bang
represents a mass. In this work, we represent the best phase (and in Big Crunch phase) are normally distributed
candidate solution as the centre of mass (as recommended by around the centre of mass (Cc) as in [6] (see Eq. 1):
[6]). The centre of mass will attract other solutions. This
because solutions with greater mass (in our case smaller C inew Cc  V (1)
penalty cost) are potentially more closer to the centre of the
search space (universe) or to the point where the Big Crunch
where Cinew is the new candidate solution i; and ı is a
will converge.
Specifically, the BB-BC algorithm works with a standard deviation of a normal distribution. The standard
population of variable size (e.g. stellar objects) [8]. It can deviation decreases as the iterations elapse according to the
maintain the diversity of the search, in which it may avoid following formula (Eq. 2) as in [6]:
being trapped in local optimum, and can converge in a
reasonable speed [9]. It is alike memetic (GA + local search) r D ( C max  C min ) D
V ,0  1 (2)
except it does not involve solutions combination (e.g. k k
crossover) and the mutation is represented by solution’s
perturbations. The following table summarizes the where r is a random number between [0,1], Į is a
comparison between memetic and BB-BC algorithms. reduction rate of the size of the search space; Cmax and Cmin
are the upper and lower limits of the elite pool; and k is the

2010 10th International Conference on Intelligent Systems Design and Applications 1449
number of iterations. Therefore, the new off-spring is with the best off-spring in order to have better quality
generated as in (Eq. 1) and within the upper and lower solutions in successive population, while maintaining
bounds. The lower and upper limits are necessary to control diversity of the search. This may avoid premature
the solutions distribution. In this work, we eliminate r by convergence of the search (Step 2). In (Step 3) we determine
fixing its value to 1, since it has shown no significant impact the centre of mass Cc based on the best solution cost value
on the population reduction process in our preliminary found, Cbest. The centre of mass is further improved by
experiments. applying a simple descent heuristic for a predefined number
At the end of the Big Crunch phase (i.e. when a of non-improvement iterations (Step 4). An elite pool
population size reduce to one solution), a new generation (collection) is created/updated in (Step 5), where the best
will be generated from the elite pool of the previous solutions (centre of mass) of the previous generations are
generations with the same population size (as in the first stored in the elite pool and will be exploited as reference
generation), and starting with the previous centre of mass. solutions for the Big Bang phase in successive iterations. In
That is, the algorithm will regenerate a new candidate this work, we use a fixed size of elite pool, where in the first
solution population from the elite pool (by performing iteration; some good solutions are selected to be included in
shaking to the solution), bounded by the maximum and the pool. At each iteration, the elite pool is updated by
minimum of the solutions’ cost values of the previous replacing the worst solution cost in the current centre of mass
generation. and solutions. Based on (Eq. 1), the search will gradually
In order to include possible good quality solutions, we converge to a single solution by reducing the size of the
allow an extended lower limit. That is, all improve solutions population (Step 6). This is done by eliminating poor quality
are allowed (although they are out of the boundary), the solutions around the centre of mass. The Big Crunch phase is
upper limit is restricted so as to limit accepting worse repeated until the population size is reduced to a single
solution. solution (singularity).
The pseudo code of our BB-BC algorithm for course A new Big Bang is commenced (Step 7) by returning to
timetabling problem is shown in Figure 1. Our algorithm (the the first step, where a new population is generated from the
BB-BC) starts with the construction phase (Big Bang) that elite pool. That is, by including the elite solutions in the new
constructs a population of N feasible candidate solutions Ci population and generating some neighbors from them to
from scratch (Step 1) for the first generation. In this study, form the new population (rather than generating new
we use a combination of saturation degree and largest solutions from scratch as in [6]). Our BB-BC algorithm’s
weighted degree [10] with a repair procedure as in [11] to search process is repeated until the stopping criterion is met,
rectify the infeasible solutions. For the successive Big Bang which is, in our work the number of iterations. Finally, the
phase, we generate new population from the elite pool BB-BC returns the best found solution (Step 8).
(without including the elite solutions themselves in the new In this work, we employed neighborhood structures (as in
population) by performing shaking to solutions in the pool [12]) to the whole population including center of mass Cc
bounded by the upper and lower cost values of solutions in (i.e. in Step 1 and Step 3). At each iteration, we generate five
the elite pool. feasible neighbors for each candidate solution in Npop and the
best neighbor is chosen to replace its parent solution for the
Big Bang phase (solutions construction): next generation Nnewpop.
Step 1: Generate population (construct solutions from scratch for
the first generation, or else generate new population IV. EXPERIMENTAL RESULTS AND DISCUSSION
from the elite pool);
In this study, we test the BB-BC on Socha’s [1] course
Big Crunch phase (Local Search move):
timetabling datasets. The best suited parameter values for our
Repeat
Step2: Generate some neighbors for all solutions in the
BB-BC algorithm were chosen based on preliminary
population and replace the parent with its best off- experiments and literature recommendations (as in [6] [8]).
spring for each solution in the population; Table II shows the parameter settings that we use in our
Step 3: Find the centre of mass; work.
Step 4: Apply local search to the centre of mass; The experiments were performed on Intel Pentium Core2
Step 5: Update the elite pool and the best found solution; Duo 2.16 GHz processor, using Java NetBeans IDE v 6.8.
Step 6: Eliminating some poor quality solutions; We ran our algorithm 25 times for each instance. In the case
Until population size is reduced to a single solution; of population-based approaches, it is known that the cost
Step 7: Return to Step 1 if stopping criterion is not met; function value is calculated for every candidate solution in
Step 8: Return the best found solution. each population, and hence, it has a great impact on the
algorithm’s speed. However, we tested our algorithm under a
Figure 1. The pseudo code of our BB-BC algorithm for the course relaxed stopping condition (ranges from 30 seconds to 12
timetabling problem hours of computational time based on the instance’s size) not
restricted to the competition’s fixed time limit (474 seconds
Then, we employ the Big Crunch phase (improvement), calculated by the competition’s computational time estimator
where first we generate some neighbors from all solutions in based on our computer’s capability).
the population including the centre of mass by performing
simple perturbations. Each solution (parent) will be replaced

1450 2010 10th International Conference on Intelligent Systems Design and Applications
TABLE II. PPARAMETERS SETTINGS USED IN OUR ALGORITHM upper quartile (Q2) of results’ distributions, out of 25 runs on
each instance.
Parameter Value
The respected methodologies presented in table III are as
Npop Population size =100 (feasible solutions) follows: a hybrid evolutionary algorithm HEA (a
combination between GA and a randomized iterative
k Number of iterations = 100,000
improvement method) [13]; a genetic algorithm with a
kls Number of non-improvement iteration = 30 sequential local search (GASLS) and a repair function [11]; a
memetic algorithm (MA) [14]; a guided search GA (GSGA)
Į Reduction rate = 0.8
[15]; a hybrid electromagnetic-like with force decay rate
Elite_pool Elite pool size = 10 great deluge (EMGD) [16]; a max-min ant system (MMAS)
[4]; and an extended version of GSGA (EGSGA) [12].
Ns Number of neighbors created in each generation = 5
The results shows that our BB-BC algorithm can
Elitism Last population solution is forced to be always the best consistently produce good quality timetables, which are
somewhat comparable to some results obtained by other
Table III shows the results obtained from our algorithm population-based approaches reported in the literature. For
compared to some of the best known results obtained by example, our algorithm has obtained the best results for all
other methodologies applied over the Socha’s test instances small instances and outperformed all population-based
in the literature. All of the methodologies presented in Table approaches (presented in table III) in medium5 instance. This
III share common features with our algorithm, such as might be due to the following factors: (i) Population size
population-based features, large number of iterations (more reduction guarantees search convergence to a local minima
than or equal to 100,000) under a relaxed stopping condition, (centre of mass) in the Big Crunch phase, while generating
and variable neighborhood structures, in which we tried to new population in new Big Bang phase guarantees search
make reasonable, fair and meaningful comparisons. Best diversity. (ii) Searching some neighbors within the search
results are presented in bold. The statistical readings (in space boundaries in the Big Crunch phase may likely to
Table III) are based on the following performance indicators: guarantee a significant solution improvement. (iii)
the best obtained result (best), the worst (w), the standard Maintaining a balance between search diversity and quality.
deviation (ı), the median (m), the lower quartile (Q1) and (iv) Exploiting an elite pool in generating new promising
population in successive Big Bang phases.

TABLE III. COMPUTATIONAL STATISTICS OF THE BB-BC ALGORITHM APPLIED TO THE 11 INSTANCES UNDER RELAXED STOP
CONDITION

Our BB-BC Algorithm Other Population-based approaches

GA GS EM MM EGS
Dataset best Q1 m ı Q2 w HEA MA
SLS GA GD AS GA
small1 0 0 2 1.29 2 4 0 2 0 0 0 1 0
small2 0 0 1 1.11 2 4 0 4 0 0 0 3 0
small3 0 1 2 1.76 3 7 0 2 0 0 0 1 0
small4 0 0 1 .7 1 2 0 0 0 0 0 1 0
small5 0 1 1 .7 2 2 0 4 0 0 0 0 0
medium1 99 104 108 7.15 114 124 221 254 227 240 96 195 139
medium2 102 109 116 9.72 125 134 147 285 180 160 96 184 92
medium3 158 171 183 19.52 204 219 246 251 235 242 135 248 122
medium4 86 101 106 11.01 112 129 165 321 142 158 79 164.5 98
medium5 79 87 97 12.24 108 120 130 276 200 124 87 219.5 116
large 768 794 837 45.96 865 922 529 1027 - 801 683 851.5 615

According to [17], the problem’s difficulty (varies cost [17]. Moreover, our BB-BC algorithm managed to
from dataset to another), which directly affects the maintain feasibility of solutions during the search process
performance of the algorithm in term of easiness of and scanning different feasible regions in the search space.
solving the problem. In our algorithm, the use of least This is achieved by producing new solutions from the elite
saturation degree and largest weighted degree heuristics pool and reducing population’s size in order to draw the
has overcome the problem’s difficulty in constructing an next generation into an ordered manner of distribution
initial population of feasible solutions. Combinations of which may contains diverse solutions. This enables the
two low-level heuristics increase the probability of algorithm to escape the local minima and restart the search
obtaining a feasible solution and probably with a higher effectively, and explores different regions of the search
fitness cost than other meta-heuristics do [10]. A higher space even it has a rapid and aggressive convergence.
fitness cost of an initial solution is most likely to converge
toward better quality solution than starting with low fitness

2010 10th International Conference on Intelligent Systems Design and Applications 1451
V. CONCLUSION AND FUTURE WORK [6] O. K. Erol, I. Eksin, “A new optimization method: Big Bang–Big
Crunch,” Advances in Engineering Software, Elsevier, vol. 37, pp.
The overall goal of this study was to investigate a 106–111, 2006.
population-based Big Bang-Big Crunch algorithm for [7] A. Kaveh, S. Talatahari, “Size optimization of space trusses using
solving the post-enrolment course timetabling problem Big Bang–Big Crunch algorithm,” Computers and Structures, vol.
through exploiting an elite pool of good quality to 87 (17-18), pp. 1129-1140, 2009.
maintain diversity of the search and to determine the [8] H. M. Genc, A. K. Hocaoglu, “Bearing-Only Target Tracking
boundaries of the new population. A proportional Based on Big Bang – Big Crunch Algorithm,” In: The Proceedings
of the 3rd International Multi-Conference on Computing in the
reduction of the population as the number of iterations Global Information Technology (ICCGI '08). DOI
elapses ensures the search convergence while maintaining 10.1109/ICCGI.2008.53, July 27-Aug. 1, pp. 229 – 233, 2008.
a balance between good quality and diverse solutions. By [9] M. Kripka, M. L. Kripka, “Big Crunch Optimization Method,”
utilizing the capabilities of a population-based approach in EngOpt 2008 - International Conference on Engineering
large search space exploration and best solutions Optimization Rio de Janeiro, Brazil, June, 2008.
exploitation using neighborhood structures [3], our [10] E. K. Burke, B. McCollum, A. Meisels, S. Petrovic, , R. Qu, “A
experimental results indicated that BB-BC is able to Graph-Based Hyper-Heuristic for Educational Timetabling
Problems,” In: The European Journal of Operational Research, vol.
produce feasible and good quality solutions and are 176, pp.177-192 , 2005.
competitive to some reported results in the literature [11] S. Abdullah, H. Turabieh, “Generating university course timetable
applied to the Socha’s benchmark instances. using genetic algorithms and local search,” In: The Third 2008
An advantage of BB-BC is that the capability of International Conference on Convergence and Hybrid Information
exploration and exploitation of multiple solutions. Technology ICCIT, vol. I, pp. 254–260, 2008.
Moreover, since it has a fast solution convergence [12] S. Yang, and S. N. Jat, “Genetic Algorithms With Guided and
behavior, it is most likely to explore a number of different Local Search Strategies for University Course Timetabling”, In:
IEEE Transactions on Systems, Man, and Cybernetics—Part C:
regions in the search space in a short time due to the Applications and Reviews, DOI: 10.1109/TSMCC.2010.2049200,
population size reduction and regeneration. pp. 1-14, 2010.
[13] S. Abdullah, E. K. Burke, B. McCollum, “A hybrid evolutionary
REFERENCES approach to the university course timetabling problem,” In: IEEE
[1] K. Socha, J. Knowles, M. Samples, “A max-min ant system for the Congres on Evolutionary Computation, ISBN: 1-4244-1340-0,
university course timetabling problem,” In: Dorigo, M., Di Caro, pp.1764–1768, 2007.
G.A., Sampels, M. (eds.) Ant Algorithms 2002. LNCS, vol. 2463, [14] S. N. Jat, S. Yang, “A Memetic Algorithm for the University
Springer, Heidelberg, pp. 1–13, 2002. Course Timetabling Problem,” In: the Proceedings of the 20th
[2] S. Even, A. Itai, A. Shamir, “On the Complexity of Timetable and IEEE International Conference on Tools with Artificial
Multi commodity Flow Problem,” SIAM J. Comput. 5, pp. 691- Intelligence, pp.427-433, 2008.
703, 1976. [15] S. N. Jat, S. Yang, “A Guided Search Genetic Algorithm for the
[3] C. Blum, A. Roli, “Metaheuristics in combinatorial optimization: University Course Timetabling Problem,” In: the Proceedings of
overview and conceptual comparison,” ACM Computing Surveys the Multidisciplinary International Conference on Scheduling :
35 (3), pp. 268-308, 2003. Theory and Applications (MISTA 2009) 10-12 August 2009,
[4] K. Socha, M. Samples, M. Manfrin, “Ant algorithm for the Dublin, Ireland, LNCS, Springer-Verlag, pp.180-191, 2009.
university course timetabling problem with regard to the state-of- [16] S. Abdullah, H. Turabieh, “Electromagnetic Like Mechanism and
the-art,” In: The Proceedings of the 3th European Workshop on Great Deluge for Course Timetabling Problems,” In: P. Wen et al.
Evolutionary Computation in Combinatorial Optimisation, Essex, (Eds.): RSKT 2009, LNCS 5589, pp. 497–504, 2009.
UK, LNCS, vol 2611, Springer-Verlag, pp. 334-345, 2003. [17] B. McCollum, P. J. McMullan, A. J. Parkes, E. K. Burke, S.
[5] O. Rossi-Doria, M. Samples, M. Birattari, M. Chiarandini, M. Abdullah, “An Extended Great Deluge Approach to the
Dorigo, L. M. Gambardella, J. Knowels, M. Manfrin, M. Examination Timetabling Problem,” In: The Proceedings of
Mastrolilli, B. Paechter, L. Paquete, T. Stultzle, “A Comparison of Multidisciplinary International Conference on Scheduling: Theory
the Performance of Different Metaheuristics on the Timetabling and Applications (MISTA), pp. 424–434, 2009.
Problem,” In: Burke, E.K., De Causmaecker, P. (eds.) PATAT
2002. LNCS, vol. 2740, Springer, Heidelberg, pp. 329–354, 2003.

1452 2010 10th International Conference on Intelligent Systems Design and Applications

You might also like