1 / 42

Convex Recoloring of Trees

Convex Recoloring of Trees. Reuven Bar-Yehuda Ido Feldman. Convex Coloring. A Coloring is Convex if each color induces a block. Convex Coloring. Non-Convex Coloring. Problem Definition. Input: Colored Tree (T,  ,W) Output: Convex Coloring  ’ Cost: Weight of recolored vertices.

kat
Download Presentation

Convex Recoloring of Trees

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Convex Recoloring of Trees Reuven Bar-Yehuda Ido Feldman

  2. Convex Coloring • A Coloring is Convex if each color induces a block. Convex Coloring Non-Convex Coloring

  3. Problem Definition • Input: Colored Tree (T,,W) • Output: Convex Coloring ’ • Cost: Weight of recolored vertices Cost=2

  4. Coloring Cover • is a cover if there is a recoloring which changes only vertices from .

  5. 0 1 0 0 0 0 1 0 0 Formal Definition • Input: Weight vector W, Tree T, Coloring . • Output: Coloring Cover . • Cost: 1 Cost=2+9=11 2 3 4 5 6 7 8 9

  6. Motivation • Phylogenetic trees • Each node represents a specie • Each color represents an attribute • “Real world” examples are convex • Linguistics • Strongly NP complete [Moran,Snir] • Hardness holds for strings • Exponential Algorithms / Polynomial Approximations

  7. r-approximation • Given a weight vector w, Tree T, Coloring . Minimizew∙x Subject to:x is a coloring cover • x is r-approximationif w∙x≤r∙w∙x* • An algorithm is r-approximation if for any w,T, it returns an r-approximation.

  8. Previous Results • [Snir,Moran]: • Dynamic Programming algorithm (EXP) • 3 Approximation for trees • 2 Approximation for strings

  9. Our Contribution • A 2+ε approximation algorithm for trees • Time complexity: poly(n)exp(1/ ε) • Faster Dynamic Programming • Though still exponential time.

  10. The Local Ratio Theorem x is an r-approximation with respect to w1 x is an r-approximation with respect to w2 x is an r-approximation with respect to w1+w2 Proof: Let x*, x1*, x2* opts w.r.t. w, w1, w2. w1 · x  r ×w1x1* w2 · x  r ×w2x2*  w · x  r ×(w1x1*+ w2x2*)  r ×(w1 x* + w2 x*) = r ×(w1+ w2 )x*

  11. 1 1 1 1 0 1 1 0 Example: 3-approximation • v separates 3 different colors. • For every feasible x: v

  12. 3-aprx algorithm Algorithm MinCR3(T,,W) If there is no node separating 3 colors ReturnOptimal(T,,W) Else, Let V’ be the set of the corresponding 6 vertices Define Let Return MinCR3(T,,W-W1)

  13. Running Example 3 1 2 1 2 4 5 4 4

  14. Running Example (2) 2 0 1 1 1 4 4 4 3

  15. Running Example (3) 1 0 0 0 1 4 3 3 2 No More Weight Reductions. Need to calculate optimal cover.

  16. t t t 1 1 1 2 2 2 (t,d)-separator • v is a (t,d)-separator if in T-{v}, there are t colors such that each appear on at least d components. { d

  17. v Example: (2,3)-seperator • 2 colors ( , ) are separated to 3 components. 1 3 2 1 2 1 2 4 1 2

  18. 1 1 1 t t t 1 1 1 1 1 1 2 2 2 1 1 1 Weight reduction • On a (t,d)-separator, assign a weight of 1 to each one of the t∙d vertices. • For every feasible x: At most one color left on ≥2 sides

  19. 1 1 1 1 1 1 Weight Reduction #1 1 1 2 2 k k

  20. 1 1 1 1 1 1 Weight Reduction #2 K nodes 2 1 1 2 1 2

  21. 1 1 1 1 1 1 1 1 1 1 1 1 Weight Reduction #3 1 2 1 2 1 2 1 2 3 3 3 3

  22. 1 1 1 1 1 1 1 1 1 1 1 1 Weight Reduction #4 4 4 4 1 2 1 2 1 2 3 3 3

  23. Light Colorings • A coloring is lightk if it does not contain: • (2,k)-separator • (k,2)-separator • (3,4)-separator • (4,3)-separator

  24. 2+2/(k-1)-aprx algorithm Algorithm MinCR(T,,W) If  is a lightk coloring ReturnSolveLight(T,,W) Find (t,d)-separator ( ) Let V’ be the set of it’s t∙d vertices Define Let Return MinCR(T,,W-W1)

  25. Algorithm Correctness • Claim: MinCR returns an -apx • Proof: By induction on recursion depth: • Base: (Light Coloring) X is optimal. • Step: • X is an r-aprx w.r.t. W-W1(Induction hyp.). • Every solution is an r-aprx w.r.t. W1. • Thus, X is an r-aprx w.r.t. to W (LR Theorem).

  26. What’s Next? We show how to handle lightkcolorings…

  27. v Separated colors • Sep(v,c)– Number of connected components containing c in T-{v}. • For a vertex v, let si=sep(v,i). • Assume wlog si≥si+1. 1 3 Sep(v,1)=3 Sep(v,3)=2 S=(3,2,2,1) 2 1 2 1 3 4

  28. Lemma 1 • In a Light Coloring, for any v: • s1≤deg(v) • s2≤k-1 • s3≤3 • s4≤2 • sk≤1 Trivial. There are at most deg(v) components.

  29. K nodes 2 1 1 2 1 2 Lemma 1 (cont.) • For every v: • s1≤deg(v) • s2≤k-1 • s3≤3 • s4≤2 • sk≤1 Otherwise, s1≥s2≥k. Not a light coloring. Contradiction.

  30. 1 2 1 2 1 2 1 2 3 3 3 3 Lemma 1 (cont.) • For every v: • s1≤deg(v) • s2≤k-1 • s3≤3 • s4≤2 • sk≤1 Otherwise, s1≥s2≥s3≥4. Not a light coloring. Contradiction.

  31. 4 4 4 1 2 1 2 1 2 3 3 3 Lemma 1 (cont.) • For every v: • s1≤deg(v) • s2≤k-1 • s3≤3 • s4≤2 • sk≤1 Otherwise, s1≥s2≥s3≥s4≥3. Not a light coloring. Contradiction.

  32. 1 1 2 2 k k Lemma 1 (cont.) • For every v: • s1≤deg(v) • s2≤k-1 • s3≤3 • s4≤2 • sk≤1 Otherwise, s1≥s2≥…≥sk≥2. Not a light coloring. Contradiction.

  33. 1 2 3 ... Deg(v) 1 2 3 … k-1 1 2 3 1 2 1 2 .. 1 2 … 3 k 5 4 2 1 Conclusion • We would like to assign colors to connected components. • We will assign each color only to components containing it.

  34. Definitions • Color(v)– The color of v. • NewColor(v)– The new color of v. • OutDeg(v) – The outgoing degree of v. • vi– The i’th son of v (0=father). • Subtree(v) – The subtree rooted at v.

  35. Observation 1 v vi vj

  36. No No No c c c Conclusion 2 NewColor(v)= , NewColor(v2)≠ c v c v1 v2

  37. Reserved Colors Allowed Colors Dynamic Programming - Idea Recoloring subtree(v) • Sum cost of subtrees • Add cost of root v

  38. Dynamic Programming • OPT(v) - the optimal recoloring of Subtree(v), while  are reserved colors. • OPT,c(v) - the optimal recoloring of Subtree(v), while  are reserved colors, and NewColor(v)=c. • Observation:

  39. Case 1: Case 2: v v vi vi Cost of recoloring a subtree - cost of recoloring subtree(vi) while iare reserved colors and NewColor(v)=c.

  40. Lemma: It is enough to scan partitions. Dynamic Programming – Cont.

  41. Summary • Total time complexity: • Setting we get: • Approximation Ratio: • Time Complexity:

  42. Thank you!

More Related