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

Slides:



Advertisements
Similar presentations
Great Theoretical Ideas in Computer Science
Advertisements

Approximation Algorithms
Greedy Algorithms Greed is good. (Some of the time)
1 Discrete Structures & Algorithms Graphs and Trees: III EECE 320.
Graphs III (Trees, MSTs) (Chp 11.5, 11.6)
Private Approximation of Search Problems Amos Beimel Paz Carmi Kobbi Nissim Enav Weinreb Ben Gurion University Research partially Supported by the Frankel.
1 NP-Complete Problems. 2 We discuss some hard problems:  how hard? (computational complexity)  what makes them hard?  any solutions? Definitions 
1 Chapter 22: Elementary Graph Algorithms IV. 2 About this lecture Review of Strongly Connected Components (SCC) in a directed graph Finding all SCC (i.e.,
Bicriteria Approximation Tradeoff for the Node-Cost Budget Problem Yuval Rabani (Technion) Gabriel Scalosub (Tel Aviv University)
Polynomial Time Approximation Schemes Presented By: Leonid Barenboim Roee Weisbert.
Parallel Scheduling of Complex DAGs under Uncertainty Grzegorz Malewicz.
Combinatorial Algorithms
Approximation Algorithms for Unique Games Luca Trevisan Slides by Avi Eyal.
Fast FAST By Noga Alon, Daniel Lokshtanov And Saket Saurabh Presentation by Gil Einziger.
Complexity 16-1 Complexity Andrei Bulatov Non-Approximability.
Great Theoretical Ideas in Computer Science.
CPSC 668Set 10: Consensus with Byzantine Failures1 CPSC 668 Distributed Algorithms and Systems Fall 2009 Prof. Jennifer Welch.
Computability and Complexity 23-1 Computability and Complexity Andrei Bulatov Search and Optimization.
1 Discrete Structures & Algorithms Graphs and Trees: II EECE 320.
Balanced Graph Partitioning Konstantin Andreev Harald Räcke.
CPSC 668Set 10: Consensus with Byzantine Failures1 CPSC 668 Distributed Algorithms and Systems Fall 2006 Prof. Jennifer Welch.
A general approximation technique for constrained forest problems Michael X. Goemans & David P. Williamson Presented by: Yonatan Elhanani & Yuval Cohen.
Greedy Algorithms Reading Material: Chapter 8 (Except Section 8.5)
Computability and Complexity 24-1 Computability and Complexity Andrei Bulatov Approximation.
Odds and Ends HP ≤ p HC (again) –Turing reductions Strong NP-completeness versus Weak NP-completeness Vertex Cover to Hamiltonian Cycle.
1 Separator Theorems for Planar Graphs Presented by Shira Zucker.
Greedy Algorithms Like dynamic programming algorithms, greedy algorithms are usually designed to solve optimization problems Unlike dynamic programming.
Distributed Combinatorial Optimization
Complexity 1 Hardness of Approximation. Complexity 2 Introduction Objectives: –To show several approximation problems are NP-hard Overview: –Reminder:
Using Homogeneous Weights for Approximating the Partial Cover Problem
Steiner trees Algorithms and Networks. Steiner Trees2 Today Steiner trees: what and why? NP-completeness Approximation algorithms Preprocessing.
Approximation Algorithms
The Art Gallery Problem
Primal-Dual Meets Local Search: Approximating MST’s with Non-uniform Degree Bounds Author: Jochen Könemann R. Ravi From CMU CS 3150 Presentation by Dan.
APPROXIMATION ALGORITHMS VERTEX COVER – MAX CUT PROBLEMS
Design Techniques for Approximation Algorithms and Approximation Classes.
Lecture 22 More NPC problems
Approximating the Minimum Degree Spanning Tree to within One from the Optimal Degree R 陳建霖 R 宋彥朋 B 楊鈞羽 R 郭慶徵 R
UNC Chapel Hill Lin/Foskey/Manocha Minimum Spanning Trees Problem: Connect a set of nodes by a network of minimal total length Some applications: –Communication.
Chapter 8 PD-Method and Local Ratio (4) Local ratio This ppt is editored from a ppt of Reuven Bar-Yehuda. Reuven Bar-Yehuda.
On a Network Creation Game PoA Seminar Presenting: Oren Gilon Based on an article by Fabrikant et al 1.
Week 10Complexity of Algorithms1 Hard Computational Problems Some computational problems are hard Despite a numerous attempts we do not know any efficient.
 Rooted tree and binary tree  Theorem 5.19: A full binary tree with t leaves contains i=t-1 internal vertices.
15-853Page :Algorithms in the Real World Planar Separators I & II – Definitions – Separators of Trees – Planar Separator Theorem.
Introduction to Graphs And Breadth First Search. Graphs: what are they? Representations of pairwise relationships Collections of objects under some specified.
The full Steiner tree problem Theoretical Computer Science 306 (2003) C. L. Lu, C. Y. Tang, R. C. T. Lee Reporter: Cheng-Chung Li 2004/06/28.
TU/e Algorithms (2IL15) – Lecture 12 1 Linear Programming.
1 The instructor will be absent on March 29 th. The class resumes on March 31 st.
5.6 Prefix codes and optimal tree Definition 31: Codes with this property which the bit string for a letter never occurs as the first part of the bit string.
Chapter 8 PD-Method and Local Ratio (5) Equivalence This ppt is editored from a ppt of Reuven Bar-Yehuda. Reuven Bar-Yehuda.
Mathematical Foundations of AI
Algorithms for Finding Distance-Edge-Colorings of Graphs
Hans Bodlaender, Marek Cygan and Stefan Kratsch
COMP 6/4030 ALGORITHMS Prim’s Theorem 10/26/2000.
Lecture 12 Algorithm Analysis
Computability and Complexity
The Art Gallery Problem
Discrete Mathematics for Computer Science
The Subset Sum Game Revisited
The Art Gallery Problem
Coping With NP-Completeness
CS 583 Analysis of Algorithms
Lecture 12 Algorithm Analysis
The Full Steiner tree problem Part Two
No Guarantee Unless P equals NP
Lecture 12 Algorithm Analysis
Coping With NP-Completeness
Perfect Phylogeny Tutorial #10
Minimum Spanning Trees
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 is a cover if there is a recoloring which changes only vertices from. Coloring Cover

5 Formal Definition Input:Weight vector W, Tree T, Coloring . Output:Coloring Cover. Cost: Cost=2+9=11

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 . Minimize w∙x Subject 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.

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 w 1 x is an r-approximation with respect to w 2 x is an r-approximation with respect to w 1 +w 2 Proof:Let x*, x 1 *, x 2 * opts w.r.t. w, w 1, w 2. w 1 · x  r × w 1 x 1 * w 2 · x  r × w 2 x 2 *  w · x  r × (w 1 x 1 * + w 2 x 2 *)  r × ( w 1 x* + w 2 x* ) = r × ( w 1 + w 2 ) x*

11 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 Return Optimal(T, ,W) Else, Let V ’ be the set of the corresponding 6 vertices Define Let Return MinCR3(T, ,W-W 1 )

13 Running Example

14 Running Example (2)

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

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. { d ttt

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

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

19 Weight Reduction # kk

20 Weight Reduction # K nodes

21 Weight Reduction #

22 Weight Reduction #

23 Light Colorings A coloring is light k 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 light k coloring Return SolveLight(T, ,W) Find (t,d)-separator ( ) Let V ’ be the set of it ’ s t∙d vertices Define Let Return MinCR(T, ,W-W 1 )

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-W 1 (Induction hyp.). Every solution is an r-aprx w.r.t. W 1. Thus, X is an r-aprx w.r.t. to W (LR Theorem).

26 What ’ s Next? We show how to handle light k colorings …

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

28 In a Light Coloring, for any v: s 1 ≤deg(v) s 2 ≤k-1 s 3 ≤3 s 4 ≤2 s k ≤1 Lemma 1 Trivial. There are at most deg(v) components.

29 Otherwise, s 1 ≥s 2 ≥k. Not a light coloring. Contradiction. For every v: s 1 ≤deg(v) s 2 ≤k-1 s 3 ≤3 s 4 ≤2 s k ≤1 Lemma 1 (cont.) K nodes

30 Otherwise, s 1 ≥s 2 ≥s 3 ≥4. Not a light coloring. Contradiction. For every v: s 1 ≤deg(v) s 2 ≤k-1 s 3 ≤3 s 4 ≤2 s k ≤1 Lemma 1 (cont.)

31 Otherwise, s 1 ≥s 2 ≥s 3 ≥s 4 ≥3. Not a light coloring. Contradiction. For every v: s 1 ≤deg(v) s 2 ≤k-1 s 3 ≤3 s 4 ≤2 s k ≤1 Lemma 1 (cont.)

32 Otherwise, s 1 ≥s 2 ≥…≥s k ≥2. Not a light coloring. Contradiction. For every v: s 1 ≤deg(v) s 2 ≤k-1 s 3 ≤3 s 4 ≤2 s k ≤1 Lemma 1 (cont.) kk

33 Conclusion We would like to assign colors to connected components. We will assign each color only to components containing it Deg(v) … k k254 3 …

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

35 Observation 1 v vjvj vivi

36 Conclusion 2 v v2v2 v1v1 NewColor(v)=, NewColor(v 2 ) ≠ c c No c c c

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

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 Cost of recoloring a subtree - cost of recoloring subtree(v i ) while  i are reserved colors and NewColor(v)=c. v vivi Case 1: Case 2: v vivi

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

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

42 Thank you!

43 Separated Colors Idea: Enough to recolor v with v vv C v ={,,,, } 123 v

44 Good Recoloring A recoloring is good if for every vertex v,. Lemma: An optimal good recoloring is an optimal recoloring.

45 Good Recoloring - Proof Step 1:Find an optimal cover

46 Good Recoloring – Proof (2) Step 2:Uncolor covered vertices

47 Good Recoloring – Proof (3) Step 3: If a vertex is on between 2 c vertices, color it with c

48 Good Recoloring – Proof (4) 11 00 Step 4: Recolor other nodes with  v This recoloring is good.

49 Observation on Good Recolorings, v u

50 Observation (cont.) Need to check partitions that for each i:. Denote by GPart the group of such partitions.

51 Revised Dynamic Prog.

52 Complexity Analysis Time complexity for calculating OPT C,c (v) for a node v, every color c and every C: Number of colors Number of options for Calculating the sum

53 Complexity Analysis (Cont.) By scanning the partitions in a order with a constant hamming distance, time per vertex can be reduced to: Summing on all vertices:

54 Weight Reductions Complexity Na ï ve implementation: O(nc) per one reduction, O(n 2 c) total. Could be implemented in O(nc) total. Summing up: O(nc) for weight reduction O(nk 2 2 k ) for DP.