approximation via doubling (part ii)

53
1 Wroclaw University, Sept 18, 2007 Approximation via Doubling (Part II) Marek Chrobak University of California, Riverside Joint work with Claire Kenyon-Mathieu

Upload: dylan-barry

Post on 30-Dec-2015

41 views

Category:

Documents


0 download

DESCRIPTION

Approximation via Doubling (Part II). Marek Chrobak University of California, Riverside. Joint work with Claire Kenyon-Mathieu. Doubling method: (for a minimization problem) Choose d 1 < d 2 < d 3 … (typically powers of 2) For j = 1, 2, 3, … Assume that the optimum is ≤ d j - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Approximation via Doubling (Part II)

1 Wroclaw University, Sept 18, 2007

Approximation via Doubling(Part II)

Marek Chrobak

University of California, Riverside

Joint work with Claire Kenyon-Mathieu

Page 2: Approximation via Doubling (Part II)

2 Wroclaw University, Sept 18, 2007

Doubling method:

(for a minimization problem)

Choose d1 < d2 < d3 … (typically powers of 2)

For j = 1, 2, 3, …

Assume that the optimum is ≤ dj

Use this bound to construct a solution of cost ≤ C·dj

• Simple and effective (works for many problems, offline and online)• Typically not best possible ratios

Page 3: Approximation via Doubling (Part II)

3 Wroclaw University, Sept 18, 2007

Online Bidding - Reminder

Item for sale of value u (unknown to bidder)

Buyer bids d1,d2,d3, … until some dj ≥ u

Cost: d1 + d2 + … + dj Optimum = u

Competitive ratio

maxu, jd1 +d2 + ...+ d j

u: d j−1 < u ≤ d j

⎧ ⎨ ⎩

⎫ ⎬ ⎭

≅ max j

d1 +d2 + ...+ d jd j−1

⎧ ⎨ ⎩

⎫ ⎬ ⎭

Page 4: Approximation via Doubling (Part II)

4 Wroclaw University, Sept 18, 2007

Deterministic Bidding - Upper Bound

If 2j-1 < u ≤ 2j, the ratio is

Doubling strategy: bid 1, 2, 4, … , 2i, …

21 +22 + ...+ 2 j

2 j−1≤

2 j+1

2 j−1= 4

Page 5: Approximation via Doubling (Part II)

5 Wroclaw University, Sept 18, 2007

Online Bidding

Theorem:

The optimal competitive ratio for online bidding is:

• 4 in the deterministic case

• e 2.72 in the randomized case

Randomized e-ing strategy: choose uniformly random x [0,1), and bid e x , e x+1, e x+2 , e x+3 , …

[folklore] [Chrobak, Kenyon, Noga, Young, ‘06]

Page 6: Approximation via Doubling (Part II)

6 Wroclaw University, Sept 18, 2007

Cow-Path Problem -- Reminder

d1 d2d3dj+10 udj-1dj

For dj-1 < u ≤ dj+1 (j odd)

2 bidding ratio extra ratio 1

So the ratio = 2 bidding ratio + 1 = 9 for dj = 2j

Page 7: Approximation via Doubling (Part II)

7 Wroclaw University, Sept 18, 2007

Theorem:The optimal competitive ratio for the cow-path problem is

• 9 in the deterministic case

• 4.59 in the randomized case

Solution of (r-1)ln(r-1) = r 2e+1

Connection to online bidding does not work in randomized case -- why?

[Gal ‘80] [Baeza-Yates, Culberson, Rawlins ‘93]

[Papadimitriou, Yannakakis ‘91] [Kao, Reif, Tate ‘94] …

Page 8: Approximation via Doubling (Part II)

8 Wroclaw University, Sept 18, 2007

Outline:

1. Online bidding2. Cow-path3. Incremental medians (size approximation)4. Incremental medians (cost approximation)5. List scheduling on related machines6. Minimum latency tours7. Incremental clustering

Page 9: Approximation via Doubling (Part II)

9 Wroclaw University, Sept 18, 2007

List Scheduling

123

456

7

jobs

Given a list of jobs (each with a specified processing time), assign them to processors to minimize makespan (max load)

Online algorithm: assignment of a job does not depend on future jobs

Goal: small competitive ratio processors

tim

e

Page 10: Approximation via Doubling (Part II)

10 Wroclaw University, Sept 18, 2007

123

456

7

processors

jobs

123

4 56

7

make

span

Greedy: Assign each job to the machine with the lightest load

Page 11: Approximation via Doubling (Part II)

11 Wroclaw University, Sept 18, 2007

123

456

7

jobs

processors

1

2

3

45

67

make

span

better schedule:

Page 12: Approximation via Doubling (Part II)

12 Wroclaw University, Sept 18, 2007

Analysis of Greedy:

x = min load before placing last joby = length of last job

• so

greedy’s makespan = x+y ≤ 2 ·optimum makespan

x

y

m machines

• total load ≥ m·x, so optimum makespan ≥ x• optimum makespan ≥ y

Page 13: Approximation via Doubling (Part II)

13 Wroclaw University, Sept 18, 2007

List Scheduling

• Greedy is (2-1/m)-competitive [Graham ’66]

• Lower bound ≈1.88 [Rudin III, Chandrasekaran’03]

• Best known ratio ≈1.92 [Albers ‘99] [Fleischer, Wahl ‘00]

• Lots of work on randomized algorithms, preemptive scheduling, …

Page 14: Approximation via Doubling (Part II)

14 Wroclaw University, Sept 18, 2007

List Scheduling on Related Machines

processors 1 2 3

Related machines: machines may have different speeds

0.25 0.5 1

1

jobs

1

11

Page 15: Approximation via Doubling (Part II)

15 Wroclaw University, Sept 18, 2007

0.25 0.5 1

1

2

3

4

5

6

7

jobs

1

2

3

4

5

6

7

Algorithm 2PACK(L): schedule each job on the slowest machine whose load will not exceed 2L

L

2L

processors 1 2 3

Hey, theopt makespan is

at most L

Page 16: Approximation via Doubling (Part II)

16 Wroclaw University, Sept 18, 2007

Lemma: If the little birdie is right (opt makespan ≤ L) then 2PACK will succeed.

Proof: Suppose 2PACK fails on job h • h’s length on processor 1 ≤ L , so so load of processor 1 > L

• r = first processor with load ≤ L (or m+1, if no such processor)

1 2 … … m 1 2 … … m

L

2L

• Claim: if opt executes k on a machine in {r,r+1,…,m} then so does 2PACK

optimum 2PACK

r r

Page 17: Approximation via Doubling (Part II)

17 Wroclaw University, Sept 18, 2007

1 2 … … m 1 2 … … m

L

2L

k

so k‘s length here ≤ L

so k fits on r

k

r r

optimum 2PACK

k

suppose kexecuted here

Lemma: If the little birdie is right (opt makespan ≤ L) then 2PACK will succeed.

Proof: Suppose 2PACK fails on job h • h’s length on processor 1 ≤ L , so so load of processor 1 > L

• r = first processor with load ≤ L (or m+1, if no such processor)

• Claim: if opt executes k on a machine in {r,r+1,…,m} then so does 2PACK

Page 18: Approximation via Doubling (Part II)

18 Wroclaw University, Sept 18, 2007

1 2 … … m 1 2 … … m

L

2L

r r

optimum 2PACK

• So opt’s (speed-weighted) total load on processors {1,2,…,r-1} is > (r-1)L

Lemma: If the little birdie is right (opt makespan ≤ L) then 2PACK will succeed.

Proof: Suppose 2PACK fails on job h • h’s length on processor 1 ≤ L , so so load of processor 1 > L

• r = first processor with load ≤ L (or m+1, if no such processor)

• In other words: if 2PACK executes k on a machine in {1,2,…,r-1} then so does opt

• So some opt’s processor has load > L -- contradiction

Page 19: Approximation via Doubling (Part II)

19 Wroclaw University, Sept 18, 2007

Algorithm:

1. Choose d1 < d2 < d3 < … (makespan estimates)

Let Bj = 2·( d1 + d2 + … + dj ) “bucket” j : time interval [Bj-1 , Bj ]

2. j = 0 while there are unassigned jobs

apply 2PACK with L = dj in bucket jif 2PACK fails on job k let j = j+1 and continue (starting with job

k)

Page 20: Approximation via Doubling (Part II)

20 Wroclaw University, Sept 18, 2007

k

bucket j

1

2

m

processor B1 B2 Bj-1 BjBj+1…

k

k’

Page 21: Approximation via Doubling (Part II)

21 Wroclaw University, Sept 18, 2007

Analysis:

Suppose the optimal makespan is u

• Choose j such that dj-1 < u ≤ dj

• Then 2PACK will succeed in j ’th bucket (L = dj )

• so algorithm’s makespan ≤ 2·(d1+d2+ … + dj)

and

ratio ≤2 ⋅(d1 +d2 + ...+ d j )

d j−1

We get ratio 8 for dj = 2j

2 (bidding ratio)

Page 22: Approximation via Doubling (Part II)

22 Wroclaw University, Sept 18, 2007

Theorem: There is an 8-competitive online algorithm for list scheduling on related machines (to minimize makespan). With randomization the ratio can be improved to 2e.[Aspnes, Azar, Fiat, Plotkin, Waarts ‘06]

World records: • upper bound ≈ 5.828 (4.311 randomized)• lower bound ≈ 2.438 (2 randomized)[Berman, Charikar, Karpinski ‘97] [Epstein, Sgall ‘00]

List Scheduling on Related Machines

Page 23: Approximation via Doubling (Part II)

23 Wroclaw University, Sept 18, 2007

Outline:

1. Online bidding2. Cow-path3. Incremental medians (size approximation)4. Incremental medians (cost approximation)5. List scheduling on related machines6. Minimum latency tours7. Incremental clustering

Page 24: Approximation via Doubling (Part II)

24 Wroclaw University, Sept 18, 2007

Minimum Latency Tour

X = metric space

P = v1v2…vh : path in X

Latency of vi on P latencyP(vi) = d(v1,v2) + … + d(vi-1,vi)

(Total) latency of P = i latencyP(vi)

Minimum Latency Tour Problem: Given X, find a tour (path visiting all vertices) of minimum total latency

Goal: polynomial-time approximation algorithm

Page 25: Approximation via Doubling (Part II)

25 Wroclaw University, Sept 18, 2007

Total latency = 2 + 4 + 8 + 11 + 15 = 40

A15E

2

D

11

C4

B

8 F

Page 26: Approximation via Doubling (Part II)

26 Wroclaw University, Sept 18, 2007

AE

D

C

B

F

Minimum k-Tour Problem: find a shortest k-tour (a path that starts and ends at v1 and visits ≥ k different vertices)

2-tour

4-tour

Page 27: Approximation via Doubling (Part II)

27 Wroclaw University, Sept 18, 2007

Algorithm:

1. Choose d1 < d2 < d3 < …

2. For each k compute the optimal k-tour Tk

3. Choose p(1) < … < p(m) = n s.t. length(Tp(i)) = di

(For simplicity assume they exist)

4. Output Q = Tp(1) Tp(2) …Tp(m) (concatenation) Denote Q = q1q2…qn (qi = first point on Q different from q1, q2,…,qi-1)

Page 28: Approximation via Doubling (Part II)

28 Wroclaw University, Sept 18, 2007

v1

Tp(1)

Tp(2)

Tp(3)

Q

Page 29: Approximation via Doubling (Part II)

29 Wroclaw University, Sept 18, 2007

Lemma:S = s1s2…sn : tour with optimum latency.Then

latencyS(sk) ≥ (1/2)·length(Tk)

Proof:

s1

s2

s3

sk

ST T is a k-tour, so

2·latencyS(sk) = length(T)

≥ length(Tk)

Page 30: Approximation via Doubling (Part II)

30 Wroclaw University, Sept 18, 2007

Analysis:

For p(j-1) < k ≤ p(j)

• latencyS(sk) ≥ (1/2)·length(Tk) ≥ (1/2)·length(Tp(j-1)) = dj-1/2

• qk will be visited in Tp(j) (or earlier), so latencyQ(qk) ≤ d1+d2+ … + dj

ratio ≤d1 +d2 + ...+ d j

d j−1 /2= 2 ⋅

d1 +d2 + ...+ d jd j−1

We get ratio 8 for dj = 2j

ratio ≤latency(Q)

latency(S)≤ maxk

latencyQ (qk )

latencyS (sk )

… if we can compute k-tours efficiently !!!

2 (bidding ratio)

Page 31: Approximation via Doubling (Part II)

31 Wroclaw University, Sept 18, 2007

If X is a weighted tree, optimal k-tours can be computed in polynomial time… 10

4

5

1112

7

6

82

39

7

75

Theorem:There is a polynomial-time 8-approximation algorithm for maximum latency tours on weighted trees[Blum, Chalasani, Coppersmith, Pulleyblank, Raghavan, Sudan ‘94]

Dynamic programming:

• W.l.o.g. assume X is a rooted binary tree

• optk(u) = minimum of

2x+optk-1(v), 2y+optk-1(t) and

minj {2x+optj(v)+2y+optk-1-j(t) }

u

v t

x y

Page 32: Approximation via Doubling (Part II)

32 Wroclaw University, Sept 18, 2007

Choose a random direction (clockwise or counter-clockwise) and traverse each Tp(j) in this direction …

v1Tp(j)

u

Expected latency of u = d1+d2+ …+ dj-1 + dj/2

ratio ≤d1 +d2 + ...+ d j−1 + d j /2

d j−1 /2= 2 ⋅

d1 +d2 + ...+ d j−1 + d j /2

d j−1

We get ratio 6 for dj = 2j

Can we do better?

Page 33: Approximation via Doubling (Part II)

33 Wroclaw University, Sept 18, 2007

Can be extended to arbitrary spaces, with ratio 3.591[Chauduri, Godfrey, Rao, Talwar ‘03]

Theorem:There is a polynomial-time 3.591 -approximation algorithm for maximum latency tours on weighted trees [Goemans, Kleinberg ‘98]

Can we do even better?

Instead of dj = 2j choose dj = cj+x , where c is the constant from the Cow Path problem and x is random in [0,1)

We don’t really really randomization:• choose better direction (clockwise or counter-clockwise)• There are only O(n) x’s that matter, so try them all

Page 34: Approximation via Doubling (Part II)

34 Wroclaw University, Sept 18, 2007

Outline:

1. Online bidding2. Cow-path3. Incremental medians (size approximation)4. Incremental medians (cost approximation)5. List scheduling on related machines6. Minimum latency tours7. Incremental clustering

Page 35: Approximation via Doubling (Part II)

35 Wroclaw University, Sept 18, 2007

k-Clustering

X = metric space

For C X ,

diameter(C) = maximum distance between points in C

k-Clustering Problem: Given k, partition X into k disjoint clusters C1,…,Ck to minimize the maximum diameter(Cj)

Offline: • approximable with ratio 2 [Gonzales ‘85] [Hochbaum, Shmoys ‘85]• lower bound of 2 for polynomial algorithms (unless P = NP) [Feder, Greene ‘88] [Bern, Eppstein ‘96]

Page 36: Approximation via Doubling (Part II)

36 Wroclaw University, Sept 18, 2007

E

D

C

B

F

A

G

H

3-Clustering with maximum diameter 5k=3

Page 37: Approximation via Doubling (Part II)

37 Wroclaw University, Sept 18, 2007

E

D

C

B

F

A

G

H

3-Clustering with maximum diameter 3k=3

Page 38: Approximation via Doubling (Part II)

38 Wroclaw University, Sept 18, 2007

Incremental k-Clustering

Problem: Maintain k-clustering when

• points in X arrive online

• allowed operations: add point to a cluster merge clusters create a new singleton cluster

Goal: online competitive algorithm (polynomial-time)

different model than incremental medians !!!

Page 39: Approximation via Doubling (Part II)

39 Wroclaw University, Sept 18, 2007

D

C

G

diameter = 0

A

k=3

Page 40: Approximation via Doubling (Part II)

40 Wroclaw University, Sept 18, 2007

D

C

G

A

E

diameter = 2k=3

Page 41: Approximation via Doubling (Part II)

41 Wroclaw University, Sept 18, 2007

D

C

G

A

E

H

diameter = 3k=3

Page 42: Approximation via Doubling (Part II)

42 Wroclaw University, Sept 18, 2007

D

C

G

A

E

H

diameter = 3k=3

Page 43: Approximation via Doubling (Part II)

43 Wroclaw University, Sept 18, 2007

Notation and terminology:

• Algorithm’s clusters C1,C2,…,Ck’ with k’ ≤ k• in each Ci fix a center oi

• radius of Ci = max distance between x Ci and oi • diameter of Ci ≤ 2 · (radius of Ci)

Ci

oiradius

Page 44: Approximation via Doubling (Part II)

44 Wroclaw University, Sept 18, 2007

Procedure CleanUp(z). Goal: merge some clusters C1,C2,…,Ck’ so that afterwards all inter-center distances are > z

• Find a maximal set J of clusters with all inter-center distances > z

2. for each cluster Ca Jchoose Cb J with d(oa,ob) ≤ zmerge Ca into Cb (with center ob)

Page 45: Approximation via Doubling (Part II)

45 Wroclaw University, Sept 18, 2007

Lemma: If the max radius before CleanUp is h then after CleanUp it is ≤ h+z.

Proof: follows from the ∆ inequality

z

Page 46: Approximation via Doubling (Part II)

46 Wroclaw University, Sept 18, 2007

Lemma: If the max radius before CleanUp is h then after CleanUp it is ≤ h+z.

Proof: follows from the ∆ inequality

z

v

z

h

Page 47: Approximation via Doubling (Part II)

47 Wroclaw University, Sept 18, 2007

Algorithm:

1. Choose d1 < d2 < d3 < … 2. Initially C1,C2,…,Ck are singletons (first k points) (Assume min distance between these points is > 1)3. j 14. repeat when a new point x arrives

if d(x,oi) ≤ dj for some i add x to Ci

else if k’ < k k’ k’+1; Ck’ {x} else

create a temporary cluster Ck+1 {x} while there k+1 clusters

j j+1 do CleanUp with z = dj (merge clusters)checkpoint j

Invariant:• inter-center distance > dj

Page 48: Approximation via Doubling (Part II)

48 Wroclaw University, Sept 18, 2007

Example: k = 4

Page 49: Approximation via Doubling (Part II)

49 Wroclaw University, Sept 18, 2007

Example: k = 4

dj+1

dj+2

Page 50: Approximation via Doubling (Part II)

50 Wroclaw University, Sept 18, 2007

Analysis:At checkpoint j :

Before clean-up• k+1 clusters with inter-center distances > dj-1

• so opt diameter > dj-1

After clean-up• max radius ≤ d1 + d2 + … + dj

• so max diameter ≤ 2·(d1 + d2+ … + dj)

ratio ≤2 ⋅(d1 +d2 + ...+ d j )

d j−1

We get ratio 8 for dj = 2j

2 (bidding ratio)

Page 51: Approximation via Doubling (Part II)

51 Wroclaw University, Sept 18, 2007

Theorem: There is an 8-competitive online algorithm for incremental clustering (ratio 2e with randomization).[Charikar, Chekuri, Feder, Motwani ‘06]

Other results:

• upper bound 6 (4.33 randomized) (not polynomial-time)

• lower bound 2.414 (2 randomized)

Incremental Clustering

Page 52: Approximation via Doubling (Part II)

52 Wroclaw University, Sept 18, 2007

1. Online bidding2. Cow-path3. Incremental medians (size approximation)4. Incremental medians (cost approximation)5. List scheduling on related machines6. Minimum latency tours7. Incremental clustering8. Other scheduling problems:

• List scheduling, related machines with preemption

• Scheduling with min-sum criteria• Non-clairvoyant scheduling

9. Hierarchical clustering10. Load balancing11. Online algorithms for set cover (combined

with primal-dual)….

Doubling Method Applications:

Page 53: Approximation via Doubling (Part II)

53 Wroclaw University, Sept 18, 2007

Thank you !

Questions?