Approximating the BestFit Tree Under L p Norms Boulos Harb, Sampath - - PowerPoint PPT Presentation

approximating the best fit tree under l p norms
SMART_READER_LITE
LIVE PREVIEW

Approximating the BestFit Tree Under L p Norms Boulos Harb, Sampath - - PowerPoint PPT Presentation

Approximating the BestFit Tree Under L p Norms Boulos Harb, Sampath Kannan and Andrew McGregor, UPenn 0 = h L x,z ( x ) x ( dz ) 1 t + h L x,y x ( s ) ( x ) ds t L x,z ( x ) E y t 0 The


slide-1
SLIDE 1

Approximating the Best–Fit Tree Under Lp Norms

Boulos Harb, Sampath Kannan and Andrew McGregor, UPenn

slide-2
SLIDE 2

The Problem(s)

  • Input: Distance Matrix D[i,j] on n items
  • Output: Tree Metri c T[i,j]
  • Goal: Minimize the Lp cost-of-fit

Lp(D, T) =  

i,j

|D[i, j] − T[i, j]|p  

1/p

Tree Metric Lp

  • = h
  • Lx,zϕ(x)ρx(dz)

+ h 1 tε

  • Ey

tε Lx,yx(s)ϕ(x) ds − tε

  • Lx,zϕ(x)

+ 1 tε

  • Ey

tε Lx,yx(s)ϕ(x) ds − Ex,y tε Lx = h Lxϕ(x) + hθε(x, y)

slide-3
SLIDE 3

The Problem(s)

  • Input: Distance Matrix D[i,j] on n items
  • Output: Tree Metri c T[i,j]
  • Goal: Minimize the Lp cost-of-fit

Lp(D, T) =  

i,j

|D[i, j] − T[i, j]|p  

1/p

Ultrametric Lp

  • = h
  • Lx,zϕ(x)ρx(dz)

+ h 1 tε

  • Ey

tε Lx,yx(s)ϕ(x) ds − tε

  • Lx,zϕ(x)

+ 1 tε

  • Ey

tε Lx,yx(s)ϕ(x) ds − Ex,y tε Lx = h Lxϕ(x) + hθε(x, y)

slide-4
SLIDE 4

The Problem(s)

  • Input: Distance Matrix D[i,j] on n items
  • Output: Tree Metri c T[i,j]
  • Goal: Minimize the Lp cost-of-fit

Ultrametric Lrel

  • = h
  • Lx,zϕ(x)ρx(dz)

+ h 1 tε

  • Ey

tε Lx,yx(s)ϕ(x) ds − tε

  • Lx,zϕ(x)

+ 1 tε

  • Ey

tε Lx,yx(s)ϕ(x) ds − Ex,y tε Lx = h Lxϕ(x) + hθε(x, y)

Lrel(D, T) =

  • i,j

max D[i, j] T[i, j] , T[i, j] D[i, j]

slide-5
SLIDE 5

Tree Metric & Ultrametrics

  • Tree Metric: Distances between the leaves of a weighted tree.
  • Ultrametric: Distance between the leaves of a rooted

weighted tree in which all leaves are equidistance from root.

∀x, y, z ∈ [n] T[x, y] ≤ max{T[x, z], T[z, y]}

∀w, x, y, z ∈ [n] T[w, x] + T[y, z] ≤ max{T[w, y] + T[x, z], T[w, z] + T[x, y]}

slide-6
SLIDE 6

Tree Metric & Ultrametrics

  • Tree Metric: Distances between the leaves of a weighted tree.
  • Ultrametric: Distance between the leaves of a rooted

weighted tree in which all leaves are equidistance from root.

2 2 1 1 1 2 2 3 3 1 4 3 3 3 2

∀x, y, z ∈ [n] T[x, y] ≤ max{T[x, z], T[z, y]}

∀w, x, y, z ∈ [n] T[w, x] + T[y, z] ≤ max{T[w, y] + T[x, z], T[w, z] + T[x, y]}

slide-7
SLIDE 7

Biological Motivation

  • View ultrametric as an evolutionary tree
  • D[i,j] is estimate of time since species i and j diverged
  • Goal: Reconcile contradictory estimates
slide-8
SLIDE 8

Biological Motivation

  • View ultrametric as an evolutionary tree
  • D[i,j] is estimate of time since species i and j diverged
  • Goal: Reconcile contradictory estimates

Theorist Computational Geometer Shell Fish Chimp Orangutan Bee Fish Wasp Spider

slide-9
SLIDE 9

Previous Work

slide-10
SLIDE 10

Previous Work

  • Farach, Kannan & Warnow ’95:

Exact construction of best-fit ultrametric under L∞

slide-11
SLIDE 11

Previous Work

  • Farach, Kannan & Warnow ’95:

Exact construction of best-fit ultrametric under L∞

  • Agarwala, Bafna, Farach, Paterson & Thorup ’99:

3 approximation of best-fit tree under L∞

slide-12
SLIDE 12

Previous Work

  • Farach, Kannan & Warnow ’95:

Exact construction of best-fit ultrametric under L∞

  • Agarwala, Bafna, Farach, Paterson & Thorup ’99:

3 approximation of best-fit tree under L∞

  • Ma, Wang & Zhang ’99:

n1/p approximation of best-fit non-contracting ultrametric under Lp

slide-13
SLIDE 13

Previous Work

  • Farach, Kannan & Warnow ’95:

Exact construction of best-fit ultrametric under L∞

  • Agarwala, Bafna, Farach, Paterson & Thorup ’99:

3 approximation of best-fit tree under L∞

  • Ma, Wang & Zhang ’99:

n1/p approximation of best-fit non-contracting ultrametric under Lp

  • Dhamdhere ’04:

O(log1/p n) approximation of best-fit line metric under Lp

slide-14
SLIDE 14

Our Results

  • Algorithm #1:

Lp: O(k log n)1/p approximation to best-fit tree where k is the number of distinct distances in D Lrel: O(log2 n) approximation to best-fit ultrametric

  • Algorithm #2:

Lp: n1/p approximation to best-fit tree

slide-15
SLIDE 15

Algorithm #1

slide-16
SLIDE 16

Restricting Splitting Distances

slide-17
SLIDE 17

Restricting Splitting Distances

  • Original distances are d1<d2< ... < dk
slide-18
SLIDE 18

Restricting Splitting Distances

  • Original distances are d1<d2< ... < dk
  • Lemma:
slide-19
SLIDE 19

Restricting Splitting Distances

  • Original distances are d1<d2< ... < dk
  • Lemma:

a) There exists a best-fit (under L1) ultrametric whose distances are a subset of {d1,d2,... , dk}

slide-20
SLIDE 20

Restricting Splitting Distances

  • Original distances are d1<d2< ... < dk
  • Lemma:

a) There exists a best-fit (under L1) ultrametric whose distances are a subset of {d1,d2,... , dk} b) There exists an ultrametric whose distances are a subset of {d1,d2,... , dk} whose cost-of-fit is at most twice optimal (under Lp).

slide-21
SLIDE 21

Restricting Splitting Distances

  • Original distances are d1<d2< ... < dk
  • Lemma:

a) There exists a best-fit (under L1) ultrametric whose distances are a subset of {d1,d2,... , dk} b) There exists an ultrametric whose distances are a subset of {d1,d2,... , dk} whose cost-of-fit is at most twice optimal (under Lp). c)There exists an ultrametric with O(log n) distances whose cost-of-fit is at most twice optimal (under Lrel). [Assuming dk/d1 is polynomial in n.]

slide-22
SLIDE 22
slide-23
SLIDE 23

d1 d2 d3 d4

slide-24
SLIDE 24

d1 d2 d3 d4

slide-25
SLIDE 25

d1 d2 d3 d4

“Splitting Distance” of internal node v = Distance between leaves of subtree rooted a v

slide-26
SLIDE 26

d1 d2 d3 d4

“Splitting Distance” of internal node v = Distance between leaves of subtree rooted a v

slide-27
SLIDE 27

d1 d2 d3 d4

“Splitting Distance” of internal node v = Distance between leaves of subtree rooted a v

slide-28
SLIDE 28
  • Construct top partition G → G1, G2, G3, ...

Set length of inter-cluster edges to dk All other lengths will be set to ≤ dk-1

  • Construct trees for G1, G2, G3, ...

Algorithm Outline

slide-29
SLIDE 29
slide-30
SLIDE 30

G1 G2 G3

slide-31
SLIDE 31

G1 G2 G3

T[i,j]=dk

slide-32
SLIDE 32

G1 G2 G3

T[i,j]≤dk-1

slide-33
SLIDE 33

G1 G2 G3

slide-34
SLIDE 34

G1 G2 G3

slide-35
SLIDE 35
  • Input: Weighted (positive and negative) graph
  • Output: A partitioning of nodes
  • Goal: Minimize,
  • O(log n) approximation [Charikar, Guruswami and Wirth ’03]

Correlation Clustering

  • e:we>0

(|we| if e is split) +

  • e:we<0

(|we| if e is not split)

slide-36
SLIDE 36
  • Input: Weighted (positive and negative) graph
  • Output: A partitioning of nodes
  • Goal: Minimize,
  • O(log n) approximation [Charikar, Guruswami and Wirth ’03]

Correlation Clustering

  • e:we>0

(|we| if e is split) +

  • e:we<0

(|we| if e is not split)

  • 5

+2 +1 +3 +1

  • 1
  • 7
  • 5

+2

slide-37
SLIDE 37
  • Input: Weighted (positive and negative) graph
  • Output: A partitioning of nodes
  • Goal: Minimize,
  • O(log n) approximation [Charikar, Guruswami and Wirth ’03]

Correlation Clustering

  • e:we>0

(|we| if e is split) +

  • e:we<0

(|we| if e is not split)

  • 5

+2 +1 +3 +1

  • 1
  • 7
  • 5

+2

slide-38
SLIDE 38

Best-Fit Ultrametric Instance:

Using Correlation Clustering

20 11 14 17 20 18 20 20 18 20

slide-39
SLIDE 39

Best-Fit Ultrametric Instance:

Using Correlation Clustering

20 11 14 17 20 18 20 20 18 20

Possible Splitting Distances: 20, 18, 17, 14, 11

slide-40
SLIDE 40

Best-Fit Ultrametric Instance:

Using Correlation Clustering

20 11 14 17 20 18 20 20 18 20

Possible Splitting Distances: 20, 18, 17, 14, 11 Top level clustering: Increase some lengths to 20 and decrease some length 20 edges to 18

slide-41
SLIDE 41

Best-Fit Ultrametric Instance:

Using Correlation Clustering

20 11 14 17 20 18 20 20 18 20

  • 2

+9 +6 +3

  • 2

+2

  • 2
  • 2

+2

  • 2

Correlation Clustering Instance:

slide-42
SLIDE 42

Best-Fit Ultrametric Instance:

Using Correlation Clustering

20 11 14 17 20 18 20 20 18 20

  • 2

+9 +6 +3

  • 2

+2

  • 2
  • 2

+2

  • 2

Correlation Clustering Instance:

slide-43
SLIDE 43

Best-Fit Ultrametric Instance:

Using Correlation Clustering

20 11 14 17 20 18 20 20 18 20

  • 2

+9 +6 +3

  • 2

+2

  • 2
  • 2

+2

  • 2

Correlation Clustering Instance:

slide-44
SLIDE 44

Best-Fit Ultrametric Instance:

Using Correlation Clustering

20 11 14 17 20 20 20 18 20

  • 2

+9 +6 +3

  • 2

+2

  • 2
  • 2

+2

  • 2

Correlation Clustering Instance:

20

slide-45
SLIDE 45

Best-Fit Ultrametric Instance:

Using Correlation Clustering

20 11 14 17 20 20 20 18 20

  • 2

+9 +6 +3

  • 2

+2

  • 2
  • 2

+2

  • 2

Correlation Clustering Instance:

20

Cost of length changes = Cost of disagreements during clustering

slide-46
SLIDE 46

Best-Fit Ultrametric Instance:

Using Correlation Clustering

20 11 14 17 20 20 20 18 20

  • 2

+9 +6 +3

  • 2

+2

  • 2
  • 2

+2

  • 2

Correlation Clustering Instance:

20

Cost of length changes = Cost of disagreements during clustering

17 11 14

Recurse:

18

slide-47
SLIDE 47

Best-Fit Ultrametric Instance:

Using Correlation Clustering

20 11 14 17 20 20 20 18 20

  • 2

+9 +6 +3

  • 2

+2

  • 2
  • 2

+2

  • 2

Correlation Clustering Instance:

20

Cost of length changes = Cost of disagreements during clustering

17 11 14

Recurse:

14

slide-48
SLIDE 48

Analysis (Outline)

slide-49
SLIDE 49

Analysis (Outline)

  • Let OPT be cost of fit of best-fit tree (under L1)
slide-50
SLIDE 50

Analysis (Outline)

  • Let OPT be cost of fit of best-fit tree (under L1)
  • In each of k steps:

Cost of optimal clustering is ≤ OPT Cost of our clustering is ≤ O(log n) OPT

slide-51
SLIDE 51

Analysis (Outline)

  • Let OPT be cost of fit of best-fit tree (under L1)
  • In each of k steps:

Cost of optimal clustering is ≤ OPT Cost of our clustering is ≤ O(log n) OPT

  • Total cost of clusterings = L1(T, D) ≤ O(k log n) OPT
slide-52
SLIDE 52

Analysis (Outline)

  • Let OPT be cost of fit of best-fit tree (under L1)
  • In each of k steps:

Cost of optimal clustering is ≤ OPT Cost of our clustering is ≤ O(log n) OPT

  • Total cost of clusterings = L1(T, D) ≤ O(k log n) OPT
slide-53
SLIDE 53

Analysis (Outline)

  • Let OPT be cost of fit of best-fit tree (under L1)
  • In each of k steps:

Cost of optimal clustering is ≤ OPT Cost of our clustering is ≤ O(log n) OPT

  • Total cost of clusterings = L1(T, D) ≤ O(k log n) OPT
  • For Lp : seek to minimize Lpp (T, D)
slide-54
SLIDE 54

Analysis (Outline)

  • Let OPT be cost of fit of best-fit tree (under L1)
  • In each of k steps:

Cost of optimal clustering is ≤ OPT Cost of our clustering is ≤ O(log n) OPT

  • Total cost of clusterings = L1(T, D) ≤ O(k log n) OPT
  • For Lp : seek to minimize Lpp (T, D)
  • Similar analysis yields an O(log2 n) approx under Lrel
slide-55
SLIDE 55

Algorithm #2

slide-56
SLIDE 56

Algorithm

  • For d = dk to d1:

Consider reducing maximum length to d and forcing a partition “Push-down-cost(d)” - cost of reducing each length ≥ d to d “Cutting-cost(d)” - cost of increasing cut edge’s length to d

  • Split at d such that Push-down-cost(d)+ Cutting-cost(d)
  • Recurse on each side of the cut
slide-57
SLIDE 57

Best-Fit Ultrametric Instance:

Using Minimum Cuts

19 11 14 17 20 18 19 19 18 19 1 9 6 3 2 1 1 2 1

Minimum Cut Instance:

Split at 20: Push-down cost = 0, Cut-cost = 3

slide-58
SLIDE 58

Best-Fit Ultrametric Instance:

Using Minimum Cuts

19 11 14 17 20 18 19 19 18 19 1 9 6 3 2 1 1 2 1

Minimum Cut Instance:

Split at 20: Push-down cost = 0, Cut-cost = 3

slide-59
SLIDE 59

Best-Fit Ultrametric Instance:

Using Minimum Cuts

19 11 14 17 20 18 19 19 18 19 1 9 6 3 2 1 1 2 1

Minimum Cut Instance:

Split at 20: Push-down cost = 0, Cut-cost = 3

slide-60
SLIDE 60

Best-Fit Ultrametric Instance:

Using Minimum Cuts

19 11 14 17 20 18 19 19 18 19 8 5 2 1 1

Minimum Cut Instance:

Split at 20: Push-down cost = 0, Cut-cost = 3 Split at 19: Push-down cost = 1, Cut-cost =1

slide-61
SLIDE 61

Best-Fit Ultrametric Instance:

Using Minimum Cuts

19 11 14 17 20 18 19 19 18 19 8 5 2 1 1

Minimum Cut Instance:

Split at 20: Push-down cost = 0, Cut-cost = 3 Split at 19: Push-down cost = 1, Cut-cost =1

slide-62
SLIDE 62

Best-Fit Ultrametric Instance:

Using Minimum Cuts

19 11 14 17 20 18 19 19 18 19 8 5 2 1 1

Minimum Cut Instance:

Split at 20: Push-down cost = 0, Cut-cost = 3 Split at 19: Push-down cost = 1, Cut-cost =1

slide-63
SLIDE 63

Best-Fit Ultrametric Instance:

Using Minimum Cuts

19 11 14 17 20 18 19 19 18 19 7 4 1 1

Minimum Cut Instance:

Split at 20: Push-down cost = 0, Cut-cost = 3 Split at 19: Push-down cost = 1, Cut-cost =1 Split at 18: Push-down cost = 5, Cut-cost = 0

slide-64
SLIDE 64

Best-Fit Ultrametric Instance:

Using Minimum Cuts

19 11 14 17 20 18 19 19 18 19 7 4 1 1

Minimum Cut Instance:

Split at 20: Push-down cost = 0, Cut-cost = 3 Split at 19: Push-down cost = 1, Cut-cost =1 Split at 18: Push-down cost = 5, Cut-cost = 0

slide-65
SLIDE 65

Best-Fit Ultrametric Instance:

Using Minimum Cuts

19 11 14 17 20 18 19 19 18 19 7 4 1 1

Minimum Cut Instance:

Split at 20: Push-down cost = 0, Cut-cost = 3 Split at 19: Push-down cost = 1, Cut-cost =1 Split at 18: Push-down cost = 5, Cut-cost = 0

slide-66
SLIDE 66

d1 dk-2 dk-1 dk

: :

slide-67
SLIDE 67

d1 dk-2 dk-1 dk

: :

slide-68
SLIDE 68

d1 dk-2 dk-1 dk

: :

slide-69
SLIDE 69

d1 dk-2 dk-1 dk

: :

slide-70
SLIDE 70

d1 dk-2 dk-1 dk

: :

slide-71
SLIDE 71

d1 dk-2 dk-1 dk

: :

slide-72
SLIDE 72

d1 dk-2 dk-1 dk

: :

slide-73
SLIDE 73

d1 dk-2 dk-1 dk

: :

slide-74
SLIDE 74

d1 dk-2 dk-1 dk

: :

slide-75
SLIDE 75

d1 dk-2 dk-1 dk

: :

slide-76
SLIDE 76

d1 dk-2 dk-1 dk

: :

slide-77
SLIDE 77

T[i,j]=dk-1

d1 dk-2 dk-1 dk

: :

slide-78
SLIDE 78

d1 dk-2 dk-1 dk

: :

slide-79
SLIDE 79

d1 dk-2 dk-1 dk

: :

slide-80
SLIDE 80
  • There are at most n cuts to be found
  • For each cut:

mind Push-down-cost(d) + Cutting-cost(d) ≤ OPT

  • Total Cost = Lp(T,D)

Analysis (Outline)

slide-81
SLIDE 81

Extending to Trees

slide-82
SLIDE 82

Extending to Trees

  • Theorem [Agarwala, Bafna, Farach, Paterson, Thorup ’99]:

An α-approx to the optimal “a-restricted ultrametric” (under Lp) can be used to construct an 3α-approx to the optimal tree metric under (under Lp).

slide-83
SLIDE 83

Extending to Trees

  • Theorem [Agarwala, Bafna, Farach, Paterson, Thorup ’99]:

An α-approx to the optimal “a-restricted ultrametric” (under Lp) can be used to construct an 3α-approx to the optimal tree metric under (under Lp).

  • Definition: An a-restricted ultrametric satisfies:

For all i, T[a,i] = 2μ For all i,j, 2μ ≥ T[i,j] ≥2 (μ-min (D[a,i], D[a,j])) where μ=maxi D[a,i ]

slide-84
SLIDE 84

Conclusions

  • Best-fit Tree or Ultrametric:

Lp: O(min(n, k log n))1/p approximation where k is the number of distinct distances in D Lrel: O(log2 n) approximation

  • Best-fit Tree:

Lp: n1/p approximation

slide-85
SLIDE 85

Conclusions

  • Best-fit Tree or Ultrametric:

Lp: O(min(n, k log n))1/p approximation where k is the number of distinct distances in D Lrel: O(log2 n) approximation

  • Best-fit Tree:

Lp: n1/p approximation Late Breaking News: Upcoming FOCS paper byAilon and Charikar has improved results!

slide-86
SLIDE 86

Thanks.