# Graph Theory Chapter 10 Coloring Graphs - PowerPoint PPT Presentation

Graph Theory Chapter 10 Coloring Graphs

1 / 31
Graph Theory Chapter 10 Coloring Graphs

## Graph Theory Chapter 10 Coloring Graphs

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
##### Presentation Transcript

1. Graph TheoryChapter 10Coloring Graphs 大葉大學(Da-Yeh Univ.)資訊工程系(Dept. CSIE)黃鈴玲(Lingling Huang)

2. Outline 10.1 Vertex Colorings 10.2 Chromatic Polynomials 10.3 Edge Colorings 10.4 The Four Color Problem

3. 10.1 Vertex Colorings Focus:Partition the vertex (edge) set of an associatedgraph so that adjacent vertices (edges) belong to different sets of the partition.

4. Definition: A set S of vertices in a graph G is independent if no two vertices of S are adjacent in G. 應用:(1) 化學藥品存放，避免交互作用。(2) 水族館設計，會互相捕食的魚不能放同一個水族箱。 Definition: An independent set S of vertices in a graph G is called a maximal independent set if S is not a proper subset of any other independent set of vertices of G. The maximum cardinality of an independent set of vertices of G is called the independence number of G and is denoted by b(G).

5. Fig 10-1 A graph G with b(G) = 4, w(G) = 4, s(G) = 2. Definition: A clique in a graph G is a maximal complete subgraph. The maximum order of a clique is the clique number of G and is denoted by w(G).

6. Fig 10-1 A graph G with b(G) = 4, w(G) = 4, s(G) = 2. Definition: A set S of vertices in a graph G is a dominating set if every vertex not in S is adjacent to a vertex in S. A dominating set S is a minimal dominating set if no proper subset of S is also a dominating set. The domination numbers(G) of G is the minimal cardinality of a dominating set of G.

7. Since S is maximum,every vertex v S must be adjacent to at least one vertex of S. Theorem 10.1: For every graph G,s(G)  b(G). Proof. Let S be a maximum independent set of G. |S| = b(G) S is also a dominating set. s(G)  |S| = b(G)

8. Determining b(G), w(G), and s(G),areNP-complete problems. The Independence Number Problem: For a given graph G of order p and positive integer k  p, isb(G)  k? The Clique Number Problem: For a given graph G of order p and positive integer k  p, isw(G)  k? The Domination Number Problem: For a given graph G of order p and positive integer k  p, iss(G)  k?

9. 不找最大的independent set， 改找較大的independent set  改找最少組互斥的independent set使它們形成V(G)的partition Definition: A coloring of a graph G is an assignment of colors (elements of some set) to the vertices of G,so that adjacent vertices are assigned distinct colors. If n colors are used, then the coloring is referred to as an n-cloloring of G. Every coloring of a graph G produces a partition of V(G) into independent sets, called color classes. If there exists an n-coloring of a graph G, then G is n-colorable.

10. Definition: The minimum n for which a graph G is n-colorable is called the chromatic numberof G, and is denoted by c(G). A graph G with chromatic number n is also called n-chromatic. Fig 10-3  K4  c(G)  4 G 1  4-coloring  c(G)  4 2 3  c(G) = 4 1 1 1 4

11. The Chromatic Number Problem: For a given graph G of order p and positive integer b with2 < b  p, isc(G)  b? It is also an NP-complete problem. (1) c(Kp) = pfor every positive integer p. (2) c(Cp) = 3if n  3is odd. c(Cp) = 2if n  4is even. (3)c(Km,n) = 2for every pair m,n of positive integers.

12. Theorem 10.2: A graph is 2-colorable if and only if it is bipartite. Theorem 10.3: Let G bea connected graph with maximum degree D=D(G). Then(i) w(G) c(G)  1 + D. (ii) c(G)  D if and only if G is neither a complete graph nor an odd cycle. (此部分稱為Brooks theorem)

13. Proof. (i)w(G) c(G),trivial. (i) 證明c(G)  1 + D: Since each vertex has degree D. If there are 1+D colors, any vertex can be colored by a color different with all its neighbors. There is a(1 + D)-coloring of G.  c(G)  1 + D (ii) 證明跳過

14. Example (1) Kn K2: w = n, D = n  c =n There are graphs for which D=c. (2) Kn,n: w = 2, c = 2,D = n There are graphs for which D-c is arbitrarily large. There are also graphs for which c-w is large. Definition: A graph G is called F-free if G does not contain an induced subgraph isomorphic to F. Example: Cn (n4) and Km,n are triangle-free graphs.

15. Theorem 10.4: (Mycielski’s Theorem) For every positive integer n, there exists an n-chromatic, triangle-free graphs. Proof.(by induction on n) (Basis) n=1: K1 n=2: K2 n=3: C5 (Inductive)Assume that H is a triangle-free graph with c(H) = k, where k  3. We will show that there exists a triangle-freegraph with chromatic number k+1.

16. v1 u1 u u5 v5 Suppose V(H) = {v1, v2, …, vp}. Let G be a graph with V(G)=V(H) U { u1, u2, …, up } U { u } . E(G) = E(H) U { uivj| vivj E(H), 1 i, j  p} U { uiu| 1 i  p} Fig 10-5 The Grötzsch graph (c=4, triangle-free) H G It is clear that G is triangle-free. It remains to show that c(G)=k+1. Let c be a k-coloring of H. Let c’ be a coloring of G with c’(vi)=c(vi), i, and c’(u)=k+1. c’(ui)=c(vi), i,

17. It is clear that c’ is a (k+1)-coloring of G. So c(G) k+1. If G has a k-coloring, say b, with colors 1, 2, …, k. Since u is adjacent to every vertex ui, b(u)  b(ui), i. Suppose b(u) = k, then the vertices ui are colored by 1, 2, …, k-1. Since c(H) = k, there are some vertices of Hcolored by k. Recolor each vertex vi havingb(vi) = k with thecolor b(ui). A (k-1)-coloring of H produced.   c(G)=k+1

18. Algorithm 10.1(Sequential Coloring Algorithm)[To produce a coloring of G with V(G)= {v1, v2, …, vp}.] 1. i 1 (正在 visit 的點是vi) 2. c1 (預計著於點 vi 的顏色) 3.3.1 Sort the colors adjacent with vi in nondecreasing order and call the resulting list Li. 3.3.2 If c does not appear on Li, then assign color c to vi, and go to Step 5; otherwise, continue. 4. c c +1 5. If i < p, then i  i +1, and return to Step 2; otherwise, stop.

19. G v1 v4 v2 v5 v6 v3 Figure 10-6 1 Alg 10.1用了3色 2 2 但實際只需2色 點的編號會影響著色結果 3 3 1 For any graph G of order p, there are p! possible ways to label the vertices. p!中必有一種編號方式可使 Alg 10.1 使用剛好c(G)色

20. u1 v1 u2 v2 u3 v3 … … un vn Figure 10-7 G: V(G) = {v1, u1, v2, u2, …, vn, un}. E(G) = { uivj | i j } 1 1 最糟時，可能給此種bipartite graph 著 n 色 2 2 3 3 n n

21. ※Consider graphs whose chromatic numberis decreased upon the removal of any vertex. Note that c(G-v) = c(G) or c(G)-1. Definition: A graph G is critically n-chromatic, n 2,ifc(G) =n and c(G-v) =n-1 for every vertex v of G. • Example: • Cn (n is odd) is critically 3-chromatic. • Kn is critically n-chromatic. Note. Every graph with chromatic number n 2 contains a critically n-chromatic subgraph.

22. Theorem 10.5Let G be a critically n-chromatic graph (n  2). Then d(G)n - 1. Proof. Suppose v is a vertex of degree < n - 1. G is a critically n-chromatic  c(G - v) =n - 1. There is an (n - 1)-coloring ofG - v. deg(v) < n - 1  all neighbors of v are colored by at most n-2 colors. G has an (n - 1)-coloring. 

23. Homework Exercise 10.1: 1, 3, 7, 10, 14

24. Outline 10.1 Vertex Colorings 10.2 Chromatic Polynomials 10.3 Edge Colorings 10.4 The Four Color Problem

25. 10.2 Chromatic Polynomials Focus.計算有多少種不同的著色方法 Note. Two colorings of a labeled graph G are considered different if they assign different colorsto the same vertex of G. Definition. The chromatic polynomial f(G,t) of graph G is the number of different colorings of G that use t or fewer colors. Note. If t < c(G), then f(G,t)= 0.

26. K4 v1 v2 v3 v4 f(K4, t) = t4 f(Kp, t) = tp Figure 10-8 K4 t - 1 u v t t t w x t - 3 t t - 2 t f(K4, t) = t(t-1)(t-2)(t-3) f(Kp, t) = t(t-1)(t-p+1)

27. C4 v1 v2 v3 v4 Figure 10-9 K1,4 t -1 t u1 u2 t t -1 t -1 u t -2 t -2 1 t -1 u3 u4 t -1 t -1 If c(v2) = c(v3): f(K1,4, t) = t(t-1)4 t  (t-1)  1 (t-1) If c(v2) c(v3): t  (t-1)  (t-2)2  f(C4, t) = t (t-1) (t2 -3t+3)

28. C4 v1 v2 =v3 v1 v2 v4 v3 v4 v1 v2 v3 v4 相當於 If c(v2) = c(v3): = If c(v2) c(v3):

29. uv 著不同色 uv 著同色 Definition. For a graph G with nonadjacent vertices u and v, Let G:u=v be a graph withV(G:u=v) = V(G)-{v}, E(G:u=v)={ eE(G) | eis not incident with v} U { uw | vw E(G)}. 即將 u 及 v 變成同一點 Theorem 10.6. If u and v are nonadjacent vertices in a , noncomplete graph G, thenf(G,t) = f(G+uv,t) + f(G:u=v,t)

30. u u u v v v u v Figure 10-11 + = = 2 + + = + 3 +  f(P4, t) = t(t-1)(t-2)(t-3) + 3t(t-1)(t-2) + t(t-1)

31. Homework Exercise 10.2: 1