Approximation via Doubling
(Part II)
Marek Chrobak
University of California, Riverside
Joint work with Claire Kenyon-Mathieu
1
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
2
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
d1 d2 ... d j
max u, j
: d j1 u d j
u
d d ... d
j
max j 1 2
d j1
3
Wroclaw University, Sept 18, 2007
Deterministic Bidding - Upper Bound
Doubling strategy: bid 1, 2, 4, … , 2i, …
If 2j-1 < u ≤ 2j, the ratio is
21 2 2 ... 2 j 2 j 1
j1 4
j1
2
2
4
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]
5
Wroclaw University, Sept 18, 2007
Cow-Path Problem -- Reminder
For dj-1 < u ≤ dj+1 (j odd)
dj
d3
d2
d1 0
2 bidding ratio
dj-1
u
extra ratio 1
So the ratio = 2 bidding ratio + 1 = 9 for dj = 2j
6
Wroclaw University, Sept 18, 2007
dj+1
Theorem:
The optimal competitive ratio for the cowpath 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] …
7
Wroclaw University, Sept 18, 2007
Outline:
1.
2.
3.
4.
5.
6.
7.
Online bidding
Cow-path
Incremental medians (size approximation)
Incremental medians (cost approximation)
List scheduling on related machines
Minimum latency tours
Incremental clustering
8
Wroclaw University, Sept 18, 2007
List Scheduling
7
4
6 5
2
3
time
Given a list of jobs (each with a specified
processing time), assign them to processors
to minimize makespan (max load)
1
jobs
Online algorithm: assignment of a job
does not depend on future jobs
Goal: small competitive ratio
processors
9
Wroclaw University, Sept 18, 2007
Greedy: Assign each job to the
machine with the lightest load
7
7
4
6 5
2
3
1
4
jobs
6
2
3
processors
10
Wroclaw University, Sept 18, 2007
5
1
7
3
4
6 5
2
3
1
7
6
2
jobs
4
better schedule:
1
5
processors
11
Wroclaw University, Sept 18, 2007
Analysis of Greedy:
x = min load before placing last job
y = length of last job
y
• total load ≥ m·x, so optimum makespan ≥ x
• optimum makespan ≥ y
• so
x
greedy’s makespan = x+y
≤ 2 ·optimum makespan
m machines
12
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, …
13
Wroclaw University, Sept 18, 2007
List Scheduling on Related Machines
Related machines: machines may have
different speeds
1
1
0.25
1
0.5
1
1
jobs
processors
14
1
2
3
Wroclaw University, Sept 18, 2007
Hey, the
opt makespan is
at most L
2L
Algorithm 2PACK(L): schedule each
job on the slowest machine whose
load will not exceed 2L
6
3
5
L
4
4
7
1
5
6
2
1
0.25
3
jobs
2
7
processors
15
1
0.5
1
2
3
Wroclaw University, Sept 18, 2007
2L
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
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
1 2… r …m
optimum
16
1 2…
r m
…
2PACK
Wroclaw University, Sept 18, 2007
so k‘s length here ≤ L
Lemma: If the little birdie is right (opt
makespan ≤ L) then 2PACK will succeed.
so k fits
on r
Proof: Suppose 2PACK fails on job h
• h’s length on processor 1 ≤ L , so
so load of processor 1 > L
suppose k
executed here
2L
k
k
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
k
1 2… r …m
optimum
17
1 2…
r m
…
2PACK
Wroclaw University, Sept 18, 2007
2L
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
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 opt’s (speed-weighted) total load
on processors {1,2,…,r-1} is > (r-1)L
• So some opt’s processor has load
> L -- contradiction
1 2… r …m
optimum
18
1 2…
r m
…
2PACK
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 j
if 2PACK fails on job k
let j = j+1 and continue (starting with job k)
19
Wroclaw University, Sept 18, 2007
processor
B1
B2
…
Bj-1
Bj
Bj+1
1
2
…
m
k
bucket j
k’
k
20
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
2 (d1 d2 ... d j )
ratio
d j1
2 (bidding ratio)
We get ratio 8 for dj = 2j
21
Wroclaw University, Sept 18, 2007
List Scheduling on Related Machines
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]
22
Wroclaw University, Sept 18, 2007
Outline:
1.
2.
3.
4.
5.
6.
7.
Online bidding
Cow-path
Incremental medians (size approximation)
Incremental medians (cost approximation)
List scheduling on related machines
Minimum latency tours
Incremental clustering
23
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
24
Wroclaw University, Sept 18, 2007
E
Total latency = 2 + 4 + 8 + 11 + 15 = 40
15
A
D
2
8
F
B
11
4
C
25
Wroclaw University, Sept 18, 2007
Minimum k-Tour Problem: find a shortest k-tour
(a path that starts and ends at v1 and visits ≥ k different
vertices)
E
A
2-tour
D
4-tour
F
B
C
26
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)
27
Wroclaw University, Sept 18, 2007
Q
Tp(2)
v1
Tp(1)
Tp(3)
28
Wroclaw University, Sept 18, 2007
Lemma:
S = s1s2…sn : tour with optimum latency.
Then
latencyS(sk) ≥ (1/2)·length(Tk)
Proof:
s2
S
s1
T
T is a k-tour, so
s3
2·latencyS(sk) = length(T)
≥ length(Tk)
sk
29
Wroclaw University, Sept 18, 2007
Analysis:
latency Q (qk )
latency (Q)
ratio
max k
latency (S)
latency S (sk )
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
d1 d2 ... d j
d1 d2 ... d j
ratio
2
d j1 /2
d j1
We get ratio 8 for dj =
2 (bidding ratio)
2j
… if we can compute k-tours efficiently !!!
30
Wroclaw University, Sept 18, 2007
7
If X is a weighted tree, optimal k-tours can be
computed in polynomial time…
4
6
11
12
9
10
3
5
7
2
5
8
7
Dynamic programming:
• W.l.o.g. assume X is a rooted binary tree
u
• optk(u) = minimum of
x
2x+optk-1(v), 2y+optk-1(t) and
v
y
t
minj {2x+optj(v)+2y+optk-1-j(t) }
Theorem:
There is a polynomial-time 8-approximation algorithm
for maximum latency tours on weighted trees
[Blum, Chalasani, Coppersmith, Pulleyblank, Raghavan, Sudan
‘94]
31
Wroclaw University, Sept 18, 2007
Can we do better?
Choose a random direction (clockwise or counter-clockwise) and
traverse each Tp(j) in this direction …
v1
Tp(j)
u
Expected latency of u = d1+d2+ …+ dj-1 + dj/2
d1 d2 ... d j1 d j /2
d1 d2 ... d j1 d j /2
ratio
2
d j1 /2
d j1
We get ratio 6 for dj = 2j
32
Wroclaw University, Sept 18, 2007
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
Theorem:
There is a polynomial-time 3.591 -approximation algorithm
for maximum latency tours on weighted trees
[Goemans, Kleinberg ‘98]
Can be extended to arbitrary spaces, with ratio 3.591
[Chauduri, Godfrey, Rao, Talwar ‘03]
33
Wroclaw University, Sept 18, 2007
Outline:
1.
2.
3.
4.
5.
6.
7.
Online bidding
Cow-path
Incremental medians (size approximation)
Incremental medians (cost approximation)
List scheduling on related machines
Minimum latency tours
Incremental clustering
34
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]
35
Wroclaw University, Sept 18, 2007
k=3
3-Clustering with maximum diameter 5
E
A
H
D
F
G
B
C
36
Wroclaw University, Sept 18, 2007
k=3
3-Clustering with maximum diameter 3
E
A
H
D
F
G
B
C
37
Wroclaw University, Sept 18, 2007
Incremental k-Clustering
Problem: Maintain k-clustering when
• points in X arrive online
• allowed operations:
different model than
add point to a cluster
incremental medians !!!
merge clusters
create a new singleton cluster
Goal: online competitive algorithm (polynomial-time)
38
Wroclaw University, Sept 18, 2007
k=3
diameter = 0
A
D
G
C
39
Wroclaw University, Sept 18, 2007
k=3
diameter = 2
E
A
D
G
C
40
Wroclaw University, Sept 18, 2007
k=3
diameter = 3
E
A
H
D
G
C
41
Wroclaw University, Sept 18, 2007
k=3
diameter = 3
E
A
H
D
G
C
42
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
oi
43
Wroclaw University, Sept 18, 2007
Procedure CleanUp(z). Goal: merge some clusters
C1,C2,…,Ck’ so that afterwards all inter-center
distances are > z
1. Find a maximal set J of clusters with all intercenter distances > z
2. for each cluster Ca J
choose Cb J with d(oa,ob) ≤ z
merge Ca into Cb (with center ob)
44
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
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
z
h
v
46
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 1
4. repeat
Invariant:
when a new point x arrives
• inter-center distance > dj
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
47
Wroclaw University, Sept 18, 2007
Example: k = 4
48
Wroclaw University, Sept 18, 2007
Example: k = 4
dj+1
dj+2
49
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)
2 (d1 d2 ... d j )
ratio
d j1
2 (bidding ratio)
We get
ratio 8 for dj = 2j
50
Wroclaw University, Sept 18, 2007
Incremental Clustering
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)
51
Wroclaw University, Sept 18, 2007
Doubling Method Applications:
1.
2.
3.
4.
5.
6.
7.
8.
Online bidding
Cow-path
Incremental medians (size approximation)
Incremental medians (cost approximation)
List scheduling on related machines
Minimum latency tours
Incremental clustering
Other scheduling problems:
• List scheduling, related machines with
preemption
• Scheduling with min-sum criteria
• Non-clairvoyant scheduling
9. Hierarchical clustering
10. Load balancing
11. Online algorithms for set cover (combined with
primal-dual)
….
52
Wroclaw University, Sept 18, 2007
Thank you !
Questions?
53
Wroclaw University, Sept 18, 2007
© Copyright 2026 Paperzz