Chapter 8 Graph Colouring
Total Page:16
File Type:pdf, Size:1020Kb
Chapter 8 Graph colouring 8.1 Vertex colouring A (vertex) colouring of a graph G is a mapping c : V(G) S. The elements of S are called → colours; the vertices of one colour form a colour class. If S = k, we say that c is a k-colouring | | (often we use S = 1,...,k ). A colouring is proper if adjacent vertices have different colours. { } A graph is k-colourable if it has a proper k-colouring. The chromatic number χ(G) is the least k such that G is k-colourable. Obviously, χ(G) exists as assigning distinct colours to vertices yields a proper V(G) -colouring. An optimal colouring of G is a χ(G)-colouring. A graph G is | | k-chromatic if χ(G)=k. In a proper colouring, each colour class is a stable set. Hence a k-colouring may also be seen as a partition of the vertex set of G into k disjoint stable sets S = v c(v)=i for 1 i k. i { | } ≤ ≤ Therefore k-colourable are also called k-partite graphs. Moreover, 2-colourable graphs are very often called bipartite. Clearly, if H is a subgraph of G then any proper colouring of G is a proper colouring of H. Proposition 8.1. If H is a subgraph of G, then χ(H) χ(G). ≤ Proposition 8.2. χ(G)=max χ(C),C connected component of G . { } Proof. Proposition 8.1 gives the inequality χ(G) max χ(C),C connected component of G ≥ { } because every connected component of G is a subgraph of G. Let us now prove the opposite inequality. Let C1,C2,...,Cp be the connected components of G. For 1 i p, let c be a proper colouring of C with colours 1,2,...,χ(C ). Let c be the union ≤ ≤ i i i of the c that is the colouring of G defined by c(v)=c (v) for all v C . Since there is no edge be- i i ∈ i tween two vertices in different connected component, c is a proper colouring of G with colours 1,2,...,max χ(C ) 1 i p . Hence χ(G) max χ(C),C connected component of G . { i | ≤ ≤ } ≤ { } Often in the following, we will consider connected graphs. 113 114 CHAPTER 8. GRAPH COLOURING 8.1.1 Complexity On the algorithmic point of view, one may wonder what is the complexity of computing the chromatic number of graph. Moreover, for evey fixed k, we might ask for the complexity of deciding if a graph is k-colourable. k-COLOURABILITY Input: A graph G. Question: Is Gk-colourable? The 1-colourable graphs are the empty graphs (i.e. graphs with no edges). The 2-colourable graphs are the bipartite graphs and can be characterized and recognized in polynomial time (See Section 2.3). Hence for k 2, k-COLOURABILITY is polynomial-time solvable. In constrast, ≤ we now prove that k-COLOURABILITY is NP-complete for all k 3. ≥ Theorem 8.3 (Garey, Johnson and Stockmeyer [12]). 3-COLOURABILITY is NP-complete. Proof. 3-COLOURABILITY is clearly is NP as every proper 3-colouring is a certificate. To prove its hardness, we use a reduction from 3-SAT. Let Φ be a 3-SAT formula with n variables x1,...,xn and m clauses C1,...,Cm. Let us create a graph GΦ as follows: Create a 3-cycle with vertices v , v and v ; • true f alse base For each variable x , create two vertices x andx ¯ , and create the 3-cycle (v ,v ,v¯ ); • i i i base i i For each clause C = , add a small gadget graph G containing the vertices , • j 1 ∨ 2 ∨ 3 j 1 2, 3, v f alse and vbase as depicted in Figure 8.1. v j l3 w j y j l2 vbase u j t j l1 v f alse z j Figure 8.1: The clause gadget G j We claim that Φ is satisfiable if and only if GΦ is 3-colourable. Suppose first that GΦ is 3-colourable. Let c be proper colouring of GΦ with the three colours true, f alse and base. Without loss of generality, we may assume that c(vtrue)=true, c(v f alse)= f alse and c(v )=base. Then for each variable x , c(x ),c(x¯ ) = true, f alse , so c induces base i { i i } { } a truth assignment. Let us now prove that this truth assigment satisfies Φ. Suppose for a contradiction, that a clause C = is not satisfied. Then c( )=c( )=c( )= f alse. j 1 ∨ 2 ∨ 3 1 2 3 8.1. VERTEX COLOURING 115 Hence c(u ),c(v ) = base,true , so c(w )= f alse. Now c(t )=true, because it is adajcent { j j } { } j j to v f alse and vbase, so c(y j)=base. But z j is adjacent to 1, t j and y j which are coloured f alse, true and base respectively. This contradicts the fact that c is proper. Reciprocally, suppose that Φ is satisfiable. Let f be a truth assignment satisfying Φ. Then f defines a colouring of the xi andx ¯i with colours true and f alse. This colouring can be extended properly by setting f (vtrue)=true, f (v f alse)= f alse and f (vbase)=base. One can then check that this colouring can be extended properly to each G j using the colours three colours true, f alse, and base (Exercise 8.2). Corollary 8.4. For all k 3,k-COLOURABILITY is NP-complete. ≥ Proof. We can easily reduce 3-COLOURABILITY to k-COLOURABILITY. Let G be a graph. Let H be the graph obtained from the disjoint union of G and the complete graph Kk 3 by adding all − edges between V(G) and V(Kk 3). Easily G is 3-colourable if and only if H is k-colourable. − Furthermore, it is NP-hard to approximate the chromatic number within V(G) ε0 for some | | positive constant ε0 as shown by Lund and Yannakakis [19]. 8.1.2 Lower bounds for χ(G) Clearly, the complete graph Kn requires n colours, so χ(Kn)=n. Together with Proposition 8.1, it yields the following. Proposition 8.5. χ(G) ω(G). ≥ This bound can be tight, but it can also be very loose. Indeed, for any given integers k l, ≤ there are graphs with clique number k and chromatic number l. For example, the fact that a graph can be triangle-free (ω(G) 2) and yet have a large chromatic number has been estab- ≤ lished by a number of mathematicians including Descartes (alias Tutte) [7] (See Exercise 8.8), Kelly and Kelly [17] and Zykov [29]. We present here a proof of this fact due to Mycielski [21]. Theorem 8.6. For every positive integer k, there exists a triangle-free k-chromatic graph. Proof. The Mycielski graphs M , k 1 are defined inductively as follows. M = K and k ≥ 1 1 M = K . For k 2, let V(M )= v ,v ,...,v . The graph M is defined by V(M )= 2 2 ≥ k { 1 2 n} k+1 k+1 V(M ) w ,w ,...,w ,z and E(M )=E(M ) w v ,v v E(M ) w z,1 i n . k ∪{ 1 2 n } k+1 k ∪{ i j i j ∈ k }∪{ i ≤ ≤ } See Figure 8.2. Let us show by induction on k 1 that M is triangle-free and k-chromatic, the result ≥ k+1 holding trivially for k = 1. Let us first show that it is triangle-free. W = w ,w ,...,w is a stable set of M and z is { 1 2 n} k+1 adjacent to no vertex of Mk. So z is in no triangle. In addition, if there is a triangle T in Mk+1, then two of the three vertices must belong to Mk and the third vertex must belong to W, say V(T)= w ,v ,v . Since w is adjacent to v and v , by definition of M it follows that v is { i j k} i j k k+1 i also adjacent to v j and vk. Hence vi, v j and vk induce a triangle in Mk, which is a contradiction. Thus, as claimed, Mk+1 is triangle-free. 116 CHAPTER 8. GRAPH COLOURING v1 w1 v2 w2 v3 z w3 v1 w1 z v4 w4 v2 w2 v5 w5 M2 M3 M4 Figure 8.2: The graphs M2, M3 and M4. Next, we show that χ(Mk+1)=k + 1. Since Mk is a subgraph of Mk+1, by Proposition 8.1, χ(M ) k. Let a k-colouring of H in 1,...,k be given. Assign to w the same colour k+1 ≥ { } i that is assigned to v for 1 i n and assign k + 1 to z. The obtained colouring is a proper i ≤ ≤ (k + 1)-colouring of M and so χ(M ) k + 1. Suppose that χ(M )=k. Then there k+1 k+1 ≤ k+1 is a k-colouring of M with colours 1,...,k . Without loss of generality, we may ssume k+1 { } that z is coloured k. Then no vertex of W is coloured k. For each vertex vi of Mk coloured k, recolour it with the colour assigned to wi. Because the neighbours of vi are also neighbours of w , this produces a proper colouring of M . Moreover this colouring uses k 1 colours. This is i k − a contradiction, thus χ(M ) k + 1 and so χ(M )=k + 1.