0% found this document useful (0 votes)
24 views

A Generalized Implicit Graph Enumeration Algorithm For Graph Coloring 1982

This document summarizes a generalized implicit graph coloring algorithm. The algorithm uses backtracking to sequentially color graph vertices with the minimum number of colors while ensuring no adjacent vertices have the same color. It performs forward and backward steps: the forward step colors vertices until one cannot be colored, then the backward step searches for a previous vertex that can be recolored to allow coloring to resume forward. The algorithm terminates when a coloring uses the minimum number of colors or a backward step reaches the first vertex. The document outlines the algorithm framework and corrections made to previous incomplete algorithms.

Uploaded by

Oscar Meza
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views

A Generalized Implicit Graph Enumeration Algorithm For Graph Coloring 1982

This document summarizes a generalized implicit graph coloring algorithm. The algorithm uses backtracking to sequentially color graph vertices with the minimum number of colors while ensuring no adjacent vertices have the same color. It performs forward and backward steps: the forward step colors vertices until one cannot be colored, then the backward step searches for a previous vertex that can be recolored to allow coloring to resume forward. The algorithm terminates when a coloring uses the minimum number of colors or a backward step reaches the first vertex. The document outlines the algorithm framework and corrections made to previous incomplete algorithms.

Uploaded by

Oscar Meza
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

RESEARCHCONTRll3UTIONS

Programming
Techniques and
Data Structures
A Generalized Implicit
Ellis Horowitz
Editor

Graph Coloring

MAREK KUBALE and BOGUSLAW JACKOWSKI

ABSTRACT: A generalized algorithm for graph coloring by simple backtracking rule. Suppose that the vertices of
implicit enumeration is formulated. A number of graph G have been ordered in some way and are rein-
backtrackingsequential methodsare discussedin terms of dexed so that vi is the ith vertex in this ordering. Then,
the generalized algorithm. Someare revealed to be partially two steps: fotward and backward, are performed alter-
correct and inexact. A few corrections to the invalid nately. The forward step colors the vertices sequen-
algorithms, which cause these algorithms to guarantee tially up to a vertex which cannot be colored because
optimal solutions, are proposed.Finally, somecomputational of a lack of colors available to it. The backward step
results and remarkson the practical relevance of improved moves sequentially back in search of the first vertex
implicit enumeration algorithms are given. which can be colored with another feasible color and
then the forward step is resumed, etc. If a new, better
1. INTRODUCTION coloring of G has been found, the algorithm attempts to
It is well known that the problem of coloring the ver- find the next one. The activity terminates when a back-
tices of a graph with a minimum number of colors so track reaches VI.
that no adjacent vertices are the same color is probably The forward step of Brown’s original algorithm can
intractable. Not only is the general problem NP-com- be improved either by using a look-ahead procedure [2]
plete, but even a drastically simplified problem of de- or by reordering yet uncolored vertices [6]. On the
termining the 6-colorability of a a-regular planar graph other hand, the backward step turns out to be much
remains NP-complete [4, i’]. Also, the problem of deter- harder to refine. Chriatofides [3] was the first to at-
mining the chromatic number of an arbitrary graph tempt to improve on the backward step. Unintention-
within a worst-case ratio of less than z has been shown ally, he obtained an algorithm which does not always
to be NP-complete [6]. That is why no polynomial time find a chromatic coloration and which, moreover, fails
algorithm for exact graph coloring is likely to exist. to terminate properly on some graphs. Brelaz [l], who
In general, there are three tree search strategies to made a few errors and also arrived at a partially correct
solve this classical combinatorial problem: maximal in- approximation algorithm, was the next to improve
dependent sets, dichotomous search, and implicit enu- Brown’s coloring algorithm. A simple counterexample
meration. The most flexible and space efficient of these to both algorithms is shown in Figure 1. Brelaz’s modi-
is the implicit enumeration (backtracking)approach. The fication was corrected independently by Kubale and
first coloring algorithm of this type is due to Brown [Z]. Kusz [lo] and Peemoller [ll]. (Peemoller’s correction
The main idea of his method is based on the following seems to be closer to Brilaz’s intention.)
This article is motivated by the above-mentioned er-
0 1985 ACM oool-0782/85/0400-0412 750 rors. We begin by presenting, in the next section, a

412 Communications of the ACM April 1985 Volume 28 Number 4


ResearchContributions

concept of a generalized (frame) implicit enumeration Vl VS


algorithm for graph coloring. In Section 3 we give a
survey of various instances of the general algorithm
and discuss its correctness and efficiency. Among them
we formulate corrections for Christofides’ and Br6laz’s
concepts in terms of the general algorithm. It should be
noted that although both algorithms presented in the
article differ from the originals, we use the appelations 1,
“Christofides’ algorithm” and “Br6laz’s algorithm.” Nev- v2 6
ertheless, the main ideas remain unchanged and, there- FIGURE1. A Counterexample
to the Christofidesand Brelaz
fore, such terminology seems fair to the originators. In Algorithms
Section 4 we give computational results obtained by
applying implicit enumeration algorithms to coloring an
identical series of graphs generated at random. We con- Here is a control abstraction for the general implicit
clude, in Section 5, with some remarks on the practical algorithm written in SPARKS language [8].
relevance of the improved graph coloring algorithms.
procedure IMPLICIT-ENUMERATION (G, n)
// G is any n-vertex graph given implicitly. C(l), //
2. A GENERALIZED IMPLICIT C(n) are used to retain colors assigned to //
ENUMERATION ALGORITHM :: vertices
...I. in the best solution found so far. C’(l), //
In principle, the generalized algorithm is based on C’(n) comprise a current coloring (partial //
Brown’s original approach. Both basic steps, however, :: or ...’ complete). //
are more sophisticated and require an additional de- integer n, r, ub, lower-bound, upper-bound, C(1: n),
scription. As we know, the forward step colors the ver- C’(l:n)
tices sequentially within a prescribed number of colors set CP, FC(1:n)
up to a vertex which cannot be colored because of a initialize lower-bound, upper-bound and vertex
lack of feasible colors. Such a vertex is referred to as a order
resumption point for the backward step. More precisely, CP+Qr+l
procedure FORWARDS successively associates the sets ub c upper-bound + 1
of feasible colors (FC) with the vertices v,, v,+l, . . . , and // to get at least one //
colors each of them with the first member of the re- // complete coloring //
spective set. Roughly, the invariant for this procedure loop
is: “Graph G can be colored with ub colors and the call FORWARDS (r)
vertices zll, . . . , v,-] are colored with colors less than if ub = lower-bound then exit endif
ub” where ub is an upper bound on the chromatic num- call BACKWARDS (r)
ber x(G). This step terminates when either a vertex if r = 0 then exit endif
with the empty set of feasible colors has been encoun- repeat
tered or all the vertices have been colored. The latter print(‘The chromatic number =‘, ub, ‘coloring:‘, C)
means that a new complete coloring with less than ub end IMPLICIT-ENUMERATION
colors has been found and the upper bound can be
Both basic procedures are described in the following
diminished. Eventually, the value of variable r is
form.
changed to keep the following invariant for procedure
BACKWARDS: “Graph G can be colored with ub colors, procedure FORWARDS (r)
the vertices ~1, . . . , ~~-1can be colored with colors less global integer n, ub, C(1: n), C’(1 : n); global set FC(l: n)
than ub whereas v? cannot be colored with a color less integer i, r
than ub.” Procedure BACKWARDS searches for the for i’c r to n do
highest numbered vertex among ~1, . . . , ~~-1,say vi, rearrange Vi, . . . , v.
the recoloring of which might have an influence on the // only if dynamic //
coloring of v*, v,+l, . . . . The vertices which are not // reordering is applied //
omitted by the checking process are called current pred- determine FC(i) // for r = 1 or r < i //
ecessors (CP) of vr. If such a vertex vi is encountered, the if FC(i) = 0 then r c i; return endif
FC(i) set is decreased by Vi’s actual color to prevent it C’(i) c min(FC(i))
from obtaining the same partial coloring. (The vertex is // color vi with smallest //
referred to as a resumption point for the forward step.) // feasible color //
Finally, the assignment r c i is performed to keep the repeat
invariant for the FORWARDS procedure, which ensues // a new complete coloring has been found //
immediately. Otherwise, BACKWARDS is exited with C c C’ // store the current coloring //
r = 0. The algorithm terminates when either ub equals ub c max(C) // update the upper bound on x(G] //
a lower bound on the chromatic number or a backtrack r c least i such that C(i) = ub
fails to find a vertex that can be recolored. end FORWARDS

April 1985 Volume 28 Number 4 Communicationsof the ACM 413


Research Contributions

prdcedure BACKWARDS(r) vertex of G and remaining vertices are ordered by


global integer n, ub, C’(l:n); global set CP, FC(l:n) means of the following greedy principle: For every i =
integer i, r 2 9 . . . 9 n - 1, ‘ui is adjacent to more of the vertices zll,
determine initial CP . . . , Vi-1 than any other vertex Vi, i > i (ties are broken
while CP # 0 do by choosing the vertex of greater degree). The GLF or-
i t max(CP); CP c CP - (i] dering can be accomplished in time O(min(n’, m log n)).
update CP // only if dynamic computation // Default values for lower bound and upper bound are 1
// of CP is applied // and n, respectively.
FC(i) c FC(i) - (C’(i)) (ii) No rearrangement is performed.
if FC(i) # 0 then r c i; return endif (iii) Let PC(i) denote a set of prohibited colors for Vi,
repeat that is, PC(i) = (c c ub: there is an adjacent predecessor
r c 0 // none of current predecessors // of Vi colored with c). Then
// can be recolored //
end BACKWARDS FC(i) = (1, 2, . . . , maix C’(j) + 1) - PC(i) - (ub).

The correctness of the genleral algorithm cannot be To estimate the complexity of FORWARDS notice that
proved until the semantics of the statements initialize, determining of FC(i) requires deg(vi) operations. There-
deteimine, and update is gefined. This is a crucial point fore, one pass of FORWARDS takes at most O(m) time
of the algorithm, because by defining feasible colors, plus, eventually, O(n) time to store coloration C’ and
current predecessors, an d a mode of initialization one actualize variables ub and r when a better solution has
can obtain a wide range df coloring algorithms, both been found. Thus a total of O(m + n) time must be used.
exact and approximate. Hence, the general implicit al- (iv) The definition of CP is trivial, namely
gorithm should be regarded as a frame al orithm, any
instance of which requires a separate anap1ysis. Also, the CP = (1, 2, . , r - 11,
time complexity of the algorithm depends on a particu-
lar definition of the above-niisntioned notions. How- where r is a value of parameter carried in to the BACK-
ever, taking into account only explicit constraints on a WARDS procedure. Since no updating is necessary,
solution space, we see that the number of backtracks BACKWARDS requires constant effort for each i and
never exceeds n! regardless of the particular definitions O(n) time in all.
of the FC and CP sets. Thus the worst-case time for an
implicit enumeration algorithm $11 generally be Remarks. Brown’s ordinary algorithm finds the lexico-
O((f(n) + b(n))n!) where f(n) and b(n) are polynomials graphically first exact coloration with respect to the
determining the complexity of FORWARDS and BACK- GLF ordering of vertices in the following sense: Out of
WARDS, respectively.
two different complete solutions C = C(l), . . . , C(n) and
C’ = C’(l), . . . , C’(n), the coloring C is said to be prior to
3. A SURVEY OF CONCREITE REALIZATIONS
C’ under a given vertex order if either C(1) < C’(1) or
There are four basic algoiithms in the family of implicit
C(1) = C’(l), . . . , C(i - 1) = C’(i - 1) and C(i) < C’(i) for
enumeration methdds.
some i = 2, . . . , n.
1. Brown’s algorithm
2. Christofides’ algorithm 3.1.2 Brown’s Algorithm with Look-Ahead
3. Br6laz’s algorithm (i) Same as in Section 3.1.1.
4. Korman’s algorithm (ii) Same as in Section 3.1.1.
In this section we outline the main features of the (iii) Brown reduced the number of backtracks by in-
algorithms in their corrected form with a special refer- troducing the so-called look-ahead (LA) procedure to the
ence to the following: forward step. LA makes it possible to diminish the FC
(il initialization,- that is, stating bounds on the sets by enlarging the PC sets. The new definition of
chromatic number, initial ordering of vertices, prohibited colors is PC(i) = {c < ub: there is an adjacent
etc., predecessor of Vi colored with c or any of the adjacent
(ii) rearrangement of yet nncolored vertices, successors of vi can be colored only with c]. The im-
(iii) computation of the sets of feasible colors FC(i), proved FORWARDS procedure can still run in linear
(iv) computation of the set of current predecessors time O(m + n), but within a greater constant of propor-
CP. tionality.
(iv) Same as in Section 3.1.1.
3.1 Brown’s Two Algorithms [2]
Remarks. The concept of looking ahead can be refined
3.1.1 Brown’s Ordinary Algolrithm further by ordering feasible colors by the number of
(i) The vertices are preordered in a greedy largest preventions, that is, the number of adjacent successors
first (GLF) manner. Namely, vl is a maximum degree of Vi which could possibly be assigned color c unless c is

414 Communications of the ACM April 1985 Volume 28 Number 4


ResearchContributions

assigned to ZJ;.However, such a complex LA increases The SLF with interchange algorithm takes O(mn) time
the complexity of FORWARDS to the order of O(mn). and the Matula-Dsatur algorithm needs O(min(n2, m log
The backtracking algorithm with simple LA finds the n)) time. Each of the preconditioning algorithms ar-
first chromatic coloring [5] whereas the solution pro- ranges the vertex set so that initial vertices constitute
duced by the complex LA algorithm need not be the an initial clique (IC) of size at least 2 and the number of
lexicographically first one. colors used is usually close to minimum.
(ii) Same as in Section 3.1.
3.2 Corrected Christofides Algorithm [3] (iii) Same as in Section 3.1.
(i) No particular ordering is assumed; lower bound (iv) Br6laz also tried to reduce the CP set but he
and upper bound are determined as in Section 3.1. made two errors. Herein we give Peemoller’s correction
(ii) Same as in Section 3.1. to Brelaz’s dynamic updating of current predecessors.
(iii) Same as in Section 3.1. The set of adjacent predecessors of Vi, AP(i), is partitioned
(iv) In an effort to decrease the number of back- into nonempty sets AP,(I’), . . . , APb(i) such that AP,(I’) =
tracks, Christofides reduced the CP set too drastically (j < i: Vj is colored with cl, c < ub. Let r, = min AP,(i).
and obtained a partially correct approximation algo- Then the set of representatives for AP(i) is defined as
rithm. To correct his definition of CP we need a notion
of path passing throughout increasingly indexed ver- if AP(I’) = 0,
tices. Such a path is said to be monotonic. By the prede- R(i) = 1 {ra, . . . , rb) - IC otherwise.
cessor set of ui we mean P(i) = lj < i: there is a mono-
tonic path from Vj to vi in G). Now, the initial CP set is Now the initial set of current predecessors is
simply defined as
CP = CP U R(r).
CP = CP U P(r).
Updating of the set is accomplished in BACKWARDS as
No updating of the set is performed. follows:
The P(i) sets can be precomputed just after the initial
vertex order is stated. For this purpose one can use any CP = CP U R(i).
efficient method for finding the transitive closure of a
directed graph, for example, [12]. Hence BACKWARDS BACKWARDS can be implemented to run in O(m + n)
can be efficiently implemented in O(n) time. time.

Remarks. It is possible to incorporate looking ahead Remarks. As previously, the LA procedure can be in-
into the Christofides algorithm. This can be done by corporated into the algorithm. In this case additional
restricting FC (as in Section 3.1.2) and updating CP ac- updating takes the form
cording to the formula
CP = CP U jEyil R(j).
CP = CP U jEyilP(j) - ii, . . . , 4,
(In constructing (R(j) uncolored vertices are disre-
where B(i) is the set of all uncolored neighbors of zl; garded.) The Brelaz algorithm also finds the first exact
which could be assigned the only color c unless c is coloring in the lexicographic order sense.
assigned to Vi, It is convenient to construct the set B(i)
while searching for prohibited colors in FORWARDS. 3.4 Korman’s Dynamic Reordering Algorithm [9]
Since the partial solutions of level i are lexicographi- (i) Same as in Section 3.1.
tally ordered, the method finds the first exact coloring (ii) Korman noticed that during the forward step
(unless a refined version of LA is used). some vertices appear to have fewer feasible colors than
others and such vertices should be colored first. His
3.3 Corrected Brilaz Algorithm [l, 111 dynamic rearrangement (DR) rule states simply: From the
(i) The vertices are colored sequentially to obtain a set (Vi, . . , v,) of uncolored vertices choose a vertex
suitable ordering of the vertex set and both bounds on which can be colored with the smallest number of fea-
the chromatic number of G. Brblaz suggests preordering sible colors and replace it with Vi. The complexity of
the vertices by means of a sequential with interchange FORWARDS with dynamic rearrangement is dominated
algorithm applied to a saturation largest first (SLF) order- by the DR procedure which can run in time O(m + n),
ing or the Mutula-Dsatur algorithm (a combination of but at a cost of some increase of the complexity of
SLF and SL) as he calls it. The SLF algorithm, which is BACKWARDS.
a basis for both heuristics, repeatedly colors an unco- (iii) Same as in Section 3.1.
lored vertex of the largest saturation degree with the (iv) Same as in Section 3.1.
smallest possible color, where the saturation degree is
the number of adjacent distinctly colored vertices. Ties Remarks. The DR procedure plays a role similar to that
are broken by choosing the vertex of greater degree. of LA. However, empirical investigations show that, in

April 1985 Volume 28 Number 4 Communicationsof the ACM 415


Research Contributions

T'ABLEL ComputationalResultefromtheAppliitionoflmplicitEnumeration AlgortthmstoColor


HydomG~phs

Average tima in CPU seconds


n d Brown Christofides beta2 Konnan
8% 88L 88L LF 8L
10 0.1 .l .l .l .O .l
0.3 .1 .l .1 .1 .l
0.5 .l .l .l .l .l
0.7 .l .l .l .l .l
0.9 .l .l .l .l .l
20 0.1 .3 .3 .3 .l .2
0.3 A .4 A .2 .2
0.5 .4 .5 .4 .2 .3
0.7 .4 .5 .4 .2 .3
0.9 .4 .5 .5 .2 .3
30 0.1 :86 .7 5 .3 .5
0.3 .9 .6 .6
q.5 5.0 5.2 5.2 1.1 1.9
0.7 1.7 1.8 1.s: 1.8 2.0
b.9 1.1 1.2 1.1 .4 .6
40 0.1 1.2 1.4 1.2 .8 .9
0.3 4.4 4.2 4.0 6.9 3.7
0.5 13.5 12.6 9.5 10.1 5.5
0.7 45.6 45.2 21.5 5.7 9.1
- 0.9 2.2 2.5 2.1 6.9 1.4
50 0.1 1.7 2.0 2.1 1.0 1.3
9.3 >207.8 >207.5 >207.3 93.8 >150.0
0.5 m co >222.5 m
0.7 >259.7 >261.4 >25;.6 z-283.3 ~-224.6
- 0.9 20.1 60.4 11.1 1.1 2.2
60 ‘ 0.1 3.1 3.3 3.1 1.7 1.9
0.3 co F-244.9 B136.4 100.0 >189.6
0.5 co 03 00 m co
0.7
0.9 2197.6 >19;.7 >18:.3 10;.1 8i.l
01means that all graphs required more t+n five CPU minutes
> means that at bast & gra@ required more than five CPU minutes.

spite of the same complexity, the DR rule is much more 4. COMPUTATIONAL RESULTS
powerful than the simple LA. In order to compare a relative speed-up of various im-
Korman’s DR algorithms produces a chromatic colora- provements of Brown’s coloring algorithm on empirical
tion which is lexicographically first with respect to the grounds, the implicit algorithms were coded in Pascal
final vertex order, that is, the vertex order just after the and run on an R-32 computer (equivalent to an IBM
chromatic coloring had been found. 360/65). All the algorithms were programmed in the
A modification to the DR rule is also possible. For versions of the previous section except the corrected
instance, at restart after BACKWARDS coloring may be Brelaz algorithm which was implemented in the form
done according to the latest arrangement of vertices of [lo]. Since the efficiency of vertex sequential algo-
already colored or starting with the latest resumption rithms is highly dependent on the way the vertices are
point. In any case a particular definition of dynamic ordered, the following preparatory procedures arrang-
rearrangement affects only the efficiency of enumera- ing the vertices by their degree were implemented:
tion since any algorithm with a DR-like procedure largest first (LF), smallest last (SL), saturation LF (SLF),
leads to an exhaustive search regardless of the way and saturation SL (SSL). The saturation procedures tend
uncolored vertices are ordered. to use the largest unavoidable color as soon as possible.
It is also possible to incorporate Peemoller’s dynamic The LF ordering procedure ran in linear time while the
updating of the CP set into the! algorithm. others required at most O(n’) additional time. All pro-

416 Communications of the ACM April 1985 Volume 28 Number 4


Research Contributions

TABLEI. ComputationalResultsfromthe Appttttton of lmptttttEnumeraftonAtgortthmbto Cotor


RandomGraphs(Confktuad.)
Avemgsnumberof backtracks
n d Brown Christofiia Bmiaz Komdn
SSL SSL S9L LF SL
10 0.1 1 1 1 1 1
0.3 1 1 1 1 1
0.5 1 1 1 1 1
0.7 1 1 1 1 1
0.9 1 1 1 1 1
20 0.1 1 1 1 1 1
0.3 2 2 2 1 1
0.5 4 4 3 2 1
0.7 3 3 3 1 2
0.9 2 1 2 1 1
30 0.1 1 1 1 1 1
0.3 18 5 8 4 2
0.5 229 228 175 7 13
0.7 34 33 20 12 14
0.9 5 4 4 1 1
40 0.1 3 2 3 1 1
0.3 138 112 84 38 18
0.5 528 483 238 50 24
0.7 1379 1388 401 24 25
0.9 20 19 8 1 2
50 0.1 12 5 12 2 2
0.3 >5431 >7241 A898 328 >493
0.5 >5700 >8703 >5870 >751 >992
0.7 >8872 >8927 >5891 >943 >774
0.9 488 488 132 1 2
80 0.1 18 11 14 3 2
0.3 >7199 >8285 >4775 288 >520
0.5 >5751 >8911 >5872 z-838 >734
0.7 z-4425 >5585 s-3478 >714 >708
0.9 >4245 >4183 >2355 229 192
m means that all graphs required more than five CPU minutes
> means that at least one graph required more than five CPU minutes.

grams were executed on identical samples of pseudo- For more details on the extensive experimentally ob-
random graphs generated according to the constant served computing times comparing various backtrack-
density model with vertex number n = 10(10)80 and ing algorithms, see [lo].
graph density d = .1(.2).9. For each n and d three graphs
were generated. Each was colored by each program 5. CONCLUDING REMARKS
within a five minute limit of CPU time. Table I contains Results of the empirical investigations allow us to draw
the best computational results of the four orderings ob- the following conclusions.
tained for each program in question. Aside from aver- 1. Small graphs with II 4 30 can be colored effi-
age timing we give the average number of backtracks ciently by any backtracking algorithm preceded by any
required to color a graph since this parameter seems to vertex ordering procedure. Nevertheless, simple meth-
be a more objective measure of algorithmic complexity, ods, such as Brown’s with LF, are preferable.
especially if a program terminates before the deadline. 2. The effectiveness of this family of coloring algo-
In practice, graphs to be colored are usually sparse in rithms decreases as the density of the graphs increases,
the sense that the number of edges m is much less than except for very dense graphs.
n2/2. For this reason Figure 2 shows timing profiles of 3. The efficiency of implicit enumeration algorithms
the best and worst variants of the analyzed algorithms without dynamic reordering is highly dependent on the
plotted for graphs G with d = .l. initial arrangement of vertices. In this case the SSL

April 1985 Volume 28 Number 4 Communications of the ACM 417


Research Contributions

n(lime’) of vertices cannot be realized on a vertex degree princi-


ple any more. Consequently, the CP set may contain so
12 few vertices that a considerable improvement on the
d-0.1 /LF backward step is made possible. Again, the Christofides
and Brblaz-Peemdller algorithms seem to be well suited
10 for coloring such graphs. However, the best implicit
enumeration algorithm for graph coloring is presum-
ably Korman’s with Peemijller’s updating of current
a predecessors.

6 Acknowledgments. The authors wish to thank Eugen-


iusz Kusz for stimulating discussions on the subject of
this article.
4

/ - BROWN REFERENCES
2 - --- CHRISTOFIDES 1. Br&z, D. New methods to color the vertices of a graph. Commun.
- BRELAZ ACM 22,4 (Apr. 1979). 251-256.
1.w.........- KORMAN 2. Brown, R.J. Chromatic scheduling and the chromatic number prob-
lem. Manage. Sri. 19,4 (Dec. 1972). 451-463.
3. Christofides, N. Graph Theory. An Algorithmic Approach. Academic
10 io 30 40 5b 60 6 Press, London, 1975, pp. 70-71.
4. Dailey, D.P. Uniqueness of colorability and colorability of planar
l lime in CPU-milliseconds 4-regular graphs are NP-complete. Discrete Math. 30, (1980), 269-293.
5. Diirre, K. An algorithm for coloring the vertices of an arbitrary
FIGURE2. Timing Profiles from the Application of Backtracking graph. In Lecture Notes in Economicsand Mathematical Sysfems.Vol.
78. P. Deussen Ed., Springer-Verlag, Berlin, 1973, pp. 82-89.
Algorithms to Color Random Sparse Graphs 6. Garey, M.R.. and Johnson, D.S. The complexity of near-optimal
graph coloring. I. ACM 23, 1 (Jan. 1976), 43-49.
7. Garey. M.R.. Johnson, D.S.. and Stockmeyer, L. Some simplified NP-
complete graph problems. Theor. Comput. Sci. I, (1976). 237-267.
II. Horowitz. E.. and Sahni. S. Fundamentalsofcomputer Algorithms.
ordering performs best overall and saves more back- Computer Science, Potomac. Md.. 1978, pp. 614-621.
tracking than any improvement of the forward or back- 9. Korman, SM. The graph-colouring problem. In Combinatorial Opti-
mization. N. Christofides. A. Mingozzi, P. Toth, and C. Sandi. Eds.,
ward step. Wiley, New York, 1979. pp. 211-235.
4. Regarding the expectation of the time complexity, 10. Kubale. M.. and Kusz. E. Computational experience with implicit
the dynamic reordering of yet uncolored vertices estab- enumeration algorithms for graph coloring. In Proceedingsof the
WG’83 International Workshopon Graphtheoretic Conceptsin Computer
lishes a great improvement even if compared to the Science.M. Nag1 and J. Perl, Eds., Trauner Verlag. Linz, 1983, pp.
methods with LA. 167-176.
11. PeemGller, J. A correction to BrBlaz’s modification of Brown’s color-
5. If graphs to be colored (aresparse, then both the ing algorithm. Commun. ACM 26,8 (Aug. 1983), 595-597.
Christofides algorithm, applied to the vertices presorted 12. Schmitz, L. An improved transitive closure algorithm. Computing 30.
by SL, and Korman’s dynamic reordering, preceded by 4 (1983). 359-371.

LF, can be recommended.


6. If graphs to be colored are not sparse, Korman’s
CR Categories and Subject Descriptors: F.2.2 [Analysis of Algo-
algorithm is decidedly superior to the others. In partic- rithms and Problem Complexity]: Nonnumerical Algorithms and Prob-
ular, Korman’s algorithm with LF preordering runs lems; G.2.2 (Discrete Mathematics]: Graph Theory-graph algorithms:
12.8 [Artificial Intelligence]: Problem Solving, Control Methods and
faster on middle-density gra;phs whereas the method Search-backtracking, graph and tree search strategies
with SL is preferable for dense inputs. General Terms: Algorithms
Finally, we recall that our testing was carried out on Additional Key Words and Phrases: backtracking, chromatic num-
ber, computational complexity, graph coloring, implicit enumeration,
a series of random graphs. However, graphs arising in partial correctness.
practice may differ from our constant density samples.
For example, if a graph is disconnected or separable,
then Christofides’ and Brblaz’s algorithms may be supe- Received 3/84: revised 9/84: accepted 12/84
rior to the others. This follows from the fact that these
methods are, in a sense, the most sensitive to the con-
Authors’ Present Addresses: Marek Kubale. Institute of Informatics,
nectedness of a graph among the implicit enumeration Technical University of Gda6sk. Gda6sk. Poland. Boguslaw Jackowski.
algorithms for graph coloring. Moreover, in real-life Institute of Hydroengineering. Polish Academy of Sciences. Gdafisk.
problems there are usually additional restrictions that Poland.
must be taken into consideration. These restrictions
may be reflected in some unavailability constraints im- Permission to copy without fee all or part of this material is granted
posed on the FC sets before coloring begins (e.g., such a provided that the copies are not made or distributed for direct commer-
situation takes place when constructing class-teacher cial advantage, the ACM copyright notice and the title of the publication
and its date appear, and notice is given that copying is by permission of
timetables by the use of graph coloring). The unavaila- the Association for Computing Machinery. To copy otherwise, or to
bility constraints may be such that the initial ordering republish, requires a fee and/or specific permission.

418 Communications of the ACM April 1985 Volume 28 Number 4

You might also like