Keywords

These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

1 Graph Coloring

Graph coloring is a well-known NP-hard combinatorial optimization problem that involves using a minimal number of colors to paint all vertices in a graph such that all adjacent vertices are allocated different colors. The problem is more formally stated as follows: given an undirected simple graph G = ( V , E ) , with vertex set V and edge set E, our task is to assign each vertex v V an integer c ( v ) { 1 , 2 , , k } so that:

  • c ( v ) c ( u ) { v , u } E

  • k is minimal.

Though essentially a theoretical problem, graph coloring is seen to underpin a wide variety of seemingly unrelated operational research problems, including satellite scheduling [1], educational timetabling [2, 3], sports league scheduling [4], frequency assignment problems [5, 6], map coloring [7], airline crew scheduling [8], and compiler register allocation [9]. The design of effective algorithms for graph coloring thus has positive implications for a large range of real-world problems.

Some common terms used with graph coloring are as follows:

  • A coloring of a graph is called complete if all vertices v V are assigned a color c ( v ) { 1 , , k } ; else it is considered partial.

  • clash describes a situation where a pair of adjacent vertices u , v V are assigned the same color (that is, { u , v } E and c ( v ) = c ( u ) ). If a coloring contains no clashes, then it is considered proper; else it is improper.

  • A coloring is feasible if and only if it is both complete and proper.

  • The chromatic number of a graph G, denoted χ ( G ) , is the minimal number of colors required in a feasible coloring. If a feasible coloring uses χ ( G ) colors, it is considered optimal.

  • An independent set is a subset of vertices I V that are mutually non-adjacent. That is, u , v I , { u , v } E . Similarly, a clique is a subset of vertices C V that are mutually adjacent: u , v C , { u , v } E .

Given these definitions, we might also view graph coloring as a type of partitioning/grouping problem where the aim is to split the vertices into a set of subsets U = { U 1 , , U k } such that U i U j = ( 1 i < j k ) . If i = 1 k U i = V , then the partition represents a complete coloring. Moreover, if all subsets U 1 , , U k are independent sets, the coloring is also feasible.

To exemplify these concepts, Fig. 63.1 shows an example graph with ten vertices, together with a corresponding coloring. In this case the presented coloring is both complete and proper, and therefore feasible. It is also optimal because it uses just five colors, which happens to be the chromatic number in this case. The graph also contains one clique of size 5 (vertices v 1 , v 3 , v 4 , v 6 , and v 7), and numerous independent sets, such as vertices v 2 , v 3 , v 8 , and v 9. As a partition, this coloring is represented U = { { v 1 , v 10 } , { v 7 , v 8 } , { v 3 , v 5 } , { v 2 , v 4 , v 9 } , { v 6 } } .

Fig. 63.1
figure 1figure 1

A simple graph (left) and a feasible five-coloring (right)

It should be noted that various subsidiary problems related to the graph coloring problem are also known to be NP-hard. These include computing the chromatic number itself, identifying the size of the largest clique, and determining the size of the largest independent set in a graph [10, 11]. In addition, the decision variant of the graph coloring problem, which asks: given a fixed positive integer k, is there a feasible k-coloring of the vertices? is NP-complete.

2 Algorithms for Graph Coloring

Graph coloring has been studied as an algorithmic problem since the late 1960s and, as a result, an abundance of methods have been proposed. Loosely speaking, these methods might be grouped into two main classes: constructive methods, which build solutions step-by-step, perhaps using various heuristic and backtracking operators; and stochastic search-based methods, which attempt to navigate their way through a space of candidate solutions while optimizing a particular objective function.

The earliest proposed algorithms for graph coloring generally belong to the class of constructive methods. Perhaps the simplest of these is the first-fit (or greedy) algorithm. This operates by taking each vertex in turn in a specified order and assigning it to the lowest indexed color where no clash is induced, creating new colors when necessary [12]. A development on this method is the Dsatur algorithm [13, 14] in which the ordering of the vertices is determined dynamically – specifically, by choosing at each step the uncolored vertex that currently has the largest number of different colors assigned to adjacent vertices, breaking ties by taking the vertex with the largest degree. Other constructive methods have included backtracking strategies, such as those of Brown [15] and Korman [16], which may ultimately perform complete enumerations of the solution space given excess time. A survey of backtracking approaches was presented by Kubale and Jackowski [17] in 1985.

Many of the more recent methods for graph coloring have followed the second approach mentioned above, which is to search a space of candidate solutions and attempt to identify members that optimize a specific objective function. Such methods can be further classified according to the composition of their search spaces, which can comprise:

  1. (a)

    The set of all feasible solutions (using an undefined number of colors)

  2. (b)

    The set of complete colorings (proper and improper) for a fixed number of colors k

  3. (c)

    The set of proper solutions (partial and complete), also for a fixed number of colors k.

Algorithms following scheme (a) have been considered by, among others, Culberson and Luo [18], Mumford [19], Erben [20], and Lewis [21]. Typically, these methods consider different permutations of the vertices, which are then fed into a constructive method (such as first-fit) to form feasible solutions. An intuitive cost function in such cases is simply the number of colors used in a solution, though other more fine-grained functions have been suggested, such as the following due to Erben [20]

f 1 = U i U [ v U i deg⁡ ( v ) ] 2 | U | .
(63.1)

Here, the term ( v U i deg⁡ ( v ) ) gives the sum of the degrees of all vertices assigned to a color class U i . The aim is to maximize f 1 by making increases to the numerator (by forming large color classes that contain high-degree vertices), and decreases to the denominator (by reducing the number of color classes).

On the other hand, algorithms following scheme (b) operate by first proposing a fixed number of colors k. At the start of a run, each vertex will be assigned to one of the k colors using heuristics, or randomly. However, this may involve the introduction of one or more clashes, resulting in a complete, improper k-coloring. The cost of such a solution might then be evaluated using the following cost function, which is simply a count on the number of clashes

f 2 = { v , u } E g ( v , u ) where g ( v , u ) = { 1 if c ( v ) = c ( u ) 0 otherwise . .
(63.2)

The strategy in such approaches is to make alterations to a solution such that the number of clashes is reduced to zero. If this is achieved k can be reduced; alternatively if all clashes cannot be eliminated, k can be increased. This strategy has been quite popular in the literature, involving the use of various stochastic search methodologies, including simulated annealing [22, 23], tabu search [24], greedy randomized adaptive search procedure (GlossaryTerm

GRASP

) methods [25], iterated local search [26, 27], variable neighborhood search [28], ant colony optimization [29], and evolutionary algorithms (GlossaryTerm

EA

) [30, 31, 32, 33, 34, 35].

Finally, scheme (c) also involves using a fixed number of colors k; however in this case, rather than allowing clashes to occur in a solution, vertices that cannot be feasibly assigned to a color are placed into a set of uncolored vertices S. The aim is, therefore, to make changes to a solution so that these vertices can eventually be feasibly colored, resulting in S = . This approach has generally been less popular in the literature than scheme (b), though some prominent examples include the simulated annealing approach of Morgenstern [36], the tabu search method of Blochliger and Zufferey [37], and the GlossaryTerm

EA

of Malaguti etal [38]. More recently, Hertz etal [39] also suggested an algorithm that searches different solution spaces during different stages of a run. The idea is that when the search is deemed to have stagnated in one space, a procedure is used to alter the current solution so that it becomes a member of another space (e. g., clashing vertices are uncolored by transferring them to S). Once this has been done, the search can then be continued in this new space where further improvements might be made.

2.1 EAs for Graph Coloring

In this section we now examine the ways in which GlossaryTerm

EA

s have been applied to the graph coloring problem, particularly looking at issues surrounding the recombination of solutions.

2.1.1 Assignment-Based Operators

Perhaps the most intuitive way of applying GlossaryTerm

EA

s to the graph coloring problem is to view the task as one of assignment. In this case, a candidate solution can be viewed as a mapping of vertices to colors c : V { 1 , , k } , and a natural chromosome representation is a vector ( c ( v 1 ) , c ( v 2 ) , , c ( v | V | ) ) , where c ( v i ) gives the color of vertex v i (the solution given in Fig. 63.1 would be represented by ( 1 , 4 , 3 , 4 , 3 , 5 , 2 , 2 , 4 , 1 ) under this scheme). However, it has long been argued that this sort of approach brings disadvantages, not least because it contradicts a fundamental design principle of GlossaryTerm

EA

s: the principle of minimum redundancy [40], which states that each member of the search space should be represented by as few distinct chromosomes as possible. To expand upon this point, we observe that under this assignment-based representation, if we are given a solution using l k colors, the number of different chromosomes representing this solution will be k P l due to the arbitrary way in which colors are allocated labels. (For example, swapping the labels of colors 2 and 4 in Fig. 63.1’s solution would give a new chromosome (1,2,3,2,3,5,4,4,2,1), but the same solution.) Of course, this implies a search space that is far larger than necessary.

Furthermore, authors such as Falkenauer [41] and Coll etal [42] have also argued that traditional recombination schemes such as 1, 2, and n-point crossover with this representation have a tendency to recklessly break up building-blocks that we might want promoted in a population. As an example, consider a recombination of the two example chromosomes given in the previous paragraph using two-point crossover: (1,4,3,4,3,5,2,2,4,1) crossed with (1,2,3,2,3,5,4,4,2,1) would give (1,4,3,4,3,5,4,4,4,1) as one of the offspring. Here, despite the fact that the two parent chromosomes actually represent the same feasible solution, the resultant offspring seems to have little in common with its parents, having lost one of its colors, and seen a number of clashes having been introduced. Thus, it is concluded by these authors that such operations actually constitute more of a random perturbation operator, rather than a mechanism for combining meaningful substructures from existing solutions. Nevertheless, recent algorithms following this scheme are still reported in the literature [43].

In recognition of the proposed disadvantages of the assignment-based representation, Coll etal [42] proposed a procedure for relabeling the colors of one of the parent chromosomes before applying crossover. Consider two (not necessarily feasible) parent solutions represented as partitions: U 1 = { U 1 , 1 , , U 1 , k } , and U 2 = { U 2 , 1 , , U 2 , k } . Now, using U 1 and U 2 , a complete bipartite graph K k , k is formed. This bipartite graph has k vertices in each partition, and the weights between two vertices i , j from different partitions are defined as w i , j = | U 1 , i U 2 , j | . Given K k , k , a maximum

weighted matching can then be determined using any suitable algorithm (e. g., the Hungarian algorithm [44] or auction algorithm [45]), and this matching can be used to re-label the colors in one of the chromosomes.

Figure 63.2 gives an example of this procedure and shows how the second parent can be altered so that its color labelings maximally match those of parent 1. In this case, we note that the color classes { v 1 , v 10 } , { v 3 , v 5 } , and { v 6 } occur in both parents and will be preserved in any offspring produced via a traditional crossover operator. However, this will not always be the case and will depend very much on the best matching that is available in each case.

Fig. 63.2
figure 2figure 2

Example of the relabeling procedure proposed by Coll etal [42]. Here, parent 2 is relabeled as 1 3 , 2 4 , 3 1 , 4 2 , and 5 5

A further scheme for color relabeling that also addresses the issue of redundancy was proposed by Tucker etal [46]. This method involves representing solutions using the assignment-based scheme, but under the following restriction

c ( v 1 ) = 1 ,
(63.3)
c ( v i + 1 ) max⁡ { c ( v 1 ) , , c ( v i ) } + 1 .
(63.4)

Chromosomes obeying these labeling criteria might, therefore, be considered as being in their canonical form such that, by definition, vertex v1 is always colored with color 1, v2 is always colored with color 1 or 2, and so on. (The solution given in Fig. 63.1 would be represented by (1,2,3,2,3,4,5,5,2,1) under this scheme.) However, although this ensures a one-to-one correspondence between the set of chromosomes and the set of vertex partitions (thereby removing any redundancy), research by Lewis and Pullin [47] demonstrated that this scheme is not particularly useful for graph coloring, not least because minor changes to a chromosome (such as the recoloring a single vertex) can lead to major changes to the way colors are labeled, making the propagation of useful solution substructures more difficult to achieve when applying traditional crossover operators.

2.1.2 Partition-Based Operators

Given the proposed issues with the assignment-based approach, the last 15 years or so have also seen a number of articles presenting recombination operators focussed on the partition (or grouping) interpretation of graph coloring. The philosophy behind this approach is that it is actually the color classes (and the vertices that are assigned to them) that represent the underlying building blocks of the graph coloring problem. In other words, it is not the color of individual vertices per se, but the way in which vertices are grouped that form the meaningful substructures. Consequently, the focus should be on the design of operators that are successfully able to combine and promote these within a population.

Perhaps the first major work in this area was due to Falkenauer [48] in 1994 (and later [41]) who argued in favor of the partition interpretation in the justification of his grouping genetic algorithm (GlossaryTerm

GGA

) – an GlossaryTerm

EA

methodology specifically designed for use with partitioning problems. Falkenauer applied this GlossaryTerm

GGA

to two important operational research problems: the bin-packing problem and bin-balancing problem, with strong results being reported. In subsequent work, Erben [20] also tailored the GlossaryTerm

GGA

for graph coloring. Erben’s approach operates in the space of feasible colorings and allows the number of colors in a solution to vary. Solutions are then stored as partitions, and evaluated using (63.1). In this approach, recombination operates by taking two parent solutions and randomly selecting a subset of color

classes from the second. These color classes are then copied into the first parent, and all color classes coming from the first parent containing duplicate vertices are deleted. This operation results in an offspring solution that is proper, but most likely partial. Thus uncolored vertices are then reinserted into the solution, in this case using the first-fit algorithm. A number of other recombination operators for use in the space of feasible solutions have also been suggested by Mumford [19]. These operate on permutations of vertices, which are again decoded into solutions using the first-fit algorithm.

Another recombination operator that focusses on the partition interpretation of graph coloring is due to Galinier and Hao, who in 1999 proposed an GlossaryTerm

EA

that, at the date of writing, is still understood to be one of the best performing algorithms for graph coloring [33, 38, 49, 50]. Using a fixed number of colors k, Galinier and Hao’s method operates in the space of complete (proper and improper) k-colorings using cost function f2 (63.2). A population of candidate solutions is then evolved using local search (based on tabu search) together with a specialized recombination operator called greedy partition crossover (GlossaryTerm

GPX

). The latter is used as a global operator and is intended to guide the search over the long term, gently directing it towards favorable regions of the search space (exploration), while the local search element is used to identify high quality solutions within these regions (exploitation).

The idea behind GlossaryTerm

GPX

is to construct offspring using large color classes inherited from the parent solutions. A demonstration of how this is done is given in Fig. 63.3. As is shown, the largest (not necessarily proper) color class in the parents is first selected and copied into the offspring. Then, in order to avoid duplicate vertices occurring in the offspring at a later stage, these copied vertices are removed from both parents. To form the next color, the other (modified) parent is then considered and, again, the largest color class is selected and copied into the offspring, before again removing these vertices from both parents. This process is continued by alternating between the parents until the offspring’s k color classes have been formed. At this point, each color class in the offspring will be a subset of a color class existing in one or both of the parents. That is

U i U c U j ( U 1 U 2 ) : U i U j ,
(63.5)

where U c , U 1 , and U 2 represent the offspring, and parents 1 and 2, respectively.

Fig. 63.3
figure 3figure 3

Demonstration of the GPX operator using k = 3

One feature of the GlossaryTerm

GPX

operator is that on production of an offspring’s k color classes, some vertices may be missing (this occurs with vertex v9 in Fig. 63.3). Galinier and Hao [33] suggest assigning these uncolored vertices to random classes, which of course could introduce further clashes. This element of the procedure might, therefore, be viewed as a type of perturbation (mutation) operator in which the number of random assignments (the size of the perturbation) is determined by the construction stages of GlossaryTerm

GPX

. However, Glass and Prugel-Bennett [49] observe that GPX’s strategy of inheriting the largest available color class at each step (as opposed to a random color class) generally reduces the number of uncolored vertices. This means that the amount of information inherited directly from the parents is increased, reducing the potential for disruption. Once a complete offspring is formed, it is then modified and improved via a local search procedure before being inserted into the population.

Since the proposal of GlossaryTerm

GPX

by Galinier and Hao [33], further recombination schemes based on this method have also been suggested, differing primarily in the criteria used for selecting the color classes that are inherited by the offspring. and Hao [34], for example, extended the GlossaryTerm

GPX

operator to allow more than two parents to play a part in producing a single offspring (Sect. 63.5). On the other hand, Porumbel etal [35] suggest that instead of choosing the largest available color class at each stage of construction, classes with the least number of clashes should be prioritized, with class size (and information regarding the degrees of the vertices) then being used to break ties. Malaguti etal [38] also use a modified version of GlossaryTerm

GPX

with an GlossaryTerm

EA

that navigates the space of partial, proper solutions. In all of these cases the authors combined their recombination operators with a local search procedure in the same manner as Galinier and Hao [33] and, with the problem instances considered, the reported results are generally claimed to be competitive with the state of the art.

2.1.3 Assessing the Effectiveness of EAs for Graph Coloring

In recent work carried out by the author of this chapter [50], a comparison of six different graph coloring algorithms was presented. This study was quite broad and used over 5000 different problem instances. Its conclusions were also rather complex, with each method outperforming all others on at least one class of problems. However, a salient observation was that the GlossaryTerm

GPX

-based GlossaryTerm

EA

of Galinier and Hao [33] was by far the most consistent and high-performing algorithm across the comparison.

In the remainder of this chapter we pursue this matter further, particularly focussing on the role that GlossaryTerm

GPX

plays in this performance. Under a common GlossaryTerm

EA

framework, described in Sect. 63.3, we first evaluate the performance of GlossaryTerm

GPX

by comparing it to two other recombination operators (Sect. 63.4). Using information gained from these experiments, Sect. 63.5 then looks at how the performance of the GlossaryTerm

GPX

-based GlossaryTerm

EA

might be enhanced, particularly by looking at ways in which population diversity might be prolonged during a run. Finally, conclusions and a further discussion surrounding the virtues of recombination in this problem domain are presented in Sect. 63.6.

3 Setup

The GlossaryTerm

EA

used in the following experiments operates in the same manner as Galinier and Hao’s [33]. To form an initial population, a modified version of the Dsatur algorithm is used. Specifically, each individual is formed by taking the vertices in turn according to the Dsatur heuristic and then assigning it to the lowest indexed color i { 1 , , k } where no clash occurs. Vertices for which no clash-free color exists are assigned to random colors at the end of this process. Ties in the Dsatur heuristic are broken randomly, providing diversity in the initial population. Each individual is then improved by the local search routine.

The GlossaryTerm

EA

evolves the population using recombination, local search, and replacement pressure. In each iteration two parent solutions are selected at random, and the selected recombination operator is used to produce one offspring. This offspring is then improved via local search and inserted into the population by replacing the weaker of its two parents.

The local search element of this GlossaryTerm

EA

makes use of tabu search – specifically the TabuCol algorithm of Hertz and de Werra [24], run for a fixed number of iterations. In this method, moves in the search space are achieved by selecting a vertex v whose assignment to color i is currently causing a clash, and moving it to a new color j i . The inverse of this move is then marked as tabu for the next t steps of the algorithm (meaning that v cannot be re-assigned to color i until at least t further moves have been performed). In each iteration, the complete neighborhood is considered, and the non-tabu move that is seen to invoke the largest decrease in cost (or failing that, the smallest increase) is performed. Ties are broken randomly, and tabu moves are also carried out if they are seen to improve on the best solution observed so far in the process. The tabu search routine terminates when the iteration limit is reached (at which case the best solution found during the process is taken), or when a zero cost solution is achieved. Further descriptions of this method, including implementation details, can be found in [51].

In terms of parameter settings, in all cases we use a population size of 20 (as in [34, 35]) and set the tabu search iteration limit to 16 | V | , which approximates the settings used in the best reported runs in [33]. As with other algorithms that use this local search technique [29, 33, 37], the tabu tenure t is made proportional to the current solution cost: specifically, t = 0.6 f 2 + r , where r is an integer uniformly selected from the range 09 inclusive.

Finally, because this algorithm operates in the space of complete k-colorings (proper and improper), values for k must be specified. In our case, initial values are determined by executing Dsatur on each instance and setting k to the number of colors used in the resultant solution. During runs, k is then decremented by 1 as soon as a feasible k-coloring is found, and the algorithm is restarted. Computational effort is measured by counting the number of constraint checks carried out by the algorithm, which occur when the algorithm requests information about a problem instance, including checking whether two vertices are adjacent (by accessing an adjacency list or matrix), and referencing the degree of a vertex. In all trials a cut-off point of 5 × 10 11 checks is imposed, which is roughly double the length of the longest run performed in [33]. In our case, this led to run times of   1 h on our machines (algorithms were coded in C++ and executed on a PC under Windows XP using a  3.0 GHz processor with 3.18 GB of GlossaryTerm

RAM

).

3.1 Problem Instances

For our trials a set of five problem instances is considered. Though this set is quite small, its members should be considered as case studies that have been deliberately chosen to cover a wide range of graph structure – a factor that we have found to be very important in influencing the relative performance of graph coloring algorithms [50]. The first three graphs are generated using the publicly available software of Culberson [52], while the remaining two are taken from a collection of real-world timetabling problems compiled by Carter etal [53]. Names and descriptions of these graphs now follow. Further details are also given in Table 63.1:

  1. #1:

    Random. This graph features | V | = 1000 and is generated such that each of the | V | 2 pairs of vertices is linked by an edge with probability 0.5. Graphs of this nature are nearly always considered in comparisons of coloring algorithms.

  2. #2:

    Flat(10). Flat graphs are generated by partitioning the vertices into K equi-sized groups and then adding edges between vertices in different groups with probability p. This is done such that the variance in vertex degrees is kept to a minimum. It is well known that feasible K-colored solutions to such graphs are generally easy to achieve except in cases where p is within a specific range of values, which results in problems that are notoriously difficult. Such ranges are commonly termed phase transition regions [54]. This particular instance is generated so that it features a relatively small number of large color classes (using V = 500 and K = 10, implying  50 vertices per color). A value of p = 0.115 is used, which has been observed to provide very difficult instances for a range of different graph coloring algorithms [50].

  3. #3

    Flat(100). This graph is generated in the same manner as the previous one, using | V | = 500 , K = 100 , and p = 0.85. Solutions thus feature a relatively large number of small color classes ( 5 vertices per color).

  4. #4:

    TT(A). This graph is named car_s_91 in the original dataset of Carter etal [53]. It is chosen because it is quite large and, unlike the previous three graphs, the variance in vertex degrees is quite high. This problem’s structure is also much less regular than the previous three graphs, which are generated in a fairly regimented manner.

  5. #5:

    TT(B). This graph, originally named pur_s_93, is the largest problem in Carter’s dataset, with | V | = 2419 . It is also quite sparse compared to the previous graph, though it still features a high variance in vertex degrees (Table 63.1).

The rightmost column of Table 63.1 also gives information on the best solutions known for each graph. These values were determined via extended runs of our algorithms, or due to information provided by the problem generator.

Table 63.1 Details of the five problem instances used in our analysis

4 Experiment 1

Our first set of experiments looks at the performance of GlossaryTerm

GPX

by comparing it to two additional recombination operators. To gauge the advantages of using a global operator (recombination in this case), we also consider the performance of TabuCol on its own, which iterates on a single solution until the run cut-off point is met.

Our first additional recombination operator follows the assignment-based scheme discussed in Sect. 63.2.1 and, in each application, utilizes the procedure of Coll etal [42] (Fig. 63.2) to relabel the second parent. Offspring are then formed using the classical n-point crossover, with each gene being inherited from either parent with probability 0.5.

Our second recombination operator is based on the grouping genetic algorithm (GlossaryTerm

GGA

) methodology (Sect. 63.2.1), adapted for use in the space of k-colorings. An example is given in Fig. 63.4. Given two parents, the color classes in the second parent are first relabeled using Coll etal’s procedure. Using the partition-based representations of these solutions, a subset of colors in parent 2 is then chosen randomly, and these replace the corresponding colors in a copy of parent 1. Duplicate vertices are then removed from color classes originating from parent 1 and uncolored vertices are assigned to random color classes. Note that like GlossaryTerm

GPX

, before uncolored vertices are assigned, the property defined by (63.5) is satisfied by this operator; however, unlike GlossaryTerm

GPX

there is no requirement to inherit larger color classes or to inherit half of its color classes from each parent.

Fig. 63.4
figure 4figure 4

Demonstration of the GGA recombination operator. Here, color classes in parent 2 are labeled to maximally match those of parent 1

A summary of the results achieved by the three recombination operators (together with TabuCol) is given in Table 63.2. For each instance the same set of 20 initial populations was used with the GlossaryTerm

EA

s, and entries in bold signify samples that are significantly different to the non-bold GlossaryTerm

EA

entries according to a Wilcoxon signed-rank test at the 0.01 significance level. For graph #1 we see that GlossaryTerm

GPX

has clearly produced the best results – indeed, even its worst result features two fewer colors than the next best solution. However, for graphs #2 and #5, no significant difference between the GlossaryTerm

EA

s is observed, while for #3 and #4, better results are produced by the GlossaryTerm

GGA

and the n-point crossover.

Figure 63.5 shows run profiles for two example graphs. We see that in both cases TabuCol provides the fastest rates of improvement, though it is eventually overtaken by at least one of the GlossaryTerm

EA

s. Table 63.2, however, also reveals that TabuCol performs very poorly with graphs #4 and #5. This seems due to the high degree variance in these cases, which we observe makes the cost of neighboring solutions in the search space vary more widely. This suggests a more spiky cost landscape in which the use of local search in isolation exhibits a susceptibility for becoming trapped at local optima (see also [50]).

Fig. 63.5 a,b
figure 5figure 5

Run profiles for the instances (mean of 20 runs): (a) #1 (random). (b) #3 (Flat 100)

An important factor behind the differing performances of these GlossaryTerm

EA

s is the effect that recombination has on the population diversity. To examine this, we first define a metric for measuring the distance between two solutions: Given a solution U, let P U = { { u , v } : c ( u ) = c ( v ) } , for u , v V , u v . The distance between two solutions U 1 and U 2 can then be defined,

D ( U 1 , U 2 ) = | P U 1 P U 2 | - | P U 1 P U 2 | | P U 1 P U 2 | .
(63.6)

This measure gives the proportion of vertex pairings (assigned to the

Table 63.2 Number of colors in the best feasible solution achieved at the cut-off point (mean (min; median; max) of 20 runs)

same color) that exist in just one of the two solutions. Consequently, if  U 1 and  U 2 are identical, then P U 1 P U 2 = P U 1 P U 2 , giving D ( U 1 , U 2 ) = 0 . Conversely, if no vertex pair is assigned the same color, P U 1 P U 2 = , implying D ( U 1 , U 2 ) = 1 . Population diversity can also be defined as the mean distance between each pair of solutions in the population. That is, given a set of m individuals U = { U 1 , U 2 , , U m }

Diversity ( U ) = 1 m 2 U i , U j U : i < j D ( U i , U j ) .
(63.7)

Considering our results, the two scatter plots of Fig. 63.6 demonstrate the positive correlation that exists between parental distance and the number of uncolored vertices that result in applications of the GlossaryTerm

GPX

and GlossaryTerm

GGA

operators. This data was derived from graph #4, though similar patterns were observed for the other instances. Note that the correlation is weaker for GlossaryTerm

GGA

due to two reasons. First, unlike GlossaryTerm

GPX

, which requires half of the color classes to be inherited from each parent, with GlossaryTerm

GGA

this proportion can vary. Thus if the majority of color classes are inherited from just one parent, it is possible to have two very different parents, but only a small number of uncolored vertices. Second, as mentioned earlier GlossaryTerm

GGA

shows no bias towards inheriting larger color classes, meaning that the number of uncolored vertices can also be higher than GlossaryTerm

GPX

, particularly when inheriting around half of the color classes from each parent. An effect of these patterns is shown in the lower graphs of Fig. 63.6, where throughout the evolutionary process, the number of uncolored vertices occurring during recombination is fewer and less varied with GlossaryTerm

GPX

. In comparison to GlossaryTerm

GGA

, this behavior leads to a more rapid loss of diversity, as is demonstrated in Fig. 63.7 for two example graphs.

Fig. 63.6 a–d
figure 6figure 6

Relationship between parental distance and number of uncolored vertices with the GPX (a) and GGA (b) operators. Also shown is the number of uncolored vertices in the first 10000 applications of GPX (c) and GGA (d)

Fig. 63.7 a,b
figure 7figure 7

Population diversity during the first 10000 recombinations with (a) the random (#1) and (b) TT(A) (#4) instances

Whether sustained diversity is a help or hindrance with these GlossaryTerm

EA

s thus seems to depend on the type of graph being tackled. As can be seen in Fig. 63.7, for graph #1 GlossaryTerm

GPX

is the only recombination operator that leads to any sort of population convergence, and it is also the algorithm that produces the best solutions given sufficient time, suggesting that is suitably homing in on high-quality regions of the search space. On the other hand, for graphs #3 and #4, GGA’s more sustained diversity (caused and perpetuated by the greater number of uncolored vertices that occur during recombination) causes the operator to be more disruptive. However, in these cases this factor also seems to provide a useful diversification mechanism, allowing the algorithm to sample wider areas of the search space, leading to better results. An extreme case of diversity loss occurs with graph #5, which we recall has a low density and high degree variance. In this case, when using GlossaryTerm

GPX

large color classes of low-degree vertices that are formed in early stages of the algorithm quickly come to dominate the population limiting the exploration that then takes place – indeed, in many runs the algorithm was actually unable to improve on costs achieved in the initial population.

Figure 63.7 also shows that n-point crossover tends to maintain diversity for longer periods than GlossaryTerm

GPX

in this case, allowing it to produce superior results for graphs #3 and #4. However, the sustained diversity is not due to uncolored vertices (which do not occur with this operator); rather, it seems due to the naturally occurring disruption that results from the color labeling issues mentioned in Sect. 63.2.1.

Finally, we also mention that during our runs with these EA’s, the local search element was observed to be by far the most expensive part of the algorithm, with none of the recombination operators consuming more than 1.8 % of the available run time.

5 Experiment 2

In this section we now consider ways in which the results of the GlossaryTerm

GPX

operator might be improved, particularly looking at how we might encourage diversity to be sustained in the population.

As mentioned in Sect. 63.2.1, and Hao [34] previously proposed extending the GlossaryTerm

GPX

operator to allow offspring to be produced using m 2 parents. In this operator, which we call MultiX, offspring are constructed in the same manner as GlossaryTerm

GPX

, except that at each stage the largest color class from multiple parents is chosen to be copied into the offspring. The intention behind this increased choice is that larger color classes will be identified, resulting in fewer uncolored vertices once the k color classes have been constructed. In order to prohibit too many colors being inherited from one particular parent, Lü and Hao also make use of a parameter q, specifying that if the i-th color class in an offspring is copied from a particular parent, then this parent should not be considered for further q colors. In our application of MultiX we follow the recommendations of the Lü and Hao, choosing m randomly from the set { 2 , , 6 } in each application and using q = m / 2 . Note also that GlossaryTerm

GPX

is simply an application of MultiX using m = 2 and q = 1.

Though having the potential to produce good results [34], an issue with MultiX is that it could result in diversity being lost even more rapidly than with GlossaryTerm

GPX

, particularly if fewer vertices need to be randomly recolored at the end of each application. In [34], and Hao attempt to deal with this using a mechanism whereby offspring are only inserted into the population if they are seen to be sufficiently different or better than existing members. However, in our case, we suggest two alternative methods.

The first of these involves altering the MultiX operator so that it works exclusively with proper colorings. As noted, GlossaryTerm

GPX

and MultiX currently operate on colorings in which clashes are permitted; however, this could in theory result in large color classes that feature many clashes being unduly promoted in the population, when perhaps the real emphasis should be on the promotion of large color classes that are independent sets. The ISets approach thus operates by first iteratively removing clashing vertices from each parent (in a random order, until proper colorings are achieved), and then using the MultiX operator to produce an offspring as before. This implies that, before recoloring missing vertices, offspring will also be proper, since subsets of independent sets are themselves independent sets. A further effect is that a greater number of vertices might need to be recolored, since vertices originally removed from the parents could also be missing in the resultant offspring.

Our second proposal for prolonging diversity is to make changes directly to an offspring to try to increase its distance from its parents before reinsertion into the population. One way of doing this would be to increase the iteration limit of the local search procedure, as demonstrated by Galinier and Hao [33]. However, we find that such an approach can slow the algorithm unnecessarily, particularly because as the procedure progresses, movements in the search space (due to improving or sideways moves) become less frequent. An alternative in this case is to exploit the structure of the graph coloring problem via the use of a Kempe chain interchange operator. Kempe chains define connected sub-graphs that involve exactly two colors, and can be generated by taking an arbitrary vertex v and color i, such that c ( v ) i . An example is given in Fig. 63.8. Note that when interchanging the colors of vertices in a Kempe chain, if the original coloring is proper, then so is the new coloring. Thus we have the opportunity to quickly alter colorings without compromising their quality.

Fig. 63.8
figure 8figure 8

Example Kempe chain involving, e. g., vertex v7 and color 4 (left), and the resultant coloring due to a color interchange (right)

Our Kempe approach operates in the same manner as ISets, except that before reassigning uncolored vertices, a series of randomly selected Kempe chain interchanges are performed on the existing proper coloring. In our case, 2 k such moves are applied.

The results achieved by our three modifications are summarized in Table 63.3, where bold entries signify samples that are significantly different to GlossaryTerm

GPX

at significance level 0.01. We see that improvements over GlossaryTerm

GPX

were only obtained on graph #1, where all three variants were successful, and graph #4 using the Kempe variant. In practice, we found that MultiX causes diversity to be lost more quickly than GlossaryTerm

GPX

with these graphs – however, the ISets mechanism did not seem to alter this behavior a great deal, usually because the number of clashing vertices needing to be removed was quite small (less than 10).

Table 63.3 Number of colors in the best feasible coloring achieved at the cut-off point (mean (min; median; max) from 20 runs)

Surprisingly, we also found that the Kempe variant was only able to maintain higher levels of diversity with instances #4 and #5. For graphs #1, #2, and #3, it turns out that when using a suitably low number of colors k, the bipartite graphs induced by most pairs of color classes in a solution are connected. In these cases, all of the vertices belonging to the two color classes are included in the Kempe chain, meaning that a color interchange does not alter the structure of the solution, but merely produces a relabeling of the two color classes. (An example of such a Kempe chain would occur in Fig. 63.8 using vertex v3 and color 2.) This is not the case for the less structured graphs #4 and #5, where we found that diversity could be maintained for longer periods. However, this only led to significant improvements in the results for graph #4, whose run profiles are shown in Fig. 63.9 . Also note that these enhanced results still fail to beat those of the GlossaryTerm

GGA

and n-point operators, as shown in Table 63.2.

Fig. 63.9 
figure 9figure 9

(a) Run profile for TT(A) (graph #4, left), and (b) its diversity over the first 10000 recombinations

6 Conclusions and Discussion

In this chapter we have examined the relative performance of a number of different graph coloring recombination operators. Using a common evolutionary framework, we have seen that this performance varies, particularly due to the underlying structures of the graphs being tackled.

A desirable property of recombination is that it should be able to combine meaningful substructures of existing candidate solutions (parents) in the production of new, hopefully fitter, offspring. However, does that process actually occur with any of these operators? Or, by involving the random reassignment of some vertices, do the operators simply provide a mechanism by which large random perturbations are periodically applied to a solution, helping to re-invigorate the search process?

Again, the answer to such a question seems to depend on the problem instance at hand. In Table 63.4 we compare the costs of solutions achieved by the best available recombination operator for each instance, together with those produced by a corresponding random perturbation operator. Specifically, for each graph we identified the best run from the EA’s sample of 20 and recorded the number of uncolored vertices that resulted in each application of recombination. We then used these figures, together with the same k-value, to specify the number of vertices that would be randomly selected and reassigned in each corresponding application of our random perturbation operator. In each iteration this algorithm then operated by selecting two parents, making a copy of parent 1, randomly perturbing this copy, applying local search, and finally replacing the weaker of the two parents.

Table 63.4 Comparison of the best EA and corresponding random perturbation operator. (Cost of best solutions using f2 (63.2); (mean, (min; median; max) from 20 runs), and proportion of runs where f 2 = 0 (feasibility) was achieved)

The results in Table 63.4 indicate that, for graph #1, recombination is clearly doing more than just randomly perturbing solutions since all runs have resulted in feasible 85-colorings. However, although recombination has achieved significantly lower costs with graph #2, the proportion of runs where feasibility has been achieved shows no significant difference for any of the graphs #2 to #5 (according to McNemar’s test at significance level 0.01). We find this observation compelling as it might suggest that better results might ultimately be achieved using schemes that make more informed decisions about the size and frequency of perturbations. Indeed, currently the size of random perturbations tends to fall as the run progresses (Fig. 63.6); however, it may be useful to allow this trend to be reversed, particularly if improvements are not achieved for a lengthy period of time. In addition, the way in which vertices are chosen for random reassignment might also influence performance – for example, we might target those belonging to a specific color, those that are causing clashes, those that have been assigned to a particular color for the longest, and so on. This requires further research.

An interesting point regarding the structure of solutions was raised previously by Porumbel etal [35], who considered the sizes of the color classes. Specifically, they propose that when solutions involve a small number of large color classes (such as graph #2 in our case), good quality colorings tend to result through the identification of large independent sets. On the other hand, if a solution involves many small color classes, quality is determined more by the productive interaction between classes. In other words, the proposal is that small independent sets in isolation do not constitute good features in these cases; rather, quality results from appropriate combinations of these sets. Such an observation might provide evidence as to why the GlossaryTerm

GGA

recombination has outperformed GlossaryTerm

GPX

with graph #3 because, unlike GlossaryTerm

GPX

, it does not require half of the color classes to be inherited from each parent, thus potentially allowing more class-combinations to be considered. However, this argument is countered by the fact that, according to Table 63.4, GlossaryTerm

GGA

has not outperformed the random perturbation operator, suggesting that it is actually this mechanism that influences the search. Clearly, further research in this area is also required.

Given such observations, another important avenue of future research will be to increase our understanding of the links between a graph’s structure and the best algorithms that can then be used to color it. This might, for example, be derived by increasing our understanding of the behavior, strengths, and weaknesses of the various algorithmic operators available for graph coloring, and also via more empirical means such as data mining, as discussed by Smith-Miles and Lopes [55].