1.6 Colorings
1.6.2 Bounds on Chromatic Number
The point is, ladies and gentlemen, that greed, for lack of a better word, is good. Greed is right. Greed works.
— Gordon Gekko, in Wall Street In general, determining the chromatic number of a graph is hard. While small or well-known graphs (like the ones in the previous exercises) may be fairly easy, the number of possibilities in large graphs makes computing chromatic numbers difficult. We therefore often rely on bounds to give some sort of idea of what the chromatic number of a graph is, and in this section we consider some of these bounds.
IfGis a graph onnvertices, then an obvious upper bound onχ(G)isn, since ann-coloring is always possible on a graph withnvertices. This bound is exact for complete graphs, as it takes as many colors as there are vertices to color a complete graph. In fact, complete graphs are the only graphs for which this bound is sharp (see Exercise 5). We set this aside as Theorem 1.41.
Theorem 1.41. For any graphGof ordern,χ(G)≤n.
Let us now discuss a very basic graph coloring algorithm, the greedy algorithm.
To color a graph havingnvertices using this algorithm, first label the vertices in some order—call themv1,v2,. . .,vn. Next, order the available colors in some way. We will denote them by the positive integers 1, 2, . . . ,n. Then start coloring by assigning color 1 to vertexv1. Next, ifv1 andv2are adjacent, assign color 2 to vertexv2; otherwise, use color 1 again. In general, to color vertex vi, use
the first available color that has not been used for any ofvi’s previously colored neighbors.
For example, the greedy algorithm produces the coloring on the right from the graph on the left in Figure 1.87. First,v1is assigned color 1; thenv2is assigned color 1, sincev2is not adjacent tov1. Thenv3is assigned color 1 since it is not adjacent tov1 orv2. Vertexv4 is assigned color 2, thenv5 is assigned 2, and finallyv6is assigned 2.
v
6v
4v
1v
5v
2v
31 2 1
2 1 2
FIGURE 1.87. Applying the greedy algorithm.
It is important to realize that the coloring obtained by the greedy algorithm depends heavily on the initial labeling of the vertices. Different labelings can (and often do) produce different colorings. Figure 1.88 displays the coloring obtained from a different original labeling of the same graph. More colors are used in this
v
1v
3v
2v
6v
5v
41 2 3
1 3 1
FIGURE 1.88. Applying it again.
second coloring. We see that while “greed works” in that the algorithm always gives a legal coloring, we cannot expect it to give us a coloring that uses the fewest possible colors.
The following bound improves Theorem 1.41.
Theorem 1.42. For any graphG,χ(G)≤Δ(G) + 1, whereΔ(G)is the maxi- mum degree ofG.
Proof. Running the greedy algorithm onGproduces a legal coloring that uses at mostΔ(G) + 1colors. This is because every vertex in the graph is adjacent to at mostΔ(G)other vertices, and hence the largest color label used is at most Δ(G) + 1. Thus,χ(G)≤Δ(G) + 1.
Notice that we obtain equality in this bound for complete graphs and for cycles with an odd number of vertices. As it turns out, these are the only families of graphs for which the equality in Theorem 1.42 holds. This is stated in Brooks’s
Theorem [41]. The proof that we give is a modification of the one given by Lov´asz [190].
Theorem 1.43 (Brooks’s Theorem). IfGis a connected graph that is neither an odd cycle nor a complete graph, thenχ(G)≤Δ(G).
Proof. LetGbe a connected graph of ordernthat is neither a complete graph nor an odd cycle. Letk= Δ(G). We know thatk = 0andk = 1, since otherwise Gis complete. Ifk= 2, thenGmust be either an even cycle or a path. In either case,χ(G) = 2 = Δ(G). So assume thatk= Δ(G)≥3.
We are now faced with three cases. In each case we will establish a labeling of the vertices ofGin the formv1,v2,. . .,vn. We will then use the greedy algorithm to colorGwith no more thankcolors.
Case 1. Suppose thatGis notk-regular. Then there exists some vertex with degree less thank. Choose such a vertex and call itvn. LetS0 ={vn} and let S1=N(vn), the neighborhood ofvn. Further, let
S2=N(S1)− {vn} −S1, S3=N(S2)−S1−S2,
...
Si=N(Si−1)−Si−2−Si−1,
for eachi(Figure 1.89). SinceGis finite, there is sometsuch thatStis not empty,
S1 S2
vn
FIGURE 1.89. The setsSi. andSris empty for allr > t.
Next, label the vertices inS1with the labelsvn−1,vn−2, . . . ,vn−|S1|. Label the vertices inS2 with the labelsvn−|S1|−1, . . . ,vn−|S1|−|S2|. Continue labeling in this decreasing fashion until all vertices ofGhave been labeled. The vertex with labelv1is in the setSt.
Letube a vertex in someSi,i≥1. Sinceuhas at least one neighbor inSi−1, it has at mostk−1adjacencies with vertices whose label is less than its own.
Thus, when the greedy algorithm gets tou, there will be at least one color from {1,2, . . . , k} available. Further, sincedeg(vn) < k, there will be a color from {1,2, . . . , k}available when the greedy algorithm reachesvn. Thus, in this case the greedy algorithm uses at mostkcolors to properly colorG.
Case 2. Suppose thatGisk-regular and that Ghas a cut vertex, sayv. The removal ofvfromGwill form at least two connected components. Say the com- ponents areG1,G2, . . . ,Gt. Consider the graphH1=G1∪ {v}(the component G1withvadded back—see Figure 1.90).H1is a connected graph, and the degree
v G1
G2
Gt
H1
FIGURE 1.90. The graphH1.
ofv inH is less thank. Using the method in Case 1, we can properly colorH1 with at mostkcolors. Similarly, we can properly color eachHi=Gi− {v}with at mostkcolors. Without loss of generality, we can assume thatvgets the same color in all of these colorings (if not, just permute the colors to make it so). These colorings together create a proper coloring ofGthat uses at mostkcolors. Case 2 is complete.
Case 3. Suppose thatGisk-regular and that it does not contain a cut vertex.
This means thatGis 2-connected.
Subcase 3a. Suppose thatGis 3-connected. This means that for allv, the graph G−vis 2-connected. Letvbe a vertex ofGwith neighborsv1andv2such that v1v2∈E(G)(such vertices exist sinceGis not complete). By the assumption in this subcase, the graphG− {v1, v2}is connected.
Subcase 3b. Suppose thatGis not 3-connected. This means that there exists a pair of verticesv, w such that the graphG− {v, w} is disconnected. Let the components ofG− {v, w}beG1,G2, . . . ,Gt. Sincek≥3, it must be that each Gihas at least two vertices. It also must be thatvis adjacent to at least one vertex in eachGi, sincewis not a cut vertex ofG. Letu∈V(G1)be a neighbor ofv.
Suppose for the moment thatuis a cut vertex of the graphG−v. If this is the case, then there must be another vertexyofG1such that (i)yis not a cut vertex of the graphG−v, and (ii) the only paths fromytowinG−vgo through vertex u. Sinceuis not a cut vertex ofGitself, it must be thatyis adjacent tov. In either case, it must be thatvhas a neighbor inG1(eitheruory) that is not a cut vertex ofG−v. The vertexvhas a similar such neighbor inG2. For convenience, let us rename: Fori = 1,2, letvi ∈V(Gi)be a neighbor ofvthat is not a cut vertex of the graphG−v. Verticesv1 andv2 are nonadjacent, and since they were in different components ofG− {v, w}, it must be thatG− {v1, v2}is connected.
In each subcase, we have identified verticesv,v1, andv2such thatvv1, vv2 ∈ E(G),v1v2 ∈ E(G), andG− {v1, v2} is connected. We now proceed to label the vertices ofGin preparation for the greedy algorithm.
Letv1andv2 be as labeled. Letvbe labeledvn. Now choose a vertex adja- cent tovn that is notv1 orv2 (such a vertex exists, sincedeg(vn) ≥ 3). Label this vertexvn−1. Next choose a vertex that is adjacent to eithervn orvn−1and is notv1,v2,vn, orvn−1. Call this vertexvn−2. We continue this process. Since G− {v1, v2} is connected, then for each i ∈ {3, . . . , n−1}, there is a ver- texvi ∈ V(G)− {v1, v2, vn, vn−1, . . . , vi+1}that is adjacent to at least one of vi+1, . . . , vn.
Now that the vertices are labeled, we can apply the greedy algorithm. Since v1v2 ∈ E(G), the algorithm will give the color 1 to bothv1andv2. Since each vi,3≤i < n, is adjacent to at mostk−1predecessors, and sincevnis adjacent tov1andv2, the algorithm never requires more thank= Δ(G)colors. Case 3 is complete.
The next bound involves a new concept.
The clique number of a graph, denoted byω(G), is defined as the order of the largest complete graph that is a subgraph ofG. For example, in Figure 1.91, ω(G1) = 3andω(G2) = 4.
G
1G
2FIGURE 1.91. Graphs with clique numbers 3 and 4, respectively.
A simple bound that involves clique number follows. We leave it to the reader to provide a (one or two line) explanation.
Theorem 1.44. For any graphG,χ(G)≥ω(G).
It is natural to wonder whether we might be able to strengthen this theorem and prove thatχ(G) =ω(G)for every graphG. Unfortunately, this is false. Consider the graphGshown in Figure 1.92. The clique number of this graph is 5, and the
FIGURE 1.92. Isχ(G) =ω(G)?
chromatic number is 6 (see Exercise 2).
The upper and lower bounds given in Theorem 1.45 concernα(G), the inde- pendence number ofG, defined back in Section 1.4.3. The proofs are left as an exercise (see Exercise 6).
Theorem 1.45. For any graphGof ordern, n
α(G) ≤χ(G)≤n+ 1−α(G).
Exercises
1. Recall thatavgdeg(G)denotes the average degree of vertices inG. Prove or give a counterexample to the following statement:
χ(G)≤1 + avgdeg(G).
2. IfGis the graph in Figure 1.92, prove thatχ(G) = 6andω(G) = 5.
3. Determine a necessary and sufficient condition for a graph to have a 2- colorable line graph.
4. Recall thatτ(G)denotes the number of vertices in a detour path (a longest path) ofG, prove thatχ(G)≤τ(G).
5. Prove that the only graphGof ordernfor whichχ(G) =nisKn. 6. Prove that for any graphGof ordern,
n
α(G) ≤χ(G)≤n+ 1−α(G).
7. IfGis bipartite, prove thatω(G) =χ(G).
8. LetGbe a graph of ordern. Prove that (a) n≤χ(G)χ(G);
(b) 2√
n≤χ(G) +χ(G).