A wide-ranging computational comparison of high-performance graph colouring algorithms
Introduction
The graph colouring problem is a classical NP-hard combinatorial optimisation problem with practical applications in various branches of operational research including school and university timetabling [14], [16], [56], sports scheduling [59], frequency assignment [6], [78], compiler register allocation [18], and short-circuit testing [40]. Graph colouring involves assigning a “colour” to each vertex in a graph such that adjacent vertices are allocated different colours, with the number of colours being minimised [46], [65]. Formally, given an undirected simple graph , with vertex set V and edge set E, the task is to assign each vertex an integer such that:
- •
and
- •
k is minimised.
In addition to its underlying computational complexity, the graph colouring problem presents considerable challenges due to the sheer variety of graph structures that can be encountered in practice. Some graphs, for example, are generated so that the degrees of the vertices are modelled by a particular probability function, or such that the vertices and edges correspond to specific geometric objects and configurations. Graphs can also be produced so that their solutions fulfil certain properties such as the number of colours that are needed, and/or the number of vertices assigned to each colour class. Graphs arising from practical problems can also exhibit certain features: e.g. graphs that model timetabling problems may contain various large cliques,1 or exhibit some clustering of the vertices [72]. If the existence of such structures is known beforehand then algorithms might be tailored to exploit this information, perhaps leading to improvements in performance. However, the identification of such structures is not always easy and, indeed, is often a computationally intractable task in itself [49].
The past four decades have seen very many articles proposing algorithms for the graph colouring problem, ranging from simple constructive techniques [79] to sophisticated hybrid metaheuristics [37], [45], [61], [74]. Comparisons of such algorithms have generally been conducted empirically, and a useful development occurred in 1992 with the organisation of the Second DIMACS Implementation Challenge [2], which resulted in a suite of differently structured graph colouring problems being placed into the public domain. In addition, various problem generators have also been made available online for practitioners who are interested in testing their algorithms on particular types of problem instance [4]. However, despite these developments we suggest that it is often difficult to assess from the literature the relative benefits of different graph colouring algorithms, particularly due to the following reasons.
- •
Although many studies make use of publicly available problem instances or generators, experimental conditions usually alter from paper to paper. In particular, researchers often perform different numbers of trials-per-instance, use different performance metrics, and/or impose different computation limits. In cases where sets of benchmark instances are used, researchers also often direct their efforts towards gaining good results on just a subset of problems.
- •
Related to this, many research papers only report results achieved at the imposed cut-off point, giving little indication of how an algorithm progresses from the initial solution towards the final reported solution.
- •
In some cases researchers also enhance results using existing knowledge on the structure of a problem instance to tune their algorithms. For example, the minimal number of colours needed to colour the graph might be known in advance, or details may be available as to how the problem was generated. Of course, on the one hand tuning an algorithm may help to give readers a true appreciation of its capabilities; however, such actions also go against the general aim of an approximation algorithm, which is to produce good quality results while assuming no such specialist knowledge on behalf of the user.
Given these issues, in this work our aim is to provide an instructive comparative analysis on a range of different graph colouring algorithms, some of which are currently claimed to be “state of the art”. To achieve this, we consider the performance of six methods, using at least one from each of the main algorithmic schemes identified in the next section. We also avoid some of the pitfalls above by (a) analysing algorithm performance using a platform-independent performance metric; (b) using a very large sample of problem instances (over 5000); and (c) by executing algorithms blindly, meaning that no problem knowledge is assumed on behalf of the user before a run is started.
In the next section we start by reviewing some of the more prominent algorithms proposed for the graph colouring problem over the past 40 years, identifying common schemes. Other reviews can be found in [38], [45], [54]. Section 3 then contains a more detailed description of the six algorithms considered in our comparison, with Section 4 detailing the results. Section 5 concludes the paper.
Section snippets
Existing methods for general graph colouring
Before conducting a review of the literature, we outline some terms and notation used in this paper.
- •
A candidate solution to a graph colouring problem is said to be complete if all of its vertices are assigned a colour , otherwise it is a partial solution.
- •
If in a solution there exists a pair of nodes such that and , then this is termed as a clash between v and u. If a solution contains no clashes, then it is a proper solution, otherwise it is improper.
- •
A
Algorithms for this comparison
In this section we review in more detail the six algorithms considered in our comparison. To gain a holistic view, we purposely choose at least one high-performing method from each algorithmic scheme outlined above. Specifically, TabuCol, AntCol and the hybrid evolutionary algorithm (HEA) operate by searching spaces of complete, improper k-colourings; PartialCol searches spaces of partial, proper colourings; the hill climbing (HC) method explores spaces of feasible colourings; and the
Experimental analysis
In this section we detail the various graph types considered in our experiments and analyse the results achieved by the six algorithms. First we consider performance with two well-known types of artificially generated graph, random graphs and flat graphs, produced using the publicly available software of Culberson [4]. Section 4.2 then compares the algorithms on graphs arising in three practical situations, namely university timetabling (Section 4.2.1), social networking (Section 4.2.2), and
Conclusions and discussion
This paper has presented a broad comparison of six graph colouring algorithms, detailing the results of over 40,000 individual trials. An analysis of these results reveals a complicated picture, with each algorithm outperforming all others on at least one occasion. This suggests the underlying structures of graphs (themselves not always easy to gauge) are often critical in subsequent algorithm performance. Indeed, in some cases we have seen that even very slight adjustments to graph parameters
Acknowledgments
This work was partially carried out using the computational facilities of the Advanced Research Computing @ Cardiff (ARCCA) Division, Cardiff University.
This research also uses data from Add Health, a program project directed by Kathleen Mullan Harris and designed by J. Richard Udry, Peter S. Bearman, and Kathleen Mullan Harris at the University of North Carolina at Chapel Hill, and funded by Grant P01-HD31921 from the Eunice Kennedy Shriver National Institute of Child Health and Human
References (80)
- et al.
A variable neighborhood search for graph coloring
European Journal of Operations Research
(2003) - et al.
A graph coloring heuristic using partial solutions and a reactive tabu scheme
Computers and Operations Research
(2008) - et al.
Some experiments with simulated annealing for coloring graphs
European Journal of Operations Research
(1987) Some models of graphs for scheduling sports competitions
Discrete Applied Mathematics
(1988)- et al.
A survey of local search algorithms for graph coloring
Computers and Operations Research
(2006) Future paths for integer programming and links to artificial intelligence
Computers and Operations Research
(1986)- et al.
Variable space search for graph coloring
Discrete Applied Mathematics
(2008) A general-purpose hill-climbing method for order independent minimum grouping problems: a case study in graph colouring and bin packing
Computers and Operations Research
(2009)- et al.
A memetic algorithm for graph coloring
European Journal of Operational Research
(2010) - et al.
An evolutionary approach with diversity guarantee and well-informed grouping recombination for graph coloring
Computers and Operations Research
(2010)
Using an incomplete version of dynamic backtracking for graph colouring
Electronic Notes in Discrete Mathematics
Almost all k-colorable graphs are easy to color
Journal of Algorithms
Scheduling fixtures for basketball New Zealand
Computers and Operations Research
Models and solution techniques for the frequency assignment problems
4OR : Quarterly Journal of the Belgian, French and Italian Operations Research Societies
A simulated annealing approach to the traveling tournament problem
Journal of Scheduling
New methods to color the vertices of a graph
Communications of the ACM
Chromatic scheduling and the chromatic number problem
Management Science
Applications to timetabling
Specialised recombinative operators for timetabling problems
A multi-stage evolutionary algorithm for the timetable problem
IEEE Transactions on Evolutionary Computation
A multiobjective genetic algorithm for the class/teacher timetabling problem
A survey of practical applications of examination timetabling algorithms
Operations Research
Examination timetabling: algorithmic strategies and applications
Journal of the Operational Research Society
Register allocation and spilling via graph coloring
SIGPLAN Notices
Where the really hard problems are
Metaheuristics for high-school timetabling
Computational Optimization and Applications
Ants can colour graphs
Journal of the Operational Research Society
Application of a hybrid multi-objective evolutionary algorithm to the uncapacitated exam proximity problem
Exploring the k-colorable landscape with iterated greedy
Multi-neighbourhood local search with application to course timetabling
Ant colony optimization
A new genetic local search algorithm for graph coloring
The traveling tournament problem: description and benchmarks
Cited by (29)
A hybrid heuristic for the maximum dispersion problem
2021, European Journal of Operational ResearchMessage scheduling for real-time interprocessor communication
2015, Journal of Systems ArchitectureCitation Excerpt :The conflict graph defined in this paper in general does not have any special structures. A large number of heuristic methods exist for the classical graph coloring problem [10], but none as far for the generalized version discussed above. We will use a generalized version of a greedy coloring algorithm: given a sequence of the conflict graph’s nodes and the number of assignable colors the greedy algorithm colors the nodes based on the already assigned colors of its neighbors in such a way that their color classes (3) do not intersect.
Analysing the effects of solution space connectivity with an effective metaheuristic for the course timetabling problem
2015, European Journal of Operational ResearchAn exact algorithm with learning for the graph coloring problem
2014, Computers and Operations ResearchCitation Excerpt :It is well-known that approximate algorithms for GCP are often better than exact algorithms for computing UB, while they usually are unable to compute LB. We refer to [25,26] for a comprehensive survey of approximate algorithms for GCP and a wide-ranging computational comparison of high-performance GCP algorithms. Table 10 compares the UB of a subset of hard DIMACS graphs computed by cdclGCP within 7200 s with the best known UB reported by an approximate algorithm in the literature.
Towards objective measures of algorithm performance across instance space
2014, Computers and Operations ResearchCitation Excerpt :This paper extends the methodology that has been under development for the last few years by addressing these last remaining questions. We demonstrate the use of the methodology by applying it to some computational results reported recently for an extensive comparison of graph coloring heuristics [19]. This case study reveals insights into the relative powers of the chosen optimization algorithms that were not apparent by considering performance averaged across all chosen instances.
One Model, Any CSP: Graph Neural Networks as Fast Global Search Heuristics for Constraint Satisfaction
2023, IJCAI International Joint Conference on Artificial Intelligence