convex recoloring of trees
DESCRIPTION
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. - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Convex Recoloring of Trees](https://reader035.vdocument.in/reader035/viewer/2022062322/56814fb3550346895dbd6c3a/html5/thumbnails/1.jpg)
1
Convex Recoloring of Trees
Reuven Bar-YehudaIdo Feldman
![Page 2: Convex Recoloring of Trees](https://reader035.vdocument.in/reader035/viewer/2022062322/56814fb3550346895dbd6c3a/html5/thumbnails/2.jpg)
2
Convex Coloring
A Coloring is Convex if each color induces a block.
Convex Coloring
Non-Convex Coloring
![Page 3: Convex Recoloring of Trees](https://reader035.vdocument.in/reader035/viewer/2022062322/56814fb3550346895dbd6c3a/html5/thumbnails/3.jpg)
3
Problem Definition
Input: Colored Tree (T,,W) Output: Convex Coloring ’ Cost: Weight of recolored
vertices
Cost=2
![Page 4: Convex Recoloring of Trees](https://reader035.vdocument.in/reader035/viewer/2022062322/56814fb3550346895dbd6c3a/html5/thumbnails/4.jpg)
4
is a cover if there is a recoloring which changes only vertices from .
X V
Coloring Cover
X
![Page 5: Convex Recoloring of Trees](https://reader035.vdocument.in/reader035/viewer/2022062322/56814fb3550346895dbd6c3a/html5/thumbnails/5.jpg)
5
Formal Definition Input: Weight vector W, Tree T, Coloring
. Output: Coloring Cover . Cost:
4
1
3
6
2
5
87 9
0,1n
xw x
0
1
1 0
0 00
0 0
Cost=2+9=11
![Page 6: Convex Recoloring of Trees](https://reader035.vdocument.in/reader035/viewer/2022062322/56814fb3550346895dbd6c3a/html5/thumbnails/6.jpg)
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
![Page 7: Convex Recoloring of Trees](https://reader035.vdocument.in/reader035/viewer/2022062322/56814fb3550346895dbd6c3a/html5/thumbnails/7.jpg)
7
r-approximation Given a weight vector w, Tree T, Coloring .
Minimize w∙xSubject to: x is a coloring cover
x is r-approximation if w∙x≤r∙w∙x* An algorithm is r-approximation if for any
w,T, it returns an r-approximation.
![Page 8: Convex Recoloring of Trees](https://reader035.vdocument.in/reader035/viewer/2022062322/56814fb3550346895dbd6c3a/html5/thumbnails/8.jpg)
8
Previous Results
[Snir,Moran]: Dynamic Programming algorithm
(EXP) 3 Approximation for trees 2 Approximation for strings
![Page 9: Convex Recoloring of Trees](https://reader035.vdocument.in/reader035/viewer/2022062322/56814fb3550346895dbd6c3a/html5/thumbnails/9.jpg)
9
Our Contribution
A 2+ε approximation algorithm for trees Time complexity: poly(n)exp(1/ ε)
Faster Dynamic Programming Though still exponential time.
![Page 10: Convex Recoloring of Trees](https://reader035.vdocument.in/reader035/viewer/2022062322/56814fb3550346895dbd6c3a/html5/thumbnails/10.jpg)
10
The Local Ratio Theoremx 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*
![Page 11: Convex Recoloring of Trees](https://reader035.vdocument.in/reader035/viewer/2022062322/56814fb3550346895dbd6c3a/html5/thumbnails/11.jpg)
11
Example: 3-approximation
v separates 3 different colors. For every feasible x:
v
1 1
1
1 1
1
0
0
12 6w x
![Page 12: Convex Recoloring of Trees](https://reader035.vdocument.in/reader035/viewer/2022062322/56814fb3550346895dbd6c3a/html5/thumbnails/12.jpg)
12
3-aprx algorithmAlgorithm MinCR3(T,,W)
If there is no node separating 3 colorsReturn Optimal(T,,W)
Else,Let V’ be the set of the corresponding 6
verticesDefine
Let
Return MinCR3(T,,W-W1)
'minv V w v
1
'
0 '
v Vw v
v V
![Page 13: Convex Recoloring of Trees](https://reader035.vdocument.in/reader035/viewer/2022062322/56814fb3550346895dbd6c3a/html5/thumbnails/13.jpg)
13
Running Example
4
141 2 2
5
4
3
![Page 14: Convex Recoloring of Trees](https://reader035.vdocument.in/reader035/viewer/2022062322/56814fb3550346895dbd6c3a/html5/thumbnails/14.jpg)
14
Running Example (2)
0 1
4
1 1
4
3
4
2
![Page 15: Convex Recoloring of Trees](https://reader035.vdocument.in/reader035/viewer/2022062322/56814fb3550346895dbd6c3a/html5/thumbnails/15.jpg)
15
Running Example (3)
0 0
3
0 1
3
2
4
1
No More Weight Reductions. Need to calculate optimal cover.
![Page 16: Convex Recoloring of Trees](https://reader035.vdocument.in/reader035/viewer/2022062322/56814fb3550346895dbd6c3a/html5/thumbnails/16.jpg)
16
(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.
{d1
1
1
2 2 2
t t t
![Page 17: Convex Recoloring of Trees](https://reader035.vdocument.in/reader035/viewer/2022062322/56814fb3550346895dbd6c3a/html5/thumbnails/17.jpg)
17
Example: (2,3)-seperator
3
2
22
1
11
4
v
2 colors ( , ) are separated to 3 components.
1 2
![Page 18: Convex Recoloring of Trees](https://reader035.vdocument.in/reader035/viewer/2022062322/56814fb3550346895dbd6c3a/html5/thumbnails/18.jpg)
18
Weight reduction On a (t,d)-separator, assign a weight of 1
to each one of the t∙d vertices.
1
1
1
1 1 1
1 1 1
For every feasible x:
1 1
tdr
t d
1
1
1
2 2 2
t t t 11 1t d w x td
At most one color left on
≥2 sides
![Page 19: Convex Recoloring of Trees](https://reader035.vdocument.in/reader035/viewer/2022062322/56814fb3550346895dbd6c3a/html5/thumbnails/19.jpg)
19
Weight Reduction #1
1 1
2 2
k k
1
1
1
1
1
1
2
2 1 1
kr
k
, 2t k d
22
1r
k
![Page 20: Convex Recoloring of Trees](https://reader035.vdocument.in/reader035/viewer/2022062322/56814fb3550346895dbd6c3a/html5/thumbnails/20.jpg)
20
Weight Reduction #2
1 2
1 2
1 2
1
1
1
1
1
1
K nodes 2,t d k
22
1r
k
![Page 21: Convex Recoloring of Trees](https://reader035.vdocument.in/reader035/viewer/2022062322/56814fb3550346895dbd6c3a/html5/thumbnails/21.jpg)
21
Weight Reduction #3
1 2
1 2
1 2
3 3 3
1 2
1
1
1
1
1
1
1
11
1 1
1
3
3 4
3 1 4 1r
3, 4t d
2r
![Page 22: Convex Recoloring of Trees](https://reader035.vdocument.in/reader035/viewer/2022062322/56814fb3550346895dbd6c3a/html5/thumbnails/22.jpg)
22
Weight Reduction #4
1 2
1 2
1 2
3 3 3
4 4 4
1
1
1
1
1
1
11 1
11 1
4, 3t d
2r
![Page 23: Convex Recoloring of Trees](https://reader035.vdocument.in/reader035/viewer/2022062322/56814fb3550346895dbd6c3a/html5/thumbnails/23.jpg)
23
Light Colorings
A coloring is lightk if it does not contain: (2,k)-separator (k,2)-separator (3,4)-separator (4,3)-separator
![Page 24: Convex Recoloring of Trees](https://reader035.vdocument.in/reader035/viewer/2022062322/56814fb3550346895dbd6c3a/html5/thumbnails/24.jpg)
24
2+2/(k-1)-aprx algorithmAlgorithm MinCR(T,,W)
If is a lightk coloringReturn SolveLight(T,,W)
Find (t,d)-separator ( )Let V’ be the set of it’s t∙d verticesDefine
Let
Return MinCR(T,,W-W1)
, 2, , , 2 , 3,4 , 4,3t d k k
'minv V w v
1
'
0 '
v Vw v
v V
![Page 25: Convex Recoloring of Trees](https://reader035.vdocument.in/reader035/viewer/2022062322/56814fb3550346895dbd6c3a/html5/thumbnails/25.jpg)
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).
22
1r
k
![Page 26: Convex Recoloring of Trees](https://reader035.vdocument.in/reader035/viewer/2022062322/56814fb3550346895dbd6c3a/html5/thumbnails/26.jpg)
26
What’s Next?
We show how to handle lightk colorings…
![Page 27: Convex Recoloring of Trees](https://reader035.vdocument.in/reader035/viewer/2022062322/56814fb3550346895dbd6c3a/html5/thumbnails/27.jpg)
27
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.
3
3
22
1
11
4
v
Sep(v,1)=3
Sep(v,3)=2
S=(3,2,2,1)
![Page 28: Convex Recoloring of Trees](https://reader035.vdocument.in/reader035/viewer/2022062322/56814fb3550346895dbd6c3a/html5/thumbnails/28.jpg)
28
In a Light Coloring,for any v: s1≤deg(v) s2≤k-1 s3≤3 s4≤2 sk≤1
Lemma 1
Trivial. There are at most deg(v) components.
![Page 29: Convex Recoloring of Trees](https://reader035.vdocument.in/reader035/viewer/2022062322/56814fb3550346895dbd6c3a/html5/thumbnails/29.jpg)
29
Otherwise, s1≥s2≥k.
Not a light coloring. Contradiction.
For every v: s1≤deg(v) s2≤k-1 s3≤3 s4≤2 sk≤1
Lemma 1 (cont.)
1 21 2
1 2
K nodes
![Page 30: Convex Recoloring of Trees](https://reader035.vdocument.in/reader035/viewer/2022062322/56814fb3550346895dbd6c3a/html5/thumbnails/30.jpg)
30
Otherwise, s1≥s2≥s3≥4.
Not a light coloring. Contradiction.
For every v: s1≤deg(v) s2≤k-1 s3≤3 s4≤2 sk≤1
Lemma 1 (cont.)
1 21 21 2
3 3 3
1 2
3
![Page 31: Convex Recoloring of Trees](https://reader035.vdocument.in/reader035/viewer/2022062322/56814fb3550346895dbd6c3a/html5/thumbnails/31.jpg)
31
Otherwise, s1≥s2≥s3≥s4≥3.
Not a light coloring. Contradiction.
For every v: s1≤deg(v) s2≤k-1 s3≤3 s4≤2 sk≤1
Lemma 1 (cont.)
1 21 21 2
3 3 3
4 4 4
![Page 32: Convex Recoloring of Trees](https://reader035.vdocument.in/reader035/viewer/2022062322/56814fb3550346895dbd6c3a/html5/thumbnails/32.jpg)
32
Otherwise, s1≥s2≥…≥sk≥2.
Not a light coloring. Contradiction.
For every v: s1≤deg(v) s2≤k-1 s3≤3 s4≤2 sk≤1
Lemma 1 (cont.)
1 1
2 2
k k
![Page 33: Convex Recoloring of Trees](https://reader035.vdocument.in/reader035/viewer/2022062322/56814fb3550346895dbd6c3a/html5/thumbnails/33.jpg)
33
Conclusion We would like to assign colors to
connected components. We will assign each color only to
components containing it.
1 2
3 ...
Deg
(v)
1 2
3 …
k-1
1 2
3
1 2
1 2..
1 2
1k 25 4 3…
#
2 deg
i
k
Part s
O k v
![Page 34: Convex Recoloring of Trees](https://reader035.vdocument.in/reader035/viewer/2022062322/56814fb3550346895dbd6c3a/html5/thumbnails/34.jpg)
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.
![Page 35: Convex Recoloring of Trees](https://reader035.vdocument.in/reader035/viewer/2022062322/56814fb3550346895dbd6c3a/html5/thumbnails/35.jpg)
35
Observation 1
v
vjvi
NewColor v i jNC SubTreeN vC SubTree v
![Page 36: Convex Recoloring of Trees](https://reader035.vdocument.in/reader035/viewer/2022062322/56814fb3550346895dbd6c3a/html5/thumbnails/36.jpg)
36
Conclusion 2
v
v2v1
NewColor(v)= ,
NewColor(v2)≠
c
c
No c No c No c
![Page 37: Convex Recoloring of Trees](https://reader035.vdocument.in/reader035/viewer/2022062322/56814fb3550346895dbd6c3a/html5/thumbnails/37.jpg)
37
Dynamic Programming - Idea
v
Recoloring subtree(v)
Sum cost of subtrees
Add cost of root
Recoloring subtree(v)
Sum cost of subtrees
Add cost of root
Reserved Colors
Allowed Colors
![Page 38: Convex Recoloring of Trees](https://reader035.vdocument.in/reader035/viewer/2022062322/56814fb3550346895dbd6c3a/html5/thumbnails/38.jpg)
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:
![Page 39: Convex Recoloring of Trees](https://reader035.vdocument.in/reader035/viewer/2022062322/56814fb3550346895dbd6c3a/html5/thumbnails/39.jpg)
39
Cost of recoloring a subtree
- cost of recoloring subtree(vi) while i are reserved colors and NewColor(v)=c.
v
vi
Case 1:
Case 2:
v
vi
![Page 40: Convex Recoloring of Trees](https://reader035.vdocument.in/reader035/viewer/2022062322/56814fb3550346895dbd6c3a/html5/thumbnails/40.jpg)
40
Dynamic Programming – Cont.
Lemma: It is enough to scan
partitions.
2 degkO k v
![Page 41: Convex Recoloring of Trees](https://reader035.vdocument.in/reader035/viewer/2022062322/56814fb3550346895dbd6c3a/html5/thumbnails/41.jpg)
41
Summary
Total time complexity:
Setting we get: Approximation Ratio:
Time Complexity:
2 22kO k n n
log 2k n
2O n
82 2 1
logo
n
![Page 42: Convex Recoloring of Trees](https://reader035.vdocument.in/reader035/viewer/2022062322/56814fb3550346895dbd6c3a/html5/thumbnails/42.jpg)
42
Thank you!