Graph Coloring

33
David Laughon CS594 Graph Theory Graph Coloring

description

Graph Coloring. David Laughon CS594 Graph Theory. Definitions. Coloring – Assignment of labels to vertices k-coloring – a coloring where Proper k-coloring – k-coloring where vertices have different labels if they are adjacent - PowerPoint PPT Presentation

Transcript of Graph Coloring

Page 1: Graph Coloring

David LaughonCS594 Graph Theory

Graph Coloring

Page 2: Graph Coloring

• Coloring – Assignment of labels to vertices

• k-coloring – a coloring where

• Proper k-coloring – k-coloring where vertices have different labels if they are adjacent

• Chromatic number – least k for which G is k-colorable - χ(G)

Definitions

Page 3: Graph Coloring

• A Graph is k-chromatic if χ(G) = k

• Optimal coloring – proper k-coloring of a k-chromatic graph– Vertex-coloring problems

• Is a graph k-colorable for given k?• What is χ(G) / what is the optimal coloring?

Definitions

Page 4: Graph Coloring

• Four-color conjecture – Francis Guthrie, 1852 (F.G.)– Can any map be colored using at most 4 colors so that

adjacent regions are not the same color?• Many incomplete proofs (Kempe)

– “Counterexamples”• 5-color theorem proved in 1890 (Heawood)• 4-color theorem finally proved in 1977 (Appel, Haken)

– First major computer-based proof• Graph coloring applies to non-planar graphs as well

History

Page 5: Graph Coloring

• Martin Gardner, April 1975 edition of Scientific American

• As an April fool’s joke, claimed graph required 5 colors

4-color “Counterexample”

Page 6: Graph Coloring

Proper 6-coloring Optimal 4-coloring

Examples

Page 7: Graph Coloring

• For complete graphs, χ(G) = n

• Each vertex has n-1 edges that connect to every other vertex– Forces each vertex to

have a unique color

Examples – Kn

Page 8: Graph Coloring

• A graph is 2-colorable iff it is bipartite

Examples

Page 9: Graph Coloring

• ω(G) – size of largest clique in G• χ(G) ≥ ω(G)

– Clique of size n requires n colors– Can be a tight bound, but not always

Examples

Page 10: Graph Coloring

Examples

χ(G) = 7, ω(G) = 5

Page 11: Graph Coloring

• Mycielski’s Construction– Can be used to make

graphs with arbitrarily large chromatic numbers, that do not contain K3 as a subgraph

Examples

Page 12: Graph Coloring

• χ(G) ≤ Δ(G) + 1

• Greedy Algorithm:– Put the vertices of a graph in a sequence– For each vertex in the sequence, assign it the lowest

indexed color not already assigned to adjacent vertices• Not guaranteed to be optimal for every possible

sequence• Guaranteed optimal for at least one sequence

Greedy Coloring

Page 13: Graph Coloring

Vertex 0 1 2 3 4 5Color Yellow Yellow Yellow Green Green Green

Greedy Coloring Example

Page 14: Graph Coloring

Vertex 0 3 1 4 2 5Color Yellow Yellow Green Green Purple Purple

Greedy Coloring Example

Page 15: Graph Coloring

• A path in a graph that alternates between 2 colors

• First used by Kempe in his incorrect proof of the 4-color theorem

• Used in 5-color theorem and 4-color theorem proofs

Kempe Chains

Page 16: Graph Coloring

• All planar graphs can be colored with at most 5 colors

• Basis step: True for n(G) ≤ 5• Induction step: n(g) > 5• There exists a vertex v in G of degree at most 5 (Theorem

6.1.23)• G – v must be 5-colorable by induction hypothesis

5-color theorem

Page 17: Graph Coloring

• If G is 5-colorable, done• If G is not 5 colorable, we

have:

• Is there a Kempe chain including v1 and v3?

5-color Theorem

Page 18: Graph Coloring

There is no Kempe chain There is a Kempe chain

5-color Theorem

Page 19: Graph Coloring

There cannot be a Kempe chain including v2 and v4

v4 cannot directly influence v2

5-color Theorem

Page 20: Graph Coloring

• Similar to vertex coloring, except edges are colored– Adjacent edges have different colors

Edge Coloring

Page 21: Graph Coloring

• Every edge-coloring problem can be transformed into a vertex-coloring problem

• Coloring the edges of graph G is the same as coloring the vertices in L(G)

• Not every vertex-coloring problem can be transformed tin an edge-coloring problem– Every graph has a line graph, but not every graph is a

line graph of some other graph

Edge Coloring

Page 22: Graph Coloring

K4 edge-coloring L(K4) vertex-coloring

Edge Coloring

Page 23: Graph Coloring

• Each vertex in G has a positive integer label x(v): the number of colors that must be assigned to that vertex

• The color sets of adjacent vertices must be disjoint

Multi-coloring

{Yellow, Green, Purple, Red}

{Blue}

{Yellow, Green}

{Blue}

χ(G) = 5

Page 24: Graph Coloring

• Every multi-coloring problem can be transformed to a vertex-coloring problem– For each vertex with x(v) = n, replace it with a clique of

size n.– Add an edge from each vertex in the new clique to

every vertex that the original vertex was adjacent to.– Single vertex-coloring now solves the problem

Multi-coloring

Page 25: Graph Coloring

Multi-coloring

χ(G) = 5

Page 26: Graph Coloring

• Scheduling• Register allocation• VLSI channel routing• Biological networks (Khor)• Testing printed circuit boards (Garey, Johnson, & Hing)• Sudoku

Applications

Page 27: Graph Coloring

• Each cell is a vertex• Each integer label is a “color”• A vertex is adjacent to

another vertex if one of the following hold:– Same row– Same column– Same 3x3 grid

• Vertex-coloring solves Sudoku

Applications: Sudoku

Page 28: Graph Coloring

• Decide if a graph is k-colorable is NP-complete• Determining χ(G) is NP-hard• k-colorable – O(2.445^n) (Lawler)• 3-colorable – O(1.3289^n) (Beigel, Eppstein)• 4-colorable – O(1.7272^n) (Fomin, Gaspers, & Saurabh)• Alternative methods of solving graph coloring

– Swarm intelligence (Dorrigiv, Markib)

State of the Art

Page 29: Graph Coloring

• Hadwiger Conjecture– Every k-chromatic graph has a subgraph that becomes

Kk through edge contractions– Open for k ≥ 7

Open Problems

Page 30: Graph Coloring

• Erdős–Faber–Lovász conjecture– Consider k complete

graphs with exactly k vertices. If every pair of complete graphs shares at most one vertex, then the union of the graphs can be colored with k colors

Open Problems

Page 31: Graph Coloring

• F. G. (June 10, 1854), "Tinting Maps", The Athenaeum: 726.• Heawood, P. J. (1890), "Map-Colour Theorems", Quarterly Journal of

Mathematics, Oxford 24: 332–338• Appel, Kenneth; Haken, Wolfgang (1977), "Every Planar Map is Four Colorable

Part I. Discharging", Illinois Journal of Mathematics 21: 429–490 • Appel, Kenneth; Haken, Wolfgang; Koch, John (1977), "Every Planar Map is

Four Colorable Part II. Reducibility", Illinois Journal of Mathematics 21: 491–567

• Appel, Kenneth; Haken, Wolfgang (October 1977), "Solution of the Four Color Map Problem", Scientific American 237 (4): 108–121

• Khor, S., "Application of graph colouring to biological networks," Systems Biology, IET , vol.4, no.3, pp.185,192, May 2010

• Garey, M.R.; Johnson, D.; Hing So, "An application of graph coloring to printed circuit testing," Circuits and Systems, IEEE Transactions on , vol.23, no.10, pp.591,599, Oct 1976

References

Page 32: Graph Coloring

• Lawler, E.L. (1976), "A note on the complexity of the chromatic number problem", Information Processing Letters 5 (3): 66–67

• Beigel, R.; Eppstein, D. (2005), "3-coloring in time O(1.3289n)", Journal of Algorithms 54 (2)): 168–204

• Fomin, F.V.; Gaspers, S.; Saurabh, S. (2007), "Improved Exact Algorithms for Counting 3- and 4-Colorings", Proc. 13th Annual International Conference, COCOON 2007, Lecture Notes in Computer Science 4598, Springer, pp. 65–74

• Dorrigiv, M.; Markib, H.Y., "Algorithms for the graph coloring problem based on swarm intelligence," Artificial Intelligence and Signal Processing (AISP), 2012 16th CSI International Symposium on , vol., no., pp.473,478, 2-3 May 2012

References

Page 33: Graph Coloring

• Prove that every graph has a vertex ordering such that the greedy coloring algorithm produces an optimal coloring

• Given a k-chromatic graph and an optimal coloring of it, prove that for each color i there is a vertex with color i that is adjacent to vertices of all the other k-1 colors

Homework