58
Metric Techniques and Approximation Algorithms Anupam Gupta Carnegie Mellon University

adfocs1-annotateanupamg/adfocs/Gupta-lec1.pdf · 2008. 10. 6. · Title: Microsoft PowerPoint - adfocs1-annotate Author: anupam Created Date: 8/18/2008 4:26:30 PM

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: adfocs1-annotateanupamg/adfocs/Gupta-lec1.pdf · 2008. 10. 6. · Title: Microsoft PowerPoint - adfocs1-annotate Author: anupam Created Date: 8/18/2008 4:26:30 PM

Metric Techniques and

Approximation Algorithms

Anupam Gupta

Carnegie Mellon University

Page 2: adfocs1-annotateanupamg/adfocs/Gupta-lec1.pdf · 2008. 10. 6. · Title: Microsoft PowerPoint - adfocs1-annotate Author: anupam Created Date: 8/18/2008 4:26:30 PM

Metric space M = (V, d)

set V of points

y

z

distances d(x,y)

triangle inequality

d(x,y) ≤ d(x,z) + d(z,y)x

Page 3: adfocs1-annotateanupamg/adfocs/Gupta-lec1.pdf · 2008. 10. 6. · Title: Microsoft PowerPoint - adfocs1-annotate Author: anupam Created Date: 8/18/2008 4:26:30 PM

why metric spaces?

Metric spaces are inputs to problems

TSP

round trip delays between machines

distances between strings

but also,

Metric spaces are useful abstractions for various problems

and interesting mathematical objects in their own right

Page 4: adfocs1-annotateanupamg/adfocs/Gupta-lec1.pdf · 2008. 10. 6. · Title: Microsoft PowerPoint - adfocs1-annotate Author: anupam Created Date: 8/18/2008 4:26:30 PM

Metrics

Distances d

0 1 4 5 61 0 3 4 54 3 0 1 25 4 1 0 36 5 2 3 0

13

12

3

44

5

6

5

a

bc

d

e

Page 5: adfocs1-annotateanupamg/adfocs/Gupta-lec1.pdf · 2008. 10. 6. · Title: Microsoft PowerPoint - adfocs1-annotate Author: anupam Created Date: 8/18/2008 4:26:30 PM

Choose your representation

IHGFEDCBA

69450114188436151-32794C

347127387388115404327-234B

17034820828233124494234-A

-468441264548569347170I

468-514509137527450127348H

44514-9049346114387208G

12650990-49758188388282F

454137493497-513436115331E

855274658513-151404244D

69450114188436151-32794C

Page 6: adfocs1-annotateanupamg/adfocs/Gupta-lec1.pdf · 2008. 10. 6. · Title: Microsoft PowerPoint - adfocs1-annotate Author: anupam Created Date: 8/18/2008 4:26:30 PM

Choose your representation

SJSDSFSacPSNapaMntrLAH.C.

69450114188436151-32794Monterey

347127387388115404327-234LA

17034820828233124494234-Hearst Castle

-468441264548569347170San Jose

468-514509137527450127348San Diego

44514-9049346114387208San Francisco

12650990-49758188388282Sacramento

454137493497-513436115331Palm Springs

855274658513-151404244Napa

69450114188436151-32794Monterey

Page 7: adfocs1-annotateanupamg/adfocs/Gupta-lec1.pdf · 2008. 10. 6. · Title: Microsoft PowerPoint - adfocs1-annotate Author: anupam Created Date: 8/18/2008 4:26:30 PM

Choose your representation

Good approximation

via 2-d Euclidean

distances

or even via a sparse

skeleton of edges: a skeleton of edges: a

“spanner”497

115127

234

Page 8: adfocs1-annotateanupamg/adfocs/Gupta-lec1.pdf · 2008. 10. 6. · Title: Microsoft PowerPoint - adfocs1-annotate Author: anupam Created Date: 8/18/2008 4:26:30 PM

Representations

• Just a distance matrix

• Shortest-path metric of a (simple) graph

• Points in Rk with the ℓp metric

• low-dimensional geometric representations

Page 9: adfocs1-annotateanupamg/adfocs/Gupta-lec1.pdf · 2008. 10. 6. · Title: Microsoft PowerPoint - adfocs1-annotate Author: anupam Created Date: 8/18/2008 4:26:30 PM

Tree metric

Page 10: adfocs1-annotateanupamg/adfocs/Gupta-lec1.pdf · 2008. 10. 6. · Title: Microsoft PowerPoint - adfocs1-annotate Author: anupam Created Date: 8/18/2008 4:26:30 PM

Tree metric

A metric M = (V,d) is a tree metric

if there exists a tree T = (V ∪ X, E)

(with edge-lengths)(with edge-lengths)

such that

d = dT |V × V

Page 11: adfocs1-annotateanupamg/adfocs/Gupta-lec1.pdf · 2008. 10. 6. · Title: Microsoft PowerPoint - adfocs1-annotate Author: anupam Created Date: 8/18/2008 4:26:30 PM

Is every metric a tree metric?

Page 12: adfocs1-annotateanupamg/adfocs/Gupta-lec1.pdf · 2008. 10. 6. · Title: Microsoft PowerPoint - adfocs1-annotate Author: anupam Created Date: 8/18/2008 4:26:30 PM

… “close” to a tree metric?

What is “closeness” between metric spaces?

Page 13: adfocs1-annotateanupamg/adfocs/Gupta-lec1.pdf · 2008. 10. 6. · Title: Microsoft PowerPoint - adfocs1-annotate Author: anupam Created Date: 8/18/2008 4:26:30 PM

Properties of distortion

Page 14: adfocs1-annotateanupamg/adfocs/Gupta-lec1.pdf · 2008. 10. 6. · Title: Microsoft PowerPoint - adfocs1-annotate Author: anupam Created Date: 8/18/2008 4:26:30 PM

… close to a tree metric?

So, does every metric admit a low-distortion embedding

into a tree metric?

Page 15: adfocs1-annotateanupamg/adfocs/Gupta-lec1.pdf · 2008. 10. 6. · Title: Microsoft PowerPoint - adfocs1-annotate Author: anupam Created Date: 8/18/2008 4:26:30 PM

what do we do now?

Here’s a solution…

a

b c

d

Here’s a solution…

Page 16: adfocs1-annotateanupamg/adfocs/Gupta-lec1.pdf · 2008. 10. 6. · Title: Microsoft PowerPoint - adfocs1-annotate Author: anupam Created Date: 8/18/2008 4:26:30 PM

“dominating trees”

Given a metric M = (V,d)

let = tree T | dT ≥ d

distances in T “dominate” distances in d

Page 17: adfocs1-annotateanupamg/adfocs/Gupta-lec1.pdf · 2008. 10. 6. · Title: Microsoft PowerPoint - adfocs1-annotate Author: anupam Created Date: 8/18/2008 4:26:30 PM

random tree embeddings

Page 18: adfocs1-annotateanupamg/adfocs/Gupta-lec1.pdf · 2008. 10. 6. · Title: Microsoft PowerPoint - adfocs1-annotate Author: anupam Created Date: 8/18/2008 4:26:30 PM

why are these useful?

Consider, say, the traveling salesman problem:

Page 19: adfocs1-annotateanupamg/adfocs/Gupta-lec1.pdf · 2008. 10. 6. · Title: Microsoft PowerPoint - adfocs1-annotate Author: anupam Created Date: 8/18/2008 4:26:30 PM

quick recap of goals

Given a metric M =(V,d)

find a distribution over trees such that

1. d(x,y) ≤ dT(x,y) for all trees in

2. ET[ dT(x,y) ] ≤ αααα × d(x,y)

Page 20: adfocs1-annotateanupamg/adfocs/Gupta-lec1.pdf · 2008. 10. 6. · Title: Microsoft PowerPoint - adfocs1-annotate Author: anupam Created Date: 8/18/2008 4:26:30 PM

first results

[Alon Karp Peleg West ‘94]

[Bartal ’96, ‘98]

Page 21: adfocs1-annotateanupamg/adfocs/Gupta-lec1.pdf · 2008. 10. 6. · Title: Microsoft PowerPoint - adfocs1-annotate Author: anupam Created Date: 8/18/2008 4:26:30 PM

current world record

[Fakcharoenphol Rao Talwar ’03]

Page 22: adfocs1-annotateanupamg/adfocs/Gupta-lec1.pdf · 2008. 10. 6. · Title: Microsoft PowerPoint - adfocs1-annotate Author: anupam Created Date: 8/18/2008 4:26:30 PM

best possible

Ω(log n) lower bound for

• square grid

• hypercube

• diamond graphs

Page 23: adfocs1-annotateanupamg/adfocs/Gupta-lec1.pdf · 2008. 10. 6. · Title: Microsoft PowerPoint - adfocs1-annotate Author: anupam Created Date: 8/18/2008 4:26:30 PM

Time for some proofs…Time for some proofs…

Page 24: adfocs1-annotateanupamg/adfocs/Gupta-lec1.pdf · 2008. 10. 6. · Title: Microsoft PowerPoint - adfocs1-annotate Author: anupam Created Date: 8/18/2008 4:26:30 PM

useful notation

Given a metric M = (V, d)

• Diameter(S) for S ⊆ V

• Ball B(x,r)

Page 25: adfocs1-annotateanupamg/adfocs/Gupta-lec1.pdf · 2008. 10. 6. · Title: Microsoft PowerPoint - adfocs1-annotate Author: anupam Created Date: 8/18/2008 4:26:30 PM

“padded” decompositions

A metric (V,d) admits β-padded decompositions, if

for every ∆, we can output a random partition

V = V1 ⊎ V2 ⊎ … ⊎ VkV = V1 ⊎ V2 ⊎ … ⊎ Vk

1. each Vj has diameter ≤ ∆

2. Pr[ x and y in different clusters ] ≤

2’. Pr[ ball B(x,ρ) split ] ≤

Page 26: adfocs1-annotateanupamg/adfocs/Gupta-lec1.pdf · 2008. 10. 6. · Title: Microsoft PowerPoint - adfocs1-annotate Author: anupam Created Date: 8/18/2008 4:26:30 PM

why this expression?

Page 27: adfocs1-annotateanupamg/adfocs/Gupta-lec1.pdf · 2008. 10. 6. · Title: Microsoft PowerPoint - adfocs1-annotate Author: anupam Created Date: 8/18/2008 4:26:30 PM

“padded” decompositions

A metric (V,d) admits β-padded decompositions, if

for every ∆, we can output a random partition

V = V1 ⊎ V2 ⊎ … ⊎ VkV = V1 ⊎ V2 ⊎ … ⊎ Vk

1. each Vj has diameter ≤ ∆

2. Pr[ B(x,ρ) split ] ≤

Page 28: adfocs1-annotateanupamg/adfocs/Gupta-lec1.pdf · 2008. 10. 6. · Title: Microsoft PowerPoint - adfocs1-annotate Author: anupam Created Date: 8/18/2008 4:26:30 PM

(weaker) theorems

Theorem 1.

Every n-point metric admits an

β = O(log n)-padded decompositionβ = O(log n)-padded decomposition

Theorem 2.

Embedding into distribution over trees with

α = O(log n × log diameter)

assume min-distance = 1

Page 29: adfocs1-annotateanupamg/adfocs/Gupta-lec1.pdf · 2008. 10. 6. · Title: Microsoft PowerPoint - adfocs1-annotate Author: anupam Created Date: 8/18/2008 4:26:30 PM

(stronger) theorems

Theorem 3.

Every n-point metric admits an

β(x, ∆)-padded decomposition withβ(x, ∆)-padded decomposition with

Theorem 4.

Embedding into distribution over trees with

α = O(log n)

Page 30: adfocs1-annotateanupamg/adfocs/Gupta-lec1.pdf · 2008. 10. 6. · Title: Microsoft PowerPoint - adfocs1-annotate Author: anupam Created Date: 8/18/2008 4:26:30 PM

we’ll prove the weaker results

Theorem 1.

Every n-point metric admits an

β = O(log n)-padded decompositionβ = O(log n)-padded decomposition

Theorem 2.

Embedding into distribution over trees with

α = O(log n log diameter)

Page 31: adfocs1-annotateanupamg/adfocs/Gupta-lec1.pdf · 2008. 10. 6. · Title: Microsoft PowerPoint - adfocs1-annotate Author: anupam Created Date: 8/18/2008 4:26:30 PM

decomposition algorithm

Given a metric M = (V,d) and a parameter ∆

R

Page 32: adfocs1-annotateanupamg/adfocs/Gupta-lec1.pdf · 2008. 10. 6. · Title: Microsoft PowerPoint - adfocs1-annotate Author: anupam Created Date: 8/18/2008 4:26:30 PM

decomposition algorithm

Given a metric M = (V,d) and a parameter ∆

1. each Vj has diameter ≤ ∆

2. Pr[ B(x,ρ) split ] ≤

Page 33: adfocs1-annotateanupamg/adfocs/Gupta-lec1.pdf · 2008. 10. 6. · Title: Microsoft PowerPoint - adfocs1-annotate Author: anupam Created Date: 8/18/2008 4:26:30 PM
Page 34: adfocs1-annotateanupamg/adfocs/Gupta-lec1.pdf · 2008. 10. 6. · Title: Microsoft PowerPoint - adfocs1-annotate Author: anupam Created Date: 8/18/2008 4:26:30 PM
Page 35: adfocs1-annotateanupamg/adfocs/Gupta-lec1.pdf · 2008. 10. 6. · Title: Microsoft PowerPoint - adfocs1-annotate Author: anupam Created Date: 8/18/2008 4:26:30 PM
Page 36: adfocs1-annotateanupamg/adfocs/Gupta-lec1.pdf · 2008. 10. 6. · Title: Microsoft PowerPoint - adfocs1-annotate Author: anupam Created Date: 8/18/2008 4:26:30 PM

Now to show

Theorem 1.

Every n-point metric admits an

β = O(log n)-padded decompositionβ = O(log n)-padded decomposition

Theorem 2.

Embedding into distribution over trees with

α = O(log n log diameter)

Page 37: adfocs1-annotateanupamg/adfocs/Gupta-lec1.pdf · 2008. 10. 6. · Title: Microsoft PowerPoint - adfocs1-annotate Author: anupam Created Date: 8/18/2008 4:26:30 PM

tree-building

Page 38: adfocs1-annotateanupamg/adfocs/Gupta-lec1.pdf · 2008. 10. 6. · Title: Microsoft PowerPoint - adfocs1-annotate Author: anupam Created Date: 8/18/2008 4:26:30 PM

tree-building

1. Distances in tree are at least d(x,y)

2. E[ distance(x,y) in tree ] ≤ O(log n log diam) d(x,y)

Initially call with FRT(V, log(diameter))

Page 39: adfocs1-annotateanupamg/adfocs/Gupta-lec1.pdf · 2008. 10. 6. · Title: Microsoft PowerPoint - adfocs1-annotate Author: anupam Created Date: 8/18/2008 4:26:30 PM
Page 40: adfocs1-annotateanupamg/adfocs/Gupta-lec1.pdf · 2008. 10. 6. · Title: Microsoft PowerPoint - adfocs1-annotate Author: anupam Created Date: 8/18/2008 4:26:30 PM
Page 41: adfocs1-annotateanupamg/adfocs/Gupta-lec1.pdf · 2008. 10. 6. · Title: Microsoft PowerPoint - adfocs1-annotate Author: anupam Created Date: 8/18/2008 4:26:30 PM
Page 42: adfocs1-annotateanupamg/adfocs/Gupta-lec1.pdf · 2008. 10. 6. · Title: Microsoft PowerPoint - adfocs1-annotate Author: anupam Created Date: 8/18/2008 4:26:30 PM

have seen

Theorem 1.

Every n-point metric admits an

β = O(log n)-padded decompositionβ = O(log n)-padded decomposition

Theorem 2.

Embedding into distribution over trees with

α = O(log n log diameter)

Page 43: adfocs1-annotateanupamg/adfocs/Gupta-lec1.pdf · 2008. 10. 6. · Title: Microsoft PowerPoint - adfocs1-annotate Author: anupam Created Date: 8/18/2008 4:26:30 PM

extensions

• embedding into

Hierarchically well-Separated Trees

Page 44: adfocs1-annotateanupamg/adfocs/Gupta-lec1.pdf · 2008. 10. 6. · Title: Microsoft PowerPoint - adfocs1-annotate Author: anupam Created Date: 8/18/2008 4:26:30 PM

extensions

• embedding special classes of graphs

Page 45: adfocs1-annotateanupamg/adfocs/Gupta-lec1.pdf · 2008. 10. 6. · Title: Microsoft PowerPoint - adfocs1-annotate Author: anupam Created Date: 8/18/2008 4:26:30 PM

extensions

• embedding graph metrics into

distributions over their sub-trees

Page 46: adfocs1-annotateanupamg/adfocs/Gupta-lec1.pdf · 2008. 10. 6. · Title: Microsoft PowerPoint - adfocs1-annotate Author: anupam Created Date: 8/18/2008 4:26:30 PM

Padded decompositionsPadded decompositions

Page 47: adfocs1-annotateanupamg/adfocs/Gupta-lec1.pdf · 2008. 10. 6. · Title: Microsoft PowerPoint - adfocs1-annotate Author: anupam Created Date: 8/18/2008 4:26:30 PM

padded decomps very useful

• We’ll see applications to other embeddings later

• applications to finding neighborhood covers in exercises• applications to finding neighborhood covers in exercises

• here’s an application to another approximation algorithm

Page 48: adfocs1-annotateanupamg/adfocs/Gupta-lec1.pdf · 2008. 10. 6. · Title: Microsoft PowerPoint - adfocs1-annotate Author: anupam Created Date: 8/18/2008 4:26:30 PM

multi-cut

Given graph G = (V,E)

with k source-sink pairs

Find the fewest edges to deleteFind the fewest edges to delete

to separate all source-sink pairs

NP-hard, APX-hard for k ≥ 3.

Best known: O(log k) approximation

[Garg Vazirani Yannakakis]

Page 49: adfocs1-annotateanupamg/adfocs/Gupta-lec1.pdf · 2008. 10. 6. · Title: Microsoft PowerPoint - adfocs1-annotate Author: anupam Created Date: 8/18/2008 4:26:30 PM

relaxation of multi-cut

Suppose we want lengths on edges

such that shortest-path-distance(sp, tp) ≥ 1 for all p.

One possible setting:

length of cut edges in OPT = 1, all others = 0length of cut edges in OPT = 1, all others = 0

total length = OPT.

So, find (fractional) setting that minimizes total length

⇒ at most OPT.

and can be found by linear programming.

Page 50: adfocs1-annotateanupamg/adfocs/Gupta-lec1.pdf · 2008. 10. 6. · Title: Microsoft PowerPoint - adfocs1-annotate Author: anupam Created Date: 8/18/2008 4:26:30 PM

algorithm idea

Given such fractional edge-lengths

(with total length L ≤ OPT)

Use these lengths to figure out which edges to cutUse these lengths to figure out which edges to cut

and E[ number of edges cut ] ≤ O(log n) × L

⇒ we’d have a logarithmic approximation !

Page 51: adfocs1-annotateanupamg/adfocs/Gupta-lec1.pdf · 2008. 10. 6. · Title: Microsoft PowerPoint - adfocs1-annotate Author: anupam Created Date: 8/18/2008 4:26:30 PM

randomized algorithm for multi-cut

Given lengths on edges

shortest-path-distance(sp, tp) ≥ 1 for all p.

Take a O(log n)-padded decomposition of this

metric with ∆ = 1/3.metric with ∆ = 1/3.

Facts:

1. Each terminal pair separated.

2. Pr[ edge e cut ] ≤ length(e) × O(log n)

Page 52: adfocs1-annotateanupamg/adfocs/Gupta-lec1.pdf · 2008. 10. 6. · Title: Microsoft PowerPoint - adfocs1-annotate Author: anupam Created Date: 8/18/2008 4:26:30 PM

embeddings into treesembeddings into trees

Page 53: adfocs1-annotateanupamg/adfocs/Gupta-lec1.pdf · 2008. 10. 6. · Title: Microsoft PowerPoint - adfocs1-annotate Author: anupam Created Date: 8/18/2008 4:26:30 PM

used for these problems

k-median

Group Steiner tree

min-sum clustering

metric labeling

minimum communication spanning tree

vehicle routing problems

metrical task systems and k-server

buy-at-bulk network design

oblivious network design

oblivious routing

demand-cut problem

Page 54: adfocs1-annotateanupamg/adfocs/Gupta-lec1.pdf · 2008. 10. 6. · Title: Microsoft PowerPoint - adfocs1-annotate Author: anupam Created Date: 8/18/2008 4:26:30 PM

app: oblivious routing

We’ve seen: given a metric, output a random tree

maintains distances to within expected O(log n) factor

[Räcke 08]

Given an undirected flow network G with edge-capacitiesGiven an undirected flow network G with edge-capacities

output a random tree T (with edge-capacities)

any multicommodity flow in G routable in T exactly.

any flow in T (almost) routable in G

(edge-capacities exceeded by expected O(log n) factor.)

Page 55: adfocs1-annotateanupamg/adfocs/Gupta-lec1.pdf · 2008. 10. 6. · Title: Microsoft PowerPoint - adfocs1-annotate Author: anupam Created Date: 8/18/2008 4:26:30 PM

app: “universal” TSP

Given a metric (V,d),

you find single permutation π

adversary gives you subset S ⊆ V

you use order given by π to visit cities in S.

How close are you to the optimal tour on S?How close are you to the optimal tour on S?

If adversary does not look at actual permutation π when

choosing S ⇒ O(log n) factor worse in expectation.

What if adversary can look at π and then choose S?

can use variant of tree embeddings to get O(log2 n)

Page 56: adfocs1-annotateanupamg/adfocs/Gupta-lec1.pdf · 2008. 10. 6. · Title: Microsoft PowerPoint - adfocs1-annotate Author: anupam Created Date: 8/18/2008 4:26:30 PM

open: randomized k-server problem

Given a HST

have k servers located at some nodes

Requests come one-by-one at nodes

must move one of the servers to the requested node

Minimize total movementMinimize total movement

Deterministic algorithm: k-“competitive” (and this is tight!)

Better randomized algorithm: ????

[Cote Meyerson Poplawski]: O(log diameter)-competitive on binary HSTs

Page 57: adfocs1-annotateanupamg/adfocs/Gupta-lec1.pdf · 2008. 10. 6. · Title: Microsoft PowerPoint - adfocs1-annotate Author: anupam Created Date: 8/18/2008 4:26:30 PM

recap…

Two general techniques:

Padded decompositions.

Embeddings into random trees.

Coming up:

Embeddings into geometric space

Dimension reduction and other dimensionality issues

Page 58: adfocs1-annotateanupamg/adfocs/Gupta-lec1.pdf · 2008. 10. 6. · Title: Microsoft PowerPoint - adfocs1-annotate Author: anupam Created Date: 8/18/2008 4:26:30 PM