Elsevier

Computers & Operations Research

Volume 39, Issue 9, September 2012, Pages 1933-1950
Computers & Operations Research

A wide-ranging computational comparison of high-performance graph colouring algorithms

https://doi.org/10.1016/j.cor.2011.08.010Get rights and content

Abstract

This paper reviews the current state of the literature surrounding methods for the general graph colouring problem and presents a broad comparison of six high-performance algorithms, each belonging to one of the main algorithmic schemes identified. Unlike many previous computational studies in graph colouring, a large range of both artificially generated and real-world graphs are considered, culminating in over 40,000 individual trials that have consumed more than a decade of computation time in total. The picture painted by the comparison is complex, with each method outperforming all others on at least one occasion; however, general patterns are also observed, particularly with regards to the advantages of hybridising local-search techniques with global-based operators.

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 G=(V,E), with vertex set V and edge set E, the task is to assign each vertex vV an integer c(v){1,2,,k} such that:

  • c(v)c(u) {v,u}E 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 vV are assigned a colour c(v){1,,k}, otherwise it is a partial solution.

  • If in a solution there exists a pair of nodes u,vV such that {u,v}E and c(v)=c(u), 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)

  • S. Prestwich

    Using an incomplete version of dynamic backtracking for graph colouring

    Electronic Notes in Discrete Mathematics

    (1999)
  • J.S. Turner

    Almost all k-colorable graphs are easy to color

    Journal of Algorithms

    (1988)
  • M. Wright

    Scheduling fixtures for basketball New Zealand

    Computers and Operations Research

    (2006)
  • ...
  • ...
  • ...
  • ...
  • ...
  • K.I. Aardel et al.

    Models and solution techniques for the frequency assignment problems

    4OR : Quarterly Journal of the Belgian, French and Italian Operations Research Societies

    (2002)
  • A. Anagnostopoulos et al.

    A simulated annealing approach to the traveling tournament problem

    Journal of Scheduling

    (2006)
  • D. Brélaz

    New methods to color the vertices of a graph

    Communications of the ACM

    (1979)
  • R. Brown

    Chromatic scheduling and the chromatic number problem

    Management Science

    (1972)
  • E. Burke et al.

    Applications to timetabling

  • E. Burke et al.

    Specialised recombinative operators for timetabling problems

  • E.K. Burke et al.

    A multi-stage evolutionary algorithm for the timetable problem

    IEEE Transactions on Evolutionary Computation

    (1999)
  • M.P. Carrasco et al.

    A multiobjective genetic algorithm for the class/teacher timetabling problem

  • M. Carter

    A survey of practical applications of examination timetabling algorithms

    Operations Research

    (1986)
  • M. Carter et al.

    Examination timetabling: algorithmic strategies and applications

    Journal of the Operational Research Society

    (1996)
  • G. Chaitin

    Register allocation and spilling via graph coloring

    SIGPLAN Notices

    (2004)
  • P. Cheeseman et al.

    Where the really hard problems are

  • Chiarandini M, Stützle T. An application of iterated local search to graph coloring. In: Johnson D, Mehrotra A, Trick...
  • A. Colorni et al.

    Metaheuristics for high-school timetabling

    Computational Optimization and Applications

    (1997)
  • D. Costa et al.

    Ants can colour graphs

    Journal of the Operational Research Society

    (1997)
  • P. Cote et al.

    Application of a hybrid multi-objective evolutionary algorithm to the uncapacitated exam proximity problem

  • Craenen BGW. Solving constraint satisfaction problems with evolutionary algorithms. PhD thesis, Vrije Universiteit...
  • J. Culberson et al.

    Exploring the k-colorable landscape with iterated greedy

  • L. Di Gaspero et al.

    Multi-neighbourhood local search with application to course timetabling

  • M. Dorigo et al.

    Ant colony optimization

    (2004)
  • R. Dorne et al.

    A new genetic local search algorithm for graph coloring

  • K. Easton et al.

    The traveling tournament problem: description and benchmarks

  • Cited by (29)

    • A hybrid heuristic for the maximum dispersion problem

      2021, European Journal of Operational Research
    • Message scheduling for real-time interprocessor communication

      2015, Journal of Systems Architecture
      Citation 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.

    • An exact algorithm with learning for the graph coloring problem

      2014, Computers and Operations Research
      Citation 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 Research
      Citation 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
    View all citing articles on Scopus
    View full text