Graph Coloring prepared and Instructed by Shmuel Wimer Eng. Faculty, Bar-Ilan University March 2014 Graph Coloring 1 Vertex Coloring A 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 2014 Graph Coloring 2 The 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 2014 Graph Coloring 3 The largest clique size ω(G) satisfies χ(G) ≥ ω(G). The largest independent set size α(G) satisfies χ ๐ฎ ≥ ๐ ๐ฎ ๐ถ ๐ฎ , since every color class is an independent set, therefore having at most ๐ผ ๐บ vertices. Yes, χ(G) may exceed ω(G)! Is χ(G) > ω(G) possible? s C5 s s s s Ks Proper coloring of Ks requites s colors. ๐ ๐บ = ๐ + 2, but χ ๐บ = ๐ + 3. Hence χ(G) > ω(G). Could it be constructed with C3 rather than C5? March 2014 Graph Coloring 4 Example. Minimizing exam period in school. How to schedule exams in as few parallel sessions as possible, where now two concurrent exams have a common student? Define ๐บ ๐, ๐ธ , where ๐ฃ ∈ ๐ corresponds to a course, and ๐ ๐ข, ๐ฃ ∈ ๐ธ iff courses ๐ข and ๐ฃ have a common student. Then an independent set of vertices implies a parallel exam session, and χ(G) is the smallest number of parallel sessions. Example. Chemical storage. ๐ different chemicals, of which the interaction between some pairs is explosive, should be stored. What is the smallest required number of compartments in the storage? χ(G). March 2014 Graph Coloring 5 Upper Bounds of Chromatic Number Easy bounds are χ(G) ≤ n(G), χ(G) ≥ ω(G), and ๐ ๐บ ≥ ๐ ๐บ ๐ผ ๐บ , all hold with equality for cliques. Better 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 2014 Graph Coloring 6 Different 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. a b f c d e g Proposition. If G is an interval graph then χ(G) = ω(G). March 2014 Graph Coloring 7 Proof. 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 2014 Graph Coloring 8 The bound χ(G) ≤ โ(G)+1 can be further improved by considering the vertices with high degree first. Proposition. (Welsh-Powell 1967) If the vertices are ordered in non increasing degree, d1 ≥ d2 ≥ … dn, then ๐ ๐ฎ ≤ ๐ + ๐ฆ๐๐ฑ ๐ฆ๐ข๐ง ๐ ๐ , ๐ − ๐ . ๐ 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 2014 Graph Coloring 9 The minimum degree δ(G) in G can also be used to deduce upper bounds. Lemma. 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). We managed to properly color H with k-1 colors, which contradicts with H being k-critical graph (๐ ๐บ = ๐). โ March 2014 Graph Coloring 10 Corollary. (Szekeres-Wilf 1968) χ ๐บ ≤ 1 + max ๐ฟ ๐ป . ๐ป⊆๐บ Proof. Let ๐ = χ(๐บ) and ๐ป′ be a ๐-critical subgraph of ๐บ. By the above lemma χ ๐บ − 1 = ๐ − 1 ≤ ๐ฟ ๐ป′ . There is also ๐ฟ ๐ป′ ≤ max ๐ฟ ๐ป , yielding the desired bound. โ March 2014 ๐ป⊆๐บ Graph Coloring 11 Coloring of Directed Graphs Theorem. Let a graph G be directed with longest path l(G), then ๐ ๐ฎ ≤ ๐ + ๐ ๐ฎ . Furthermore, there are orientations of G’s edges such that equality holds. G G’ Proof. Let G’ be a maximal acyclic sub digraph of G (not necessarily a tree). G’ must have some vertices with outgoing arcs only. March 2014 Graph Coloring 12 2 G 4 3 1 5 G’ 6 1 Define 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. March 2014 Graph Coloring 13 That 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 G’s edges satisfying χ(G) = 1 + l(G), an orientation satisfying χ(G) ≥ 1 + l(G) is shown. Let f be an optimal coloring satisfying f(G) = χ(G). We derive a digraph G* as follows. Each edge uv ฯต E(G*) is oriented u → v iff f(u) < f(v). Since f is a proper coloring, this defines an orientation. March 2014 Graph Coloring 14 Since 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*). โ 1 2 G G* 3 4 March 2014 Graph Coloring 15 Brook’s Theorem The bound χ ๐บ ≤ โ ๐บ + 1 holds for any graph. Brook showed that cliques and odd cycles are essentially the only graphs where χ ๐บ = โ ๐บ + 1 holds. Theorem. (Brook 1941) If ๐บ is connected and other than a clique or an odd cycle, then ๐ ๐ฎ ≤ โ ๐ฎ . Proof. Let ๐บ have ๐ nodes and be connected, neither a clique, nor an odd cycle. Let k = โ ๐บ and assume ๐ ≥ 3, as otherwise for ๐ = 1 it is a clique, and bipartite or an odd cycle for ๐ = 2. March 2014 Graph Coloring 16 Consider first the case where ๐บ is not k-regular. Choose a vertex ๐ฃ๐ for which ๐ ๐ฃ๐ < ๐ and grow a spanning tree rooted at ๐ฃ๐ (by any search, e.g. BSF). Index the vertices in decreasing order as they are being reached by the search, yielding the order ๐ฃ1 , ๐ฃ2 , … , ๐ฃ๐ . Each vertex other than ๐ฃ๐ has a higher-indexed neighbor along its path to root, hence it has at most ๐ − 1 lower-indexed neighbors. Using the greedy coloring with the vertex decreasing order obtains proper ๐-coloring. March 2014 Graph Coloring 17 In the remaining cases G is ๐-regular. 3 cases possible. 1st case: ๐บ is 1-connected. Let ๐ฅ be a cut-vertex. ๐ฎ′ ๐ฅ ๐ฎ Let ๐บ′ be a component of ๐บ − ๐ฅ together with ๐ฅ. The degree of ๐ฅ in ๐บ′ is less than ๐ and a proper ๐coloring is possible. March 2014 Graph Coloring 18 That can repeat for every components of ๐บ − ๐ฅ, yielding ๐-proper coloring for each (๐ฅ included). By permuting colors of the subgraphs, we can make the colorings agree on ๐ฅ, yielding ๐-proper coloring of ๐บ. 2nd case: G is not 2-connected. Find a vertex ๐ฃ๐ with two non adjacent neighbors ๐ฃ1 and ๐ฃ2 (why such exist?) whose deletion leaves a connected subgraph (otherwise G was 2-conncted). ๐ฃ2 ๐ฃ1 ๐ฃ๐ March 2014 Graph Coloring 19 ๐บ − ๐ฃ1 , ๐ฃ2 is connected and a spanning tree rooted at ๐ฃ๐ can be constructed (e.g. BFS). The labels 3, … , ๐ are assigned to the vertices in decreasing order as they are reached. Starting coloring from ๐ฃ1 and ๐ฃ2 , they use same color. Each vertex other than ๐ฃ๐ has then at most ๐ − 1 lowerindexed neighbors so ๐ colors can be used for those. ๐ฃ๐ has ๐ neighbors, of which ๐ฃ1 and ๐ฃ2 already used the same color. The rest neighbors used at most other ๐ − 2 colors, and ๐ฃ๐ can therefore be properly colored. All in all, ๐ proper coloring of ๐บ has been obtained. March 2014 Graph Coloring 20 3rd case: G is 2-connected. Choose a vertex ๐ฅ such that vertex connectivity ๐ฟ ๐ฎ − ๐ = ๐. That is possible by choosing ๐ฅ to be one of the two disconnecting vertices. ๐ฃ1 ๐ฃ2 ๐ฅ = ๐ฃ๐ ๐ฅ has a neighbor in every block of ๐บ − ๐ฅ obtained by deleting the 2nd vertex in a cut-set, otherwise ๐บ was 1connected rather than 2-connected. March 2014 Graph Coloring 21 There is no edge connecting ๐ฃ1 and ๐ฃ2 since they reside in different blocks. ๐บ − ๐ฅ, ๐ฃ1 , ๐ฃ2 is connected since blocks have no cutvertices and ๐ฃ1 , ๐ฃ2 are not such. ๐ ≥ 3 implies ๐บ − ๐ฃ1 , ๐ฃ2 is also connected. All in all this is the same situation as the case of ๐บ not 2connected. โ Brook’s Theorem implies that the cliques and the odd cycles are the only (๐ − 1)-regular ๐-critical graphs. (Homework) March 2014 Graph Coloring 22 Chromatic Polynomials We 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 FourColor Theorem, which by that time was a conjecture. Let ๐๐บ ๐ denote the number of proper colorings of a graph ๐บ with ๐ colors. ๐๐บ ๐ is called the chromatic function of ๐บ. Example. ๐๐บ ๐ = ๐ ๐ − 1 2 . The first vertex can be colored in ๐ ways, while each of the other two in ๐ − 1 ways. March 2014 Graph Coloring 23 For a tree ๐ of ๐ vertices there is ๐๐ ๐ = ๐ ๐ − 1 ๐−1 . For ๐บ = ๐พ3 there is ๐๐บ ๐ = ๐ ๐ − 1 ๐ − 2 and for ๐บ = ๐พ๐ there is ๐๐บ ๐ = ๐ ๐ − 1 ๐ − 2 … (๐ − ๐ + 1). If ๐ < χ ๐บ ๐๐บ ๐ > 0. then ๐๐บ ๐ ≤ 0. For ๐ ≥ χ ๐บ there is The Four-Color Theorem for planar graph ๐บ states that ๐๐บ 4 > 0. It is difficult to compute ๐๐บ ๐ by inspection, but it can be systematically obtained as a sum of chromatic functions of complete graphs. March 2014 Graph Coloring 24 Theorem. Let ๐ข, ๐ฃ ∈ ๐(๐บ) be not incident, and let ๐บ1 be obtained by adding the edge ๐ข๐ฃ to ๐บ , and ๐บ2 be obtained by identifying ๐ข and ๐ฃ in ๐บ. Then ๐ท๐ฎ ๐ = ๐ท๐ฎ๐ ๐ + ๐ท๐ฎ๐ ๐ . ๐ ๐−1 ๐−2 ๐ข ๐ฃ ๐บ 2 = ๐ข ๐ฃ ๐บ1 ๐ข๐ฃ ๐บ2 ๐ ๐ − 1 ๐ − 2 ๐ − 3 +๐ ๐ − 1 ๐ − 2 March 2014 Graph Coloring 25 Proof. In a proper coloring of ๐บ, ๐ข and ๐ฃ may have either the same color or different colors. The number of proper colorings where ๐ข and ๐ฃ have different colors does not change if an edge ๐ข๐ฃ would exist, yielding ๐๐บ1 ๐ . Similarly, the number of proper colorings where ๐ข and ๐ฃ have same color does not change if an ๐ข and ๐ฃ are merged, yielding ๐๐บ2 ๐ . โ Corollary. The chromatic function is a polynomial. Proof. The procedure of the theorem results in two graphs. In ๐บ1 the number of edges is increased. In ๐บ2 the number of vertices is decreased. March 2014 Graph Coloring 26 The 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. โ For ๐-vertex graph ๐บ the degree of ๐๐บ ๐ is ๐, the coefficient of ๐ ๐ is 1 and that of ๐ ๐−1 is ๐ธ ๐บ , the sign of the coefficients is alternating, and the free coefficient is zero. (Homework). 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 2014 Graph Coloring 27 It 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? Solution. Define a graph ๐บ ๐, ๐ธ where ๐ฃ ∈ ๐ corresponds to a lecture, and ๐ ๐ข, ๐ฃ ∈ ๐ธ corresponds to lectures that cannot be scheduled simultaneously. Derive the chromatic polynomial ๐๐บ ๐ , where ๐ is the number of time slots. Given ๐, valuation of ๐๐บ ๐ yields the number of distinct schedules. ๐๐บ ๐ ≤ 0 indicated non existence of feasible scheduling. โ March 2014 Graph Coloring 28 Example. ๐๐บ ๐ = ๐๐ − ๐๐๐ + ๐๐ 3 − ๐๐ 2 + ๐๐ = = March 2014 + + + Graph Coloring + 29 = + +2 =๐ ๐−1 ๐−2 ๐−3 + ๐๐บ ๐ + 3๐ ๐ − 1 ๐ − 2 ๐−4 ๐−3 + 2๐ ๐ − 1 ๐ − 2 5 − 7๐ 4 + 19๐ 3 − 23๐ 2 + 10๐ = ๐ Graph Coloring March 2014 30 Edge Coloring A ๐-edge-coloring of a graph ๐บ is a labeling ๐: ๐ธ ๐บ → 1,2, … , ๐ . Edge coloring partitions ๐ธ ๐บ into ๐ sets (some possibly empty) ๐ธ1 , ๐ธ2 , … , ๐ธ๐ . An edge coloring is proper if adjacent edges have different colors. All coloring henceforth are assumed proper. March 2014 Graph Coloring 31 Edge coloring thus partitions ๐ธ ๐บ into ๐ sets ๐1 , ๐2 , … , ๐๐ of matchings. (Only loopless graphs admit proper edge coloring). ๐บ is k-edge-colorable if it has ๐-edge-coloring. Clearly, ๐บ is ๐-edge-colorable, where ๐ = |๐ธ(๐บ)|. The edge chromatic number ๐′(๐ฎ) is the smallest ๐ such that ๐บ has ๐ -edge-coloring. ๐บ is called ๐ -edgechromatic. Clearly, ๐′ ๐ฎ ≥ โ ๐ฎ . Not 3-edge-colorable, hence ๐′(๐บ) = 4. March 2014 Graph Coloring 32 Example. Timetabling. ๐ teachers ๐ฅ1 , ๐ฅ2 , …, ๐ฅ๐ and ๐ classes ๐ฆ1 , ๐ฆ2 , …, ๐ฆ๐ are given. Teacher ๐ฅ๐ is required to teach class ๐ฆ๐ a lessen of period ๐๐๐ . Schedule a complete timetable having minimum total duration. Solution. The scheduling is represented by a bipartite graph ๐ป ๐, ๐ , ๐ = ๐ฅ1 , ๐ฅ2 , …, ๐ฅ๐ , ๐ = ๐ฆ1 , ๐ฆ2 , …, ๐ฆ๐ vertices ๐ฅ๐ and ๐ฆ๐ are connected with ๐๐๐ parallel edges. The minimum number of colors required for ๐ป edgecoloring ensures minimum duration. • No schedule overlap for a teacher. • No lesson overlap for a class. • No two lesson schedules overlap in a class. โ March 2014 Graph Coloring 33 Homework. 1. Show that a ๐ -regular graph ๐บ ๐, ๐ธ is ๐ -edge colorable iff ๐ธ can be partitioned into perfect matchings. 2. Show by an appropriate edge coloring that ๐ ′ ๐พ๐,๐ = max ๐, ๐ . 3. Given graph ๐บ ๐, ๐ธ , |๐| = ๐, |๐ธ| = ๐, show that ๐ ′ ๐บ ≥ 2๐ ๐ . 4. Eight schoolgirls go for a walk in pairs every day. Can they arrange their outgoing so that every girl has a different companion at every day of the week? March 2014 Graph Coloring 34 Edge Coloring of Bipartite Graphs Let the subgraph ๐ป span ๐บ (๐ ๐ป = ๐ ๐บ ), and ๐ถ โถ = ๐1 , ๐2 , … , ๐๐ be a ๐-edge-coloring of ๐ป. A color is available for an edge ๐ ∈ ๐ธ ๐บ \๐ธ ๐ป if it is available in its two end vertices. If ๐ is uncolored, any of its available colors can be assigned to extend ๐ถ to a ๐-edge-coloring of ๐ป + ๐. For ๐ ≠ ๐ , each component of ๐ป๐๐ โ ๐ป ๐๐ ∪ ๐๐ either an even cycle or a path (called ๐๐-path). (why?) is Theorem. If ๐บ is bipartite then ๐′ ๐บ = โ ๐บ . March 2014 Graph Coloring 35 Proof. By induction on ๐ = ๐ธ ๐บ . Let ๐ = ๐ข๐ฃ ๐ ๐ธ ๐บ . Assume that ๐ป = ๐บ\๐ has a โ−edge−coloring ๐1 , ๐2 , … , ๐โ . If a color is available for ๐ we are done. Otherwise, each of the Δ colors is represented either at ๐ข or at ๐ฃ. Since the degrees of ๐ข and ๐ฃ in ๐บ\๐ are Δ − 1 at most, there are colors ๐ ≠ ๐, where ๐ is available at ๐ข and exists in ๐ฃ, and ๐ is available at ๐ฃ and exists in ๐ข. Consider the subgraph ๐ป๐๐ = ๐ป ๐๐ ∪ ๐๐ . Because ๐ข has a degree one in ๐ป๐๐ , the component containing ๐ข is an ๐๐path ๐ท. March 2014 Graph Coloring 36 ๐ข ๐ ๐ข ๐ ๐ ๐ ๐ฃ ๐ฃ ๐ cannot terminate at ๐ฃ. If it did, it would started from ๐ข with color ๐ and end at ๐ฃ with color ๐, hence comprising even number of edges. ๐ + ๐ would then be an odd cycle in ๐บ, impossible for a bipartite graph. Interchanging the colors of ๐, a new Δ-edge-colorable ๐ป is obtained, where color ๐ is available at both ๐ข and ๐ฃ. Assigning color ๐ to ๐ obtains a Δ-edge-coloring of ๐บ. โ March 2014 Graph Coloring 37 Upper Bound of Edge Chromatic Number Clearly, ๐ ′ ๐บ ≥ โ ๐บ , and for bipartite graphs there is ๐′ ๐บ = โ ๐บ . What can be said about an upper bound? Surprisingly, it is very tight. Theorem. (Vizing 1964, Gupta 1966). Let ๐บ be a simple graph (no parallel edges, loopless). Then ๐′ ๐ฎ ≤ โ ๐ฎ + ๐. Proof. Let ๐บ′ be a proper subgraph of ๐บ, edge-colored with โ ๐บ + 1 colors, but ๐ข๐ฃ could not be colored. We present a recoloring procedure to include ๐ข๐ฃ. March 2014 Graph Coloring 38 Since more than โ ๐บ colors are used, every vertex has a missing color. Let ๐๐ be missing at ๐ข and ๐๐ be missing at ๐ฃ. (๐๐ must be presented at ๐ฃ and ๐๐ at ๐ข.) ๐ข ๐ข ๐ฃ ๐ฃ1 ๐ฃ Let ๐ฃ1 be a neighbor of ๐ข such that ๐ข๐ฃ1 is colored ๐๐ . Some color ๐๐ must be missing at ๐ฃ1 since โ ๐บ + 1 colors are used. March 2014 Graph Coloring 39 ๐ข ๐ฃ1 ๐ข ๐ฃ ๐ฃ1 ๐ฃ Suppose ๐๐ does not appear on ๐ข. We could recolor ๐ข๐ฃ1 with ๐๐ , free ๐๐ from ๐ข, and then color ๐ข๐ฃ with ๐๐ . So we suppose that ๐๐ appears on ๐ข. The process continues for ๐ ≥ 2. Finding a new color ๐๐ that appears at ๐ข, let ๐ฃ๐ be the neighbor of ๐ข such that the edge ๐ข๐ฃ๐ is colored ๐๐ . March 2014 Graph Coloring 40 At ๐ฃ๐ some color ๐๐+๐ must be missing. If ๐๐+๐ is missing at ๐ข, we downshift color ๐๐ from ๐ข๐ฃ๐ to ๐ข๐ฃ๐−1 for 1 ≤ ๐ ≤ ๐ (๐ข๐ฃ0 = ๐ข๐ฃ). ๐ฃ๐ ๐ฃ๐ ๐ฃ๐ ๐๐+๐ ๐๐+๐ ๐๐+๐ ๐ฃ2 ๐ข ๐ฃ1 ๐ฃ ๐ฃ2 ๐ข ๐ฃ1 ๐ฃ ๐ฃ2 ๐ข ๐ฃ1 ๐ฃ We are finished, unless ๐๐+๐ appears at ๐ข, in which case the process continues to ๐ฃ๐+1 and a color ๐๐+2 . There are only โ ๐บ + 1 colors, hence the repetitive selection of ๐๐+1 must eventually repeat a color. March 2014 Graph Coloring 41 Let ๐1 , … , ๐๐ be the shortest non repetitive color list such that ๐๐+1 is missing at ๐ฃ๐ and repeats one of ๐1 , … , ๐๐−1 . Let ๐๐+1 = ๐๐ for some 1 ≤ ๐ ≤ ๐ − 1. This color is missing at ๐ฃ๐−1 and appears on ๐ข๐ฃ๐ . ๐ฃ๐ ๐ฃ๐−1 ๐ฃ๐ ๐ข ๐ฃ ๐ฃ2 ๐ฃ1 If ๐ฃ๐ is missing ๐0 , we use ๐0 on ๐ข๐ฃ๐ and downshift colors from ๐ฃ๐ and to complete the augmentation. March 2014 Graph Coloring 42 Hence we assume that ๐0 appears at ๐ฃ๐ and ๐๐ does not. ๐ฃ๐ P ๐ฃ๐−1 ๐ฃ๐ ๐ข ๐ฃ ๐ฃ2 ๐ฃ1 Let ๐ be the longest alternating path of edges colored ๐0 and ๐๐ that begins at ๐ฃ๐ (with ๐0 ). ๐ is unique. (why?) Depending on the opposite end of ๐, recoloring can take place to complete the augmentation. There are three possibilities of ๐ end: at ๐ฃ๐ , at ๐ฃ๐−1 , and elsewhere. March 2014 Graph Coloring 43 ๐0 ๐๐ ๐0 ๐๐ ๐ฃ๐ ๐ฃ๐−1 ๐ฃ๐ ๐0 ๐ฃ๐ ๐๐ ๐ฃ๐−1 ๐ข ๐ฃ ๐ฃ2 ๐๐ ๐๐ ๐ฃ๐ ๐0 ๐ข ๐ฃ ๐ฃ2 ๐ฃ1 ๐ฃ1 If ๐ ends at ๐ฃ๐ , it is with ๐0 since ๐0 is presented at ๐ฃ๐ and ๐ข๐ฃ๐ is colored with ๐๐ . Downshifting colors from ๐ฃ๐ , interchanging colors along ๐, and coloring ๐ข๐ฃ๐ with ๐0 , completes the edge coloring augmentation. March 2014 Graph Coloring 44 ๐๐ ๐0 ๐ฃ๐−1 ๐0 ๐๐ ๐0 ๐ฃ๐ ๐ฃ๐ ๐๐ ๐ฃ๐−1 ๐ข ๐ฃ๐ ๐๐ ๐ข ๐ฃ ๐ฃ2 ๐๐ ๐ฃ๐ ๐ฃ ๐ฃ2 ๐ฃ1 ๐ฃ1 If ๐ ends at ๐ฃ๐−1 , it is with ๐0 since since ๐0 is presented at ๐ฃ๐−1 and ๐๐ is missing from ๐ฃ๐−1 . Downshifting from ๐ฃ๐−1 , interchanging colors along ๐, and coloring ๐ข๐ฃ๐−1 with ๐0 , completes the edge coloring augmentation. March 2014 Graph Coloring 45 Finally, suppose that ๐ neither ends at ๐ฃ๐ nor ๐ฃ๐−1 , so it ends at some vertex outside ๐ข, ๐ฃ๐ , ๐ฃ๐−1 . ๐0 ๐๐ ๐ฃ๐−1 ๐๐ ๐0 ๐ฃ๐ ๐ฃ๐ ๐๐ ๐ข ๐ฃ ๐ฃ2 ๐ฃ1 ๐ ends with either of ๐0 or ๐๐ colored edge, so either of ๐0 or ๐๐ is missing from the far end of ๐, as otherwise it would not be longest. March 2014 Graph Coloring 46 Notice that the vertices along ๐ can also touch any of ๐ ๐ข − ๐ฃ๐ , ๐ฃ๐−1 , since ๐๐ has been assumed as being presented at those (otherwise coloring downshift had been possible). We downshift from ๐ฃ๐ , assign color ๐๐ to ๐ข๐ฃ๐ , and interchange colors along ๐. โ ๐๐ ๐0 ๐ฃ๐−1 ๐0 ๐๐ ๐ฃ๐ ๐ฃ๐ ๐๐ ๐ข ๐ฃ ๐ฃ2 ๐ฃ1 March 2014 Graph Coloring 47 Line Graphs Many 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. Definition. The line graph ๐ฟ ๐บ is defined by ๐ ๐ฟ ๐บ ≡ ๐ธ ๐บ and ๐๐ ∈๐ธ ๐ฟ ๐บ if ๐ = ๐ข๐ฃ and ๐ = ๐ฃ๐ค , where ๐ข, ๐ฃ, ๐ค ∈ ๐ ๐บ . March 2014 Graph Coloring ๐ค ๐ฎ ๐ข ๐ ๐ โ ๐ฃ ๐ ๐ง ๐ ๐ณ ๐ฎ ๐ฃ ๐ค ๐ โ ๐ฃ ๐ฃ ๐ง ๐ 48 Line Graphs Characterization Theorem. (Krausz 1943) A simple graph ๐บ is the line graph of some simple graph ๐ป iff ๐ ๐บ has a partition into cliques using each vertex of ๐บ at most twice. Proof. Necessity follows from the fact that the edges adjacent at a vertex of ๐ป are represented in ๐ฟ ๐ป by vertices connected in a clique. Since an edge connects two vertices, those vertices imply two cliques at most. For sufficiency, suppose ๐ ๐บ has such a partition, using cliques ๐1 , … , ๐๐ . We shall construct H satisfying ๐บ = ๐ฟ ๐ป . Assume that ๐บ has no isolated varices. March 2014 Graph Coloring 49 Let ๐ฃ1 , … , ๐ฃ๐ be the vertices of ๐บ that appear in a single clique of ๐1 , … , ๐๐ (if such one exist). We define a vertex in ๐ป for each set of ๐จ = ๐1 , … , ๐๐ , ๐ฃ1 , … , ๐ฃ๐ . Edges of ๐ป are defined such that ๐ป vertices are adjacent if the corresponding sets (cliques) of ๐จ intersect. By its construction, each vertex of G appears in exactly two sets of ๐จ. Also, two vertices cannot both appear in two sets of ๐จ, as otherwise a clique was split among the sets. March 2014 Graph Coloring 50 impossible clique ๐บ=๐ฟ ๐ป => ๐ป clique Hence there are no parallel edges in ๐ป, so it is simple, and there is one edge in ๐ป for each vertex of ๐บ. Adjacent vertices in ๐บ appear together in some ๐๐ and the corresponding edges of ๐ป share the vertex corresponding to ๐๐ . Hence ๐บ = ๐ฟ ๐ป . โ Krausz’s theorem does not directly yield an efficient test for line graph, which the following does. March 2014 Graph Coloring 51 Theorem. (Bieneke 1968) A simple graph ๐บ is the line graph of some simple graph iff ๐บ does not contain any of the following subgraphs as an induced subgraph. March 2014 Graph Coloring 52