Presentation is loading. Please wait.

Presentation is loading. Please wait.

Robust Graph Coloring on Paths Ralf Ollig. ROBUST GRAPH COLORING PROBLEM Undirected Graph G =(V,E) Undirected Graph G =(V,E) Positive integer k ≥ χ(G)

Similar presentations


Presentation on theme: "Robust Graph Coloring on Paths Ralf Ollig. ROBUST GRAPH COLORING PROBLEM Undirected Graph G =(V,E) Undirected Graph G =(V,E) Positive integer k ≥ χ(G)"— Presentation transcript:

1 Robust Graph Coloring on Paths Ralf Ollig

2 ROBUST GRAPH COLORING PROBLEM Undirected Graph G =(V,E) Undirected Graph G =(V,E) Positive integer k ≥ χ(G) Positive integer k ≥ χ(G) Cost c on edges on G Cost c on edges on G Find k-coloring of G with min. costs of edges in G whose ends have the same color Find k-coloring of G with min. costs of edges in G whose ends have the same color RGCP is NP-hard RGCP is NP-hard

3 MOTIVATION v0v0 v1v1 v2v2 v3v3 v4v4 TAX: $400 w0w0 w1w1 w2w2 w3w3 w4w4 Investors Government

4 WHY 3-COLORING ? k=2: Graph is bipartite k=2: Graph is bipartite k≥4: k-Coloring can be done in linear time k≥4: k-Coloring can be done in linear time Brook’s Theorem: If G is a connected and simple graph an is neither an odd cycle nor a complete graph, then the chromatic number of G is at most the max. degree of G

5 EXACT ALGORITHM c* = +∞, a 0 = 0 for 1≤ i ≤ n let c i ≥ 0 Alg color(k) if k<n then for a = 0 to 2 do if a != a k, then let a k+1 = a and call color(k+1) else Let c = 0 for i = 1 to n do if w i-1 and w i share color, let c = c +c i if c < c*, let c* = c End Alg Costs to infinity # of red edges Recursion on the other 2 colors Compute costs of violation

6 RUNNING TIME ? Due to the recursion on two colors, its running time is going to be exponential. Due to the recursion on two colors, its running time is going to be exponential. … for a = 0 to 2 do if a != a k, then let a k+1 = a and call color(k+1) …

7 COSTS ? If there exits a 3-coloring it is found and therefore the costs of an optimal solution are 0. This is because there is no violation on the coloring precondition. Method only acceptable for small instances

8 HOW BAD IS THIS 1 st ONE? Running Time: O(2 n ) Running Time: O(2 n ) Cost = 0 Cost = 0

9 RANDOMIZED ALGORITHM Alg randColor() Let a 0 = 0 and c = 0 For i = 1 to n do guess a i from {0,1,2,}\{a i-1 } For i = 1 to n do if w i-1 and w i share color, let c = c +c i End Alg # of red edges Coloring the nodes Costs for violating the 3-coloring

10 RUNNING TIME First for-loop takes linear time for choosing random coloring. First for-loop takes linear time for choosing random coloring. Second for loop takes linear time to calculate the costs of violating the prerequisites. Second for loop takes linear time to calculate the costs of violating the prerequisites.

11 COSTS We have 3 colors, but one is allocated We have 3 colors, but one is allocated Therefore probability for the others is ½. Therefore probability for the others is ½. That gives us: That gives us: p i = ½(1-p i-1 )≤1/2 By linearity the cost behave the same By linearity the cost behave the same

12 HOW BAD IS THIS 2 nd ONE ? Running Time: O(n) Running Time: O(n) Cost: at most half of the cost of the red edges Cost: at most half of the cost of the red edges

13 GREEDY ALGORITHM Alg greedyColor Let a 0 = 0 For i = 1 to n do Let Ai = {0,1,2} For each left neighbor v j of v i do: Let A i = A i \ {a j } Let a i be the smallest element of A i End Alg Use same algorithm for right neighbors respectively. Iff: j<i j = i-1 # of red edges

14 RUNNING TIME The outer for-loop takes linear time over the red edges. The outer for-loop takes linear time over the red edges. The inner for-loop takes constant time over the neighbors. The inner for-loop takes constant time over the neighbors.

15 COSTS Forward edge / backward edge Forward edge / backward edge (j<i) / (i<j) Vertex at most two neighbors Vertex at most two neighbors Therefore, Therefore, For each left neighbor v j of v i do: Let A i = A i \ {a j } deletes at most two colors All forward edges end in different colors, though at most backward edges have same color All forward edges end in different colors, though at most backward edges have same color

16 EXAMPLE v0v0 v1v1 v2v2 v3v3 v4v4 v5v5 v6v6 v7v7 v8v8 v0v0 v3v3 v6v6 v1v1 v4v4 v7v7 v2v2 v5v5 v8v8 v0v0 v1v1 v2v2 v3v3 v4v4 v5v5 v6v6 v7v7 v8v8 j i j’ i’ Forward edge: 3<6 Backward edge: 7 !< 2

17 HOW BAD IS THIS 3 rd ONE ? Running Time: O(n) Running Time: O(n) Cost: min{c L,c R } at most half of the cost of the red edges Cost: min{c L,c R } at most half of the cost of the red edges

18 REAL WORLD Crew assignment for an airline Crew assignment for an airline Tradeoffs between Costs & Speed Tradeoffs between Costs & Speed Deciding if there is a 3-col of the union of two paths is NPC Deciding if there is a 3-col of the union of two paths is NPC

19 QUESTIONS

20 LITERATURE R. L. Bracho, J. R. Rodriguez, and F. J. Z. Martinez. Algorithms for Robust Graph Coloring on Paths. In Proceedings of the 2nd international conference on Electrical and Electronics Engineering, pages 9-12, 2005. http://ieeexplore.ieee.org/servlet/opac?punumber=1 0241


Download ppt "Robust Graph Coloring on Paths Ralf Ollig. ROBUST GRAPH COLORING PROBLEM Undirected Graph G =(V,E) Undirected Graph G =(V,E) Positive integer k ≥ χ(G)"

Similar presentations


Ads by Google