Professional Documents
Culture Documents
Module 8
Module 8
Vertex-colorings
Contents
8.1
8.2
8.3
. . . . . . . . . . . . . . . . . . . . . . . . . . . . 191
179
180
ing problems, optimal assignment of channels to radio stations and optimal assignment of spectrum frequencies to mobile operations. However, the topic originated
with the following map coloring conjecture.
At most four colors are required to color any map of a country so that adjacent
states receive different color.
This problem was first raised by Francis Guthrie in a letter to De Morgan in
1852. For a long time, it was a fascinating open problem among mathematicians.
Arthur Cayley (1821 1852) and G.D. Birkhoff (1884 1944) made it known to a
wider community by their presentations and innovative contributions. It was settled
in affirmative by K. Appel, W. Haken and J. Kosh in 1977.
8.1
Basic definitions
181
(a)
(b)
(c)
Figure 8.1: (a) shows a 3-vertex-coloring, (b) shows a 4-vertex-coloring and (c) shows
a coloring which is not a 2-vertex-coloring.
words, (G) is the minimum number of colors required to color the vertices such that
no two adjacent vertices of G receive the same color.
The following table shows the vertex-chromatic number of some standard
graphs.
G
Kn
Knc
Bipartite graph
Petersen graph
(G)
182
8.2
Mycielskis theorem
There has been intense research to obtain upper bounds for (G) in terms of
(G) alone. Questions like for which graphs (G) = (G) or (G) = (G) + 1 or
(G) f ((G)) for a function f , have received wide attention. Mycielski (1955)
showed that given any k, there exists a graph G with (G) = 2 and (G) = k. This
result indicates that there is no upper bound for an arbitrary class of all graphs as a
function of alone.
Theorem 8.1. For any given integer k ( 1), there exists a triangle-free graph Gk
with vertex-chromatic number k. (Triangle-free G := G has no K3 as a subgraph.)
Proof. Gk is constructed by induction on k. For k = 1 and 2, K1 and K2 are the
required graphs. Next suppose that we have constructed a triangle-free graph Gk on
p vertices v1 , v2 , . . . , vp . Construct Gk+1 from Gk as follows.
1. Add p + 1 new vertices u1 , u2 , . . . , up and z to Gk .
2. Join ui (1 i p) to all those vertices to which vi is adjacent in Gk .
3. Join z to every ui .
Figure 8.2 shows this construction of G3 from G2 (= K2 ) and G4 from G3
(= C5 ).
183
v1
v2
u1
u2
v1
v2
(a) G2 G3
z
u1
u5
v5
v1
v4
v5
v4
u2
v1
v2
v3
v2
v3
u4
u3
(b) G3 G4
184
h(v ),
i
g(vi ) =
h(u ),
i
if h(vi ) 6= k
if h(vi ) = k
8.3
been attempts to use greedy and approximate algorithms and obtain tight bounds.
However, it has been shown that there can be no approximate algorithm for finding
(G) within a factor of n1 , for any > 0, where n is the number of vertices in
G. This deep result shows that finding the vertex-chromatic number of an arbitrary
class of graphs is impossibly hard. Despite this negative result, greedy algorithm does
185
use nearly colors if the input graph belongs to several interesting classes of graphs.
This sections explores these aspects.
Greedy algorithm (Sequential algorithm/An example of an on-line algorithm.)
Input: A graph G and an ordering (v1 , v2 , . . . , vn ) of its vertices.
Output: A k-vertex-coloring of G, for some k.
Step 1: Color v1 with 1.
Step 2: Having colored v1 , v2 , . . . , vi with t colors, say 1, . . . , t, color vi+1 with the
following policy. Let T be the set of colors used to color the vertices adjacent with
vi , then
min({1, 2, . . . , t} T ),
color(vi+1 ) =
t + 1,
if T 6= {1, 2, . . . , t}
if T = {1, 2, . . . , t}.
v2
v3
v4
v5
v6
186
v2
v3
v4
v5
v6
(a) An output of the greedy algorithm with input (G; (v1 , v6 , v3 , v4 , v2 , v5 )). The number inside
the circle indicates its colors.
v1
v2
v3
v4
v5
v6
(b) An output of the greedy algorithm with input (G; (v1 , v2 , v6 , v3 , v5 , v4 )).
v1
v2
v3
v4
v5
v6
(c) An output of the greedy algorithm with input (G; (v1 , v3 , v5 , v2 , v4 , v6 )). Since (G) = 2, with
this choice of vertex ordering the algorithm uses the minimum number of colors.
Figure 8.4: Outputs of the greedy algorithm when three different vertex orderings are
given as input.
Remarks.
Algorithm is called a greedy algorithm since we use the first available color at
every step.
It is called a sequential algorithm since the input is a sequence of the vertices
and the vertices are colored sequentially.
187
Theorem 8.3. We can color any chordal graph G with (G) colors using the greedy
algorithm.
Proof. Let S be a PEO of the vertices of G; see Theorem 4.7. Under Step 1 of the
greedy algorithm, choose the reverse ordering of S, say (v1 , v2 , . . . , vn ). By the PEO
property, vi+1 and its neighbors in {v1 , v2 , . . . , vi } form a complete subgraph in G.
Hence at the (i + 1)-th iteration, there are at most (G) 1 colors appearing on the
neighbors of vi+1 . Hence the greedy algorithm uses at most (G) colors.
An illustration:
Corollary. For any chordal graph G, (G) = (G).
188
2 v3
1
v5
3
v6
Figure 8.5: A graph G with PEO (v1 , v4 , v6 , v2 , v3 , v5 ) and its reverse order
(v5 , v3 , v2 , v6 , v4 , v1 ) as the input.
We observed in Theorem 8.2 that (G) 1 + (G), for any graph G. Clearly,
(C2n+1 ) = 3 = 1 + (C2n+1 ) and (Kn ) = n = 1 + (Kn ). Surprisingly, Brooks
(1941) showed that these are the only classes of graphs for which the upper bound is
attained.
denotes a sequence of the vertices of Ni (v) ordered arbitrarily; see Figure 8.6a.
We apply greedy algorithm with S as the input. Every vertex vp (6= v) in
Ni+1 (v) is adjacent with a vertex in Ni (v), 0 i t 1. Hence when vp is getting
189
v1 = u
N0 (v)
v2 = w
vn = v
N0 (v)
N1 (v)
..
.
..
.
Ni (v)
vk+1
Ni (v)
Ni+1 (v)
..
.
v1
N1 (v)
..
.
v2
vk Nt (v)
v3
v4
vk
Nt (v)
190
c
e
d g
N2 (e)
N3 (e)
N1 (e)
(b) An ordering of G
too, if we can get an order (v1 , v2 , . . . , vn ) of the vertices such that every vi (6= vn )
is adjacent with some vertex succeeding vi and that vn has at least two neighbors of
the same color in (v1 , v2 , . . . , vn1 ). Such an ordering is achieved by appealing to the
following claim (whose proof is left as an exercise).
Claim: In any 2-connected k-regular graph (3 k n 2), there exist three vertices
u, v and w such that (u, v), (v, w) E(G), (u, w)
/ E(G) and G{u, w} is connected.
Let u, v, w be as in the claim and let S = (v1 = u, v2 = w, Nt+ (v), . . . , N0+ (v)),
where Ni (v) = {x V (G {u, w}) : d(x, v) = i}, i = 0, 1, 2, . . . , t and Ni+ (v) is the
set of vertices in Ni (v) ordered arbitrarily; see Figure 8.6b. With S as the input, the
greedy algorithm colors both the vertices v1 and v2 with color 1. As in case 1, every
vertex vi (3 i n 1) is adjacent with some vertex succeeding vi in S. Hence
when vi is getting colored it has at most 1 colors appearing on its neighbors in
(v1 , v2 , . . . , vi1 ). Therefore, the greedy algorithm colors vi with one of the colors in
{1, 2, . . . , }. Finally when vn is getting colored it has at most 1 colors appearing
on its neighbors in (v1 , v2 , . . . , vn1 ) since v1 and v2 are its neighbors and both are
colored 1. Therefore, the greedy algorithm colors vn too with one of the colors in
{1, 2, . . . , }.
191
Exercises
1. Find the vertex chromatic number of :
(a) a tree.
(b) a graph with exactly one cycle.
(c) the complement of a cycle.
(d) C2s + C2t+1
(e) Petersen graph.
(f) Kn1 ,n2 ,...,ns .
2. Prove: (G1 + G2 ) = (G1 ) + (G2 ).
3. For every graph G, show that
n(G)
0 (G)
(G) n + 1 0 (G).
v4
v2
v5
v6
v8
v7
v3
192
8. Order the vertices of the graph shown below, in such a way that the greedy
algorithm uses 4 colors.
u1
u2
u3
u4
v1
v2
v3
v4
9. Let G be a simple graph such that (H) k, for every subgraph H of G (such a
graph is called a k-degenerate graph). Order the vertices of G so that if one
applies greedy algorithm to color the vertices of G, then it uses at most k + 1
colors.
10. There are 7 chemicals A, B, C, D, E, F , G. For safety reasons, the following
pairs of chemicals cannot be stored in one room: A&B, A&C, A&G, B&C,
B&D, C&D, D&E, D&F , E&F , E&G, F &G. If the problem is to find the
minimum number of rooms (say k) required to store all the chemicals, how
would you model it as a graph theoretical problem and find k.
A graph G is said to be k-critical if
(G) = k, and
(H) < k, for every proper subgraph H of G.
193