• date post

24-Feb-2016
• Category

## Documents

• view

82

0

Embed Size (px)

description

Graph Coloring. prepared and Instructed by Shmuel Wimer Eng. Faculty, Bar-Ilan University. Vertex Coloring. A k -coloring of a graph G is a labeling f : V ( G ) → { 1,…, k } . - PowerPoint PPT Presentation

### Transcript of Graph Coloring

PowerPoint Presentation

March 2014Graph Coloring1Graph Coloring

prepared and Instructed by Shmuel WimerEng. Faculty, Bar-Ilan University

Vertex ColoringMarch 2014Graph Coloring2A k-coloring of a graph G is a labeling f : V(G) { 1,,k }.A coloring is proper if no two vertices x and y, connected with an edge have same color, xy E(G) => f(x) f(y).G is k-colorable if it has proper k-coloring.The chromatic number (G) is the smallest k such that G has proper k-coloring. G is called k-chromatic.If (G) = k, but (H) < k for every proper subgraph H, then G is k-critical.March 2014Graph Coloring3The vertices having same color in a proper k-coloring must be independent. Therefore, (G) is the minimum number of independent sets covering G.Hence, G is k-colorable iff G is k-partite. Examples. Every bipartite graph is 2-colorable.Every even cycle graph is 2-colorable (it is bipartite).Every odd cycle graph is 3-colorable and 3-critical.2-colorability can be tested with BFS. (How?)We compute the distance from a vertex u. A connected graph is bipartite iff G[X] and G[Y] are independent sets, where X and Y are vertices of even and odd distance from u, respectively.March 2014Graph Coloring4Is (G) > (G) possible?KsYes, (G) may exceed (G)!sssssC5Could it be constructed with C3 rather than C5?4March 2014Graph Coloring5Upper Bounds of Chromatic NumberMarch 2014Graph Coloring6Better than (G) n(G) upper bounds can be obtained by coloring algorithms. A greedy algorithm w.r.t V(G) order v1,,vn , assigns to vi the smallest color index not incident so far to vi. Proposition. There is (G) (G) + 1. ((G) is the largest vertex degree.) Proof. By construction. A vertex has no more than (G) neighbors. Upon vi coloring there must be at least one of 1,, (G)+1 colors unused. March 2014Graph Coloring7Different orderings may yield smaller upper bounds. Finding the best ordering is hard. Is there an ordering yielding (G)? It can be shown that such one exists.Example. Register allocation and interval graphs.Consider the registers used by a compiler, each has start and end time. What is the smallest number of physical registers that can be used? Assign the symbols a, b, c, to the registers in the code, and draw their usage time intervals. abcdefgProposition. If G is an interval graph then (G) = (G).March 2014Graph Coloring8Proof. By left-to-right traversal of the time intervals, pre sorted by their starting time. Initializing k=0. Increasing to k+1 at starting point and decreasing to k-1 at ending point. The bound (G) (G)+1 may still be very poor. For (n+1)-vertex star graph (G) = n, whereas (G) = 2.For (n+1)-vertex wheel graph (G) = n, whereas (G) 4.March 2014Graph Coloring9The bound (G) (G)+1 can be further improved by considering the vertices with high degree first.Proof. When vertex i is colored, at most min { di , i-1 } of its neighbors have already been colored. Its color is therefore 1 + min{ di , i-1 }. Maximization over i yields the upper bound. March 2014Graph Coloring10Lemma. If H is k-critical graph, then (H) k-1.Proof. Assume in contrary that (H) < k-1. Let x H be a vertex for which dH(x) < k-1.Since H is k-critical, H-x is by definition (k-1)-colorable, so let us use any k-1 colors to properly color H-x.Since dH(x) < k-1, N(x) consume k-2 colors at most. Let us color x by one of the k-1 not consume by N(x). The minimum degree (G) in G can also be used to deduce upper bounds. March 2014Graph Coloring11Coloring of Directed GraphsMarch 2014Graph Coloring12Proof. Let G be a maximal acyclic sub digraph of G (not necessarily a tree).GGG must have some vertices with outgoing arcs only. March 2014Graph Coloring13Define f(v) to be a coloring function assigning color 1+l(v) to vertex v.f is strictly increasing along a path in G using colors 1+l(G) on V(G) = V(G). For each edge uv E(G) there exists a path in G between u and v, since either there was uv E(G) or the edge is closing a cycle of G.GG1123456March 2014Graph Coloring14That implies f(u) f(v) since f increases along paths of G.Consequently, f is a proper coloring and (G) 1 + l(G). To prove the existence of an orientations of Gs edges satisfying (G) = 1 + l(G), an orientation satisfying (G) 1 + l(G) is shown. Each edge uv E(G*) is oriented u v iff f(u) < f(v). Since f is a proper coloring, this defines an orientation. Let f be an optimal coloring satisfying f(G) = (G). We derive a digraph G* as follows. March 2014Graph Coloring15Since the color labels along paths in G* strictly increase, and there are only (G) labels, there is l(G*) (G*) 1, hence (G*) = 1 + l(G*). 1234GG*Brooks TheoremMarch 2014Graph Coloring16March 2014Graph Coloring17March 2014Graph Coloring18March 2014Graph Coloring192nd case: G is not 2-connected.March 2014Graph Coloring20March 2014Graph Coloring21March 2014Graph Coloring22Chromatic PolynomialsMarch 2014Graph Coloring23We shall associate with any graph a function telling whether or not it is 4-colorable.This study was motivated by the hope to prove the Four-Color Theorem, which by that time was a conjecture.March 2014Graph Coloring24March 2014Graph Coloring25March 2014Graph Coloring2626Corollary. The chromatic function is a polynomial.March 2014Graph Coloring27The process is finite. It ends with producing complete graphs, whose chromatic functions are polynomial.The chromatic function is therefore a finite sum of polynomials, which must be polynomial too. Example. Scheduling feasibility. Lectures scheduling is in order, for which some time slots are given (e.g. campus is open). There is no limit on available rooms. March 2014Graph Coloring28It is known that some lectures cannot take place in parallel (e.g. some students are registered to both).Is scheduling feasible? How many schedules there are?March 2014Graph Coloring29Example.=+=+++March 2014Graph Coloring30=+++2Edge ColoringMarch 2014Graph Coloring31An edge coloring is proper if adjacent edges have different colors. All coloring henceforth are assumed proper.March 2014Graph Coloring32March 2014Graph Coloring33March 2014Graph Coloring34Edge Coloring of Bipartite GraphsMarch 2014Graph Coloring35March 2014Graph Coloring36March 2014Graph Coloring37March 2014Graph Coloring38Upper Bound of Edge Chromatic NumberMarch 2014Graph Coloring39March 2014Graph Coloring40March 2014Graph Coloring41March 2014Graph Coloring42March 2014Graph Coloring43PMarch 2014Graph Coloring44March 2014Graph Coloring45March 2014Graph Coloring46March 2014Graph Coloring47Line GraphsMarch 2014Graph Coloring48Many questions about vertices have natural analogues involving edges.Independent sets have no pairs of adjacent vertices; matchings have no adjacent edges.Vertex coloring partitions the vertices into independent sets; edges can be partitioned into matching.Line Graphs CharacterizationMarch 2014Graph Coloring49Since an edge connects two vertices, those vertices imply two cliques at most.March 2014Graph Coloring50March 2014Graph Coloring51cliquecliqueimpossible=>Krauszs theorem does not directly yield an efficient test for line graph, which the following does. March 2014Graph Coloring52