Presentation is loading. Please wait.

Presentation is loading. Please wait.

Modeling Using Colorability Presented by: Kelley Louie CSC 252 Algorithms 252a-aj.

Similar presentations


Presentation on theme: "Modeling Using Colorability Presented by: Kelley Louie CSC 252 Algorithms 252a-aj."— Presentation transcript:

1

2 Modeling Using Colorability Presented by: Kelley Louie CSC 252 Algorithms 252a-aj

3 Introduction l All of the algorithms that we have learned in class have real world applications such as social science problems. l By associating a problem to a graph, we can solve the social science problem.

4 Summary l History l Two Models –Committee Scheduling –Routing Garbage Trucks l Planar Graphs l Bipartite Graphs l LEDA implementation

5 History: Four Color Problem l In 1852, Francis Guthrie noticed that he could color the map of England in four colors. He asked his brother, Frederick Guthrie, if every map has the chromatic number of four. This same question was relayed to London mathematican Augustus de Morgan by his student Frederick Guthrie. l In 1853, Kempe devised a proof, but eleven years later, Heawood disproved the correctness. Several other proofs were also found, but all had flaws. l The theorem was finally proved by Appel and Haken in 1976 using a computer to solve difficult cases and 1200 hours of computing time. This employed using techniques called reducibility and discharging. The theorem by Appel and Haken remains a disputed proof because part of the proof uses a computer and can not be verified by hand, and the part that is checkable by hand is complex and tedious and no one has been able to verify it.

6 Definition l chromatic number χ(G) - minimum number k such that Graph G is colorable in k-colorings l clique - subgraph G c that is a complete graph

7 Committee Scheduling l Problem: assign meeting times such that there are no conflicts between members l Solution: create a corresponding graph with the condition that no two adjacent vertices are assigned the same time instead of times, assign colors such that no two adjacent vertices share the same color l Graph G –vertices: all the committees that need regular meeting times –edge: joins two vertices iff share a common member

8 Graph of Committee Scheduling l This graph has a chromatic number of three because the largest clique is 3. l Credit: Applied Combinatorics p. 98

9 Routing Garbage Trucks l Posed by the New York City Department of Sanitation (Beltrami and Bodin [1973]) l Tour of a truck is a scheduling of sites to visit within one day –each site i visited k i times in a week –tours partitioned among six days (Sunday is not a working day) such that each site is visited once a day no day assigned more tours than the number of trucks –total time for all trucks is minimal

10 Routing Continued l Start with any set of tours and improve the total time of the tours l Test if the set satisfies the condition that it must be partitioned into 6 days l To determine if a possible solution can be partitioned into six parts: –create Graph (G) –determine if the graph can be colored in 6 or less colors

11 Graph of Garbage Tour l The graph on the left is an example of the routing problem without any colored vertices. l The graph on the right has chromatic number six.

12 Determine 6-Colorable Quickly l Use the Strong Perfect Graph Conjecture –definition: G is γ-perfect iff neither G or any subgraph G c has an odd circuit of 3 or greater –γ-perfect: if for all subgraphs G c χ(G) >= ω(G) l yes - use the old algorithm to check if the chromatic number is 6 –start from one vertex and check if the chromatic number is 6 l no - determine if the graph has a clique of 6 or greater

13 Determining 6-Color in Detail l For γ-perfect graphs, the chromatic number can be calculated by the finding the number of vertices in the largest clique.

14 Planar Graphs l Four Color Theorem –all planar graphs are colorable in four colors l Test if Graph G is planar –K 3, 3 and K 5 are not planar –a graph is planar iff it has no subgraph homeomorphic to K 3, 3 or K 5 –a graph is planar if it has no subgraph that is K 3, 3 or K 5

15 Example of Homeomorphic l two graphs are homeomorphic iff it can be derived from a graph by adding vertices of degree 2 to edges l credit: Discrete Mathematics with Graph Theory p. 471

16 Examples of Non-planar l left: G is nonplanar because it has a subgraph S that is homeomorphic to K 3, 3 as shown by the open circles and closed circles l right: G is nonplanar because it has a subgraph S that is homeomorphic to K 5 as shown by the vertex A being adjacent to C and D and with added vertexes to B and E l credit: Discrete Mathematics with Graph Theory p. 471

17 Bipartite Graphs l all bipartite graphs are colorable in two colors l color a bipartite graph –perform Breadth First Search –first node is one color –adjacent node is the other color –continue BFS with alternating color assignments –end only when all the nodes are colored

18 LEDA implementation l a planar graph has at most five neighbors as stated in the LEDA book Lemma 47 –if node v has less than five neighbors recursively color the neighbors and color v in the color not used by its neighbors –if node v has five neighbors merge the two non-adjacent vertices, w and z, to its neighbor v remove v and any parallel edges five color the graph recursively unmerge w and z by coloring w and z the color used in the merged graph color v a color not used by its neighbors l Credit: LEDA: A Platform for Combinatorial and Geometric Computing p. 578

19 Five Colorability l It has been proven that planar graphs can be colored in 5 or less colors. l Proof by induction l if V = 1, then yes the graph is colorable in 5 or less colors, to be more specific, it can colored in exactly one color l prove for V = k+1, assume G is planar –Corollary 13.6 states that every planar graph has at least one vertex v of at most degree 5 –delete this vertex of at most degree 5, and then G 0 can be colored in 5 or less colors by the induction hypothesis color the vertices neighboring v, if one color has not been used, color v with this last remain, vertex v has less than 5 neighbors if v has 5 neighbors, there are two cases –G 0 has no path from v 1 to v 3 all colored 1 or 3 subgraph H with vertices colored 1 or 3 which start at v 1, alternate coloring H with colors 1 and 3, so v 1 and v 3 are colored 3 and v can be colored 1 –G 0 has a path from v 1 to v 3 with vertices all colored 1 or 3 path of v and v 1 produces a circuit that does not enclose both v 2 and v 4, so must cross the path at a vertex within the path. There is no path in G 0 from v 2 to v 4 that just uses color 2 and 4, since it crosses another vertex. Now we have the same case as above. l Credit: Discrete Mathematics with Graph Theory

20 Possible Implementation l assume Graph G is stored as an adjacency list, perform a search through the list to determine if each node has less than five neighbors, this would take n+m time l if less than five neighbors, then five color the graph recursively l if five neighbors, then perform the merging and unmerging, and color the graph l coloring the graph would require visiting all the nodes once again l the most time spent would be to determine the degree of the nodes, this would take O(n+m), coloring would take O(n+m), total = O(n+m)

21 Conclusion l Colorability is NP-hard. l For some problems, determining the type of graph leads to the chromatic number. l In general, any type of scheduling problem can be related to a colorable graph. Therefore, by using techniques to determine the chromatic number of the graph, one can find organize a schedule to avoid all possible conflicts. l It is not possible to just find the largest clique number and assume that this s the chromatic number because finding the largest clique is NP- complete. l For the routing problem, it was simpler to find a solution because the number of colors were set.

22 Acknowledgements l Discrete Mathematical Models: with applications to social, biological, and environmental problems –Fred S. Roberts l Applied Combinatorics –Fred S. Roberts l Discrete Mathematics with Graph Theory –Edgar G. Goodaire & Michael M. Parmenter l Lovász’s reduction of Colorability to 3-Colorability –http://www.cs.rutgers.edu/~chvatal/notes/color.html l The Four Color Theorem –http://www.math.gatech.edu/~thomas/FC/fourcolor.html l Graphs And Their Uses –Oystein Ore l LEDA: A Platform for Combinatorial and Geometric Computing –Kurt Mehlhorn & Stefan Näher

23 Further Information l Links to various coloring sites including source codes for coloring programs –http://www.cs.ualberta.ca/~joe/Coloring/index. html l Dna computing to solve colorability –http://cism.jpl.nasa.gov/program/RCT/DNACo mpUD.html

24 Contributions l I found and read many books about colorability to get a better understanding of the different theorems associated with graph coloring. Unfortunately, I did not find a heuristic for solving colorability. The closest solutions I have found involved theorems that prove whether or not a graph is planar. If so, the graph can be colored in four or less colors, if the Four Color Theorem holds to be true. It has been proven that planar graphs are colorable in five or more colors. l I searched the internet for relevant information, but most sites dealt only with the fact that colorability is NP-hard and that many researchers are trying reduce colorability to 3-colorability, which is NP-hard. l I used LEDA to illustrate the algorithm that it employs to display 5- colorability. Along with LEDA, I read the book to understand how the algorithm works to color the graph. l I briefly stated a possible implementation of five colorability.


Download ppt "Modeling Using Colorability Presented by: Kelley Louie CSC 252 Algorithms 252a-aj."

Similar presentations


Ads by Google