Colouring 1

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

Chapter 6

GRAPH COLORING

A k-coloring of (the vertex set of) a graph G is a function c : V (G) → {1, 2, ..., k}
such that c (u) = c (v) whenever u is adjacent to v. If a k-coloring of G exists, then
G is called k-colorable. The chromatic number of G is defined as

χ (G) = min {k : G is k-colorable.}

When χ (G) = k, G is called k-chromatic.

6.1 Lower bounds of the chromatic number


Let ω(G) be the clique number of G, that is, the maximal number of vertices in a
complete subgraph of G. Obviously, we have

χ(G) ≥ ω(G) (6.1)

Given a k-coloring of G, the vertices being colored with the same color form
an independent set. Let G be a graph with n vertices and c a k-coloring of G. We
define
Vi = {v : c (v) = i}
for i = 1, 2, ..., k. Each Vi is an independent set. Let α(G) be the independence
number of G, we have
|Vi | ≤ α (G) .
Since
n = |V1 | + |V2 | + · · · + |Vk | ≤ k · α (G) = χ (G) α (G) ,
we have
n
χ (G) ≥ . (6.2)
α (G)
n
These bounds can be very far off. For (6.2), there are graphs with α(G) < 2 but χ (G)
arbitrarily large.
(6.1) is not much better either. There are graphs with χ(G) > ω(G), for
example, C5 . χ(C5 ) = 3 and ω (C5 ) = 2. Let G and H be two graphs. We define the
join of G and H, G ⊕ H to be the graph obtained by joining every vertex in G with
68 Graph coloring

every vertex in H. Clearly, χ (G ⊕ H) = χ (G)+χ (H) and ω (G ⊕ H) = ω(G)+ω(H).


So χ (C5 ⊕ C5 ) = 6 and ω (C5 ⊕ C5 ) = 4. Let G1 = C5 ⊕ C5 and Gp = Gp−1 ⊕ Gp−1 ,
we have

χ (G1 ) = 6, ω (G1 ) = 4
χ (G2 ) = 12, ω (G2 ) = 8
χ (G3 ) = 24, ω (G3 ) = 16
···
χ (Gp ) = 3 · 2p , ω (Gp ) = 2p+1

χ (Gp ) − ω (Gp ) = 2p
The difference between χ (G) and ω (G) can be arbitrarily large. Furthermore, even
when ω (G) = 2, we can have χ (G) arbitrarily large.
When ω (G) = 2, G is called triangle-free.
6.1.1 Tutte’s construction of triangle-free k-chromatic graphs
We construct Gk recursively.
G2 = K2 .
Let nk = |Gk |, the number of vertices in Gk .
Suppose that Gk−1 has been built. Let Ik be an independent set of (nk−1 − 1) (k − 1)+
1 vertices. For every (k − 1)-subset of Ik , we take a copy of Gk−1 and match the ver-
tices in that copy to the vertices in the (k − 1)-subsets. The result is Gk .
Example: G3 .

Claim 6.1.1 Gk is triangle-free.

Proof. Prove by induction on k.


G2 is obviously triangle-free. Assume that Gk−1 is triangle-free. No vertex in
Ik can be in a triangle: Let x be a vertex in Ik . All vertices that are adjacent to x
are in different copies of Gk−1 . So no two neighbors of x are adjacent. Since there
are no triangles in the copies of Gk−1 , there is no triangle in Gk .

Claim 6.1.2 χ (G) = k.

Proof. By induction on k. Since it is easy to see that Gk is k-colorable (color


all the copies of Gk−1 with colors 1, 2, ..., k − 1 and color the vertices in Ik with color
k), we only need to show that Gk is not (k − 1)-colorable. Suppose that Gk is (k − 1)-
colorable and c is a (k − 1)-coloring of Gk . By the pigeonhole principle, there are at
least nk−1 vertices that are colored with the same color. Then the copy of Gk−1 must
be colored with k − 2 colors. Contradiction.
Upper bounds 69

6.2 Upper bounds


6.2.1 The greedy algorithm
Let the vertices of a graph G be v1 , v2 , ..., vn and the maximum degree of G be ∆. For
i = 1, 2, ..., n we color vi with the smallest number that is available, i.e. the number
that has not been used on the vertices in {v1 , v2 , ..., vi−1 } that are adjacent to vi .
Since there are at most ∆ vertices that are adjacent to vi , this algorithm will not use
more than ∆ + 1 colors. Therefore we have
Theorem 6.2.1
χ(G) ≤ ∆(G) + 1 (6.3)
(6.3) can be pretty bad. The graph K1,p is called a star. It has ∆(G) = p
and χ (G) = 2. However, for a complete graph Kn and an odd cycle, we have
χ(G) = ∆(G) + 1. Therefore, (6.3) cannot be improved in general.
Theorem 6.2.2 Suppose that in every subgraph H of G there is a vertex with degree
at most δ in H.
χ(G) ≤ δ + 1
Proof. There is a vertex with degree at most δ in G. Label that vertex vn .
There is a vertex with degree at most δ in G − vn . Label that vertex vn−1 . Label
the vertex with degree at most δ in G − {vn , vn−1 } vn−2 . Continue to label all the
vertices in G as v1 , v2 , ..., vn . Apply the greedy algorithm according to this labeling.
At each step, the vertex we are going to color is adjacent to at most δ vertices that
are already colored. Therefore, δ + 1 colors will be enough.
For a star K1,p Theorem 6.2.1 provides the upper bound χ(G) ≤ p + 1. Since
every subgraph of K1,p has a vertex of degree at most one, Theorem 6.2.2 gives the
upper bound χ (G) ≤ 2.
Definition 6.2.3 A graph is called a wheel (Wn ) if it is obtained by joining a new
vertex to every vertex in a cycle Cn . The wheel is called odd (or even) if n is odd (or
even).
In the figure that follows is the wheel W7 . It has maximum degree 7. All its
subgraphs contain a vertex of degree at most three. Theorem 6.2.1 gives an upper
bound χ(G) ≤ 8 and Theorem 6.2.2 gives χ(G) ≤ 4. Actually we can see that
χ(G) = 4.
70 Graph coloring

6.2.2 Brook’s Theorem


Theorem 6.2.2 is difficult to apply in general. Another way to improve (6.3) is the
following theorem.
Theorem 6.2.4 (Brook’s Theorem) Suppose that ∆ (G) = k ≥ 2. χ (G) ≤ k unless
G contains a Kk+1 or k = 2 and G contains an odd cycle.
Before we prove Brook’s Theorem, we need some definitions about the con-
nectivity of a graph. We denote the graph obtained fby deleting vertices v1 , v2 , ..., vk
(and all the edges that are incident to at least one of these vertices) from G as
G − {v1 , v2 , ..., vk } and we write G − {v} as G − v. A vertex in G is called a cut-vertex
if G−v has more components than G. G is called 2-connected if G is connected and G
does not contain any cut-vertex. (That is, you need to remove at least two vertices to
disconnect the graph.) Similarly we say that G is k-connected if G is connected and
one needs to remove at least k vertices to disconnect the graph. A maximal subgraph
of G that is 2-connected is called a block. We can construct a block-graph B (G) for a
graph G: The vertices of B (G) are the blocks and cut-vertices of G. There is an edge
joining a cut-vertex with a block if the cut-vertex is in that block. In the following
figure, a graph G and its block graph B (G) is shown.

a
e
B1 B3
B1 c d B
b 3
d
c
B2
B2
f h
B4 g B6 g
h
B5
i j k l B4 B5 B6
G B (G)
B (G) is always a tree. (Why?) If a block is a leaf in B (G), we say that block is an
end-block.
Proof of Brook’s Theorem: The theorem is true for k = 2: If G does not contain any
odd cycles, then G is bipartite therefore χ (G) ≤ 2. Let k > 3 be the first value of
∆ (G) such that the theorem is not true and let G be a counter example with the
least number of vertices. That is, ∆ (G) = k, χ (G) > k and every graph with less
vertices than G that has maximum degree k can be coloured with k colours.
Claim 1: G must be connected. Then either one of the components of G is a smaller
counter example or all its components can be coloured with k colours therefore G can
be coloured with k colours. Either way, there is a contradiction.
Claim 2: G must be 2-connected. Suppose that G contains a cut-vertex u. Each
block of G can be coloured with k colours. Then we can combine those k-colourings
together to obtain a k-colouring of G. This is a contradiction.
Planar graphs and the Four Colour Theorem 71

Claim 3: G must contain three vertices u1 , u2 and v such that u1 is not adjacent to
u2 ; both u1 and u2 are adjacent to v and G − {u1 , u2 } is connected.
Case 1: G is 3-connected. Since G is not a completed graph, there are two
vertices x and y such that x is not adjacent to y. Let the shortest path from x to y
be x = v0 , v1 , ..., vp = y and p ≥ 2. Since this path is the shortest, v0 is not adjacent
to v2 . Then we can choose u1 = v0 , u2 = v2 and v = v1 .
Case 2: G is 2-connected but not 3-connected. There exist two vertices u
and v such that G − {u, v} is disconnected. Then G − v contains cut-vertices (for
example, the vertex u). However, there is no cut-vertex in G. So v must be adjacent
to at least one vertex in every block of G − v. Let u1 and u2 be two vertices in two
different end-blocks of G − v that are adjacent to v. The triple u1 , u2 and v satisfy
the conditions of Claim 3.
Then we order the vertices of G in such a way that v1 = u1 , v2 = u2 and
vn = v. v3, v4 , ..., vn−1 are ordered in such a way that if i < j then the distance from
v to vi is greater than or equal to the distance from v to vj for all 3 ≤ i, j ≤ n − 1.
When we apply the greedy algorithm to G according to this ordering, v1 and v2 will
be coloured with colour 1. When we are colouring vi (i < n), there is at least one
neighbor of vi that has not been coloured. Therefore, there is at least one colour
available for vi if we have k = ∆ (G) colours. When we are colouring the last vertex
vn = v, at most ∆ − 1 colours were used on the neighbors of v (since v1 and v2 are
coloured with the same colour), and there is at least one colour for v. This shows
that G can be coloured with k colours as well. 

6.3 Planar graphs and the Four Colour Theorem


One earlier focus of graph theory is the Four Colour Problem:
Given a map of countries such that every country is a continuous piece, is it
always possible to use four colors to color the countries such that any two countries
with a common boundary are colored with different colors?
It is easy to see that three colors would not be enough and no one had found
an example of map that needed more than four colors. However, no one can prove
that such examples do not exist for a long time. It is until 1976 with the help of
thousands hours of computer time, a proof was found.
6.3.1 Dual graphs
A map can be represented by a graph such that each country is represented by a
vertex and two countries share a boundary if and only if the corresponding vertices
are adjacent. That graph is called a dual graph of the map. A coloring of the map
satisfying the condition of the four color problem corresponding to a coloring of the
vertices of the dual graph. A graph is planar if it can be drawn (or embedded) in
the plane such that no two edges crossing each other. The four color problem is
equivalent to
If G is a planar graph, is it true that χ (G) ≤ 4?
72 Graph coloring

6.3.2 Euler’s formula


We first study some properties of the planar graphs. The most important property
is the Euler’s formula:
Let G be a connected planar graph and v, e, r the numbers of vertices, edges
and regions of G respectively.
v − e + r = 2. (6.4)
The formula is easy to prove by induction on v.
Since every region is bounded by at least three edges and an edge can be used
twice in the boundaries, we have
3r ≤ 2e
or
2e
r≤ .
3
Substitute this into (6.4), we have
2e
v−e+ ≥ 2
3
1
v ≥ e+2
3
e ≤ 3v − 6. (6.5)

Corollary 6.3.1 K5 is not planar.

Corollary 6.3.2 K3,3 is not planar.

(6.5) cannot be used directly to prove Corollary 6.3.2. We need a stronger


version of (6.5) for bipartite graphs. Since a bipartite graph does not contain any
triangles, a region is bounded by at least 4 edges. For all bipartite graphs, we have

4r ≤ 2e
1
r ≤ e.
2
That will imply
1
v−e+ e ≥ 2
2
1
v ≥ e+2
2
e ≤ 2v − 4. (6.6)

(6.6) implies Corollary 6.3.2.


Subdividing an edge or performing an elementary subdivision of an edge uv
of a graph G is the operation of deleting uv and adding a path u, w, v through a
Planar graphs and the Four Colour Theorem 73

new vertex w. A subdivision of G is a graph obtained from G by a sequence of


elementary subdivisions, turning edges into paths through new vertices of degree 2.
Subdividing edges does not affect planarity. Therefore any subdivision of K5 or K6,6
is not planar either. Kuratowski [1930] proved that G is planar if and only if G
contains no subdivision of K5 or K3,3 . However, this condition is not easy to check
for large graphs.
6.3.3 Planarity testing
There are more efficient algorithms to test whether a graph G is planar. The output
of these algorithm is either a drawing of G in the plane (when G is planar) or the
statement that G is not planar. These algorithm all use the concept of H-bridge.
If H is a subgraph of G, and H-bridge of G is either (1) an edge not in H
whose endpoint are in H or (2) a component of G − V (H) together with the edges
(and vertices of attachment) that connect it to H. The H-bridges are the “pieces”
that must be added to an embedding of H to obtain an embedding of G.
Given a cycle H in a graph G, two H-bridges A, B conflict if they have
three common vertices of attachment or if there are four vertices v1 , v2 , v3 , v4 in cyclic
order on H such that v1 , v3 are vertices of attachment of A and v2 , v4 are vertices of
attachment of B. In the latter case, we say the H-bridges cross. The conflict graph
of H is a graph whose vertices are the H-bridges of G, with conflicting H-bridges
adjacent.

Theorem 6.3.3 (Tutte 1958) A graph G is planar if and only if for every cycle C
in G, the conflict graph of C is bipartite.

It is easy to see that why for a planar graph G, the conflict graph must be
bipartite. In a planar embedding of G, all the H-bridges are either inside of C or
outside of C. The ones on the same side cannot be conflicting.

Example 6.3.4 The conflict graph of a C5 in K5 .

1 4 3
4
3

5 2

2 5
K5 The conflicting graph.
74 Graph coloring

Example 6.3.5 The conflict graph of a C6 in K6,6 .

x1 y1 x1 y1
1
1 2
3
x2 y2 y3 x2

x3 y3 x3 y2 2 3
K3,3 Another drawing of K3,3 The conflicting graph.

There are linear-time planarity-testing algorithms due to Hopcroft and Tarjan


(1974) and to Booth and Luecker (1976), but these are very complicated. An earlier
algorithm due to Demoucron, Malgrange and Pertuiset (1964) is much simpler. It is
not linear but runs in polynomial time. The idea is that if a planar embedding of H
can be extended to a planar embedding of G, then in that extension every H-bridge
of G appears inside a single face of H. The algorithm builds increasingly larger plane
subgraphs H of G that can be extended to an embedding of G if G is planar. We
want to enlarge H by making small decisions that won’t lead to trouble.
The basic enlargement step is the following. (1) Choose a face F that can
accept an H-bridge B; a necessary condition for F to accept B is that its boundary
contain all vertices of attachment of B. (2) Although we do not know the best way
to embed B in F , each particular path in B between vertices of attachment by itself
has only one way to be added across F , so we add a single such path. (3) If there is
an H-bridge that is not acceptable to any face of H, then G is not planar.

Example 6.3.6

6
7
8 1
1

7 2 2

3
6 3
5 4

8
5 4 →

The first subgraph H used is the cycle 1, 2, 3, 4, 5. Then the path 3, 7, 6, 5....
Planar graphs and the Four Colour Theorem 75

Example 6.3.7
8 1 5 1

7 2 6 2

6 3 7 3

5 4 → 8 4

For the cycle 1, 2, 3, 4, 8, 7, 6, 5, the edges 14, 27, 36 are all crossing. The graph
is nonplanar.
6.3.4 The chromatic number of a planar graph
(6.5) implies that for a planar graph G, the degree sum has the upper bound

deg(v) = 2e ≤ 6v − 12.
v

There is a vertex with degree at most 5. Since every subgraph of a planar graph is
also a planar graph, every subgraph of G has a vertex with degree at most 5. By
Theorem 6.2.2, χ (G) ≤ 6. So the six color theorem is easy to proof. With a little of
more work, we can prove the five color theorem:

Theorem 6.3.8 Every planar graph G has chromatic number at most five.

Proof. Suppose that the theorem is not true. Let G be the smallest planar
graph ( in terms of number of vertices ) that cannot be colored with five colors. Let
v be a vertex in G that has the minimum degree. We know that deg (v) ≤ 5.
Case 1: deg (v) ≤ 4. G − v can be colored with five colors. There are at most
colors have been used on the neighbors of v. There is at one color available for v. So
G can be colored with five colors, a contradiction.
Case 2: deg (v) = 5. G − v can be colored with five colors. If two of the
neighbors of v are colored with the same color, then there is a color available for v.
So we may assume that all the vertices that are adjacent to v are colored with colors
1, 2, 3, 4, 5 in the clockwise order. We will call these vertices v1 , v2, ..., v5 . Consider all
the vertices being colored with colors 1 or 3 (and all the edges among them). If this
subgraph G is disconnect and v1 and v3 are in different components, then we can
switch the colors 1 and 3 in the component with v1 . This will still be a 5-coloring of
G − v. Furthermore, v1 is colored with color 3 in this new 5-coloring and v3 is still
colored with color 3. Color 1 would be available for v, a contradiction. Therefore v1
and v3 must be in the same component in that subgraph, i.e., there is a path from
v1 to v3 such that every vertices on this path is colored with either color 1 or color 3.
76 Graph coloring

Similarly, there is a path from v2 to v4 such that every vertices on that path has either
color 2 or color 4. These two paths must intersect even though they have no vertex
in common. Then there must be two edges crossing each other. This contradiction
concludes the proof.

You might also like