close

Вход

Забыли?

вход по аккаунту

?

Online Primal-Dual Algorithms for Covering and Packing Problems

код для вставкиСкачать
A Primal-Dual Approach to
Online Optimization Problems
Online Optimization Problems
• input arrives “piece by piece” (“piece” is called request)
• upon arrival of a request - has to be served immediately
• past decisions cannot be revoked
how to evaluate the performance of an online algorithm?
– if, for each request sequence,
cost(online) ≤ r x cost(optimal offline)
– then online algorithm is r-competitive
Road Map
Introducing the framework:
• Ski rental
• Online set cover
• Virtual circuit routing
The general framework:
• {0,1} covering/packing linear programs
• General covering/packing linear programs
Recent results:
• The ad-auctions problem
• Weighted caching
The Ski Rental Problem
• Buying costs $B.
• Renting costs $1 per day.
Problem:
• Number of ski days is not known in advance.
Goal: Minimize the total cost.
Ski Rental – Integer Program
пѓ¬1 - B uy
пѓ¬1 - R ent on day i
zi пЂЅ пѓ­
xпЂЅпѓ­
0 - D on't rent on day i
0
D
on't
B
uy
пѓ®
пѓ®
k
m in B x пЂ«
z
i
i пЂЅ1
Subject to:
For each day i: x пЂ« z i п‚і 1
x , z i пѓЋ {0,1}
Ski Rental – Relaxation
P: Primal Covering
D: Dual Packing
k
m in B x пЂ«
z
k
i
i пЂЅ1
For each day i: x пЂ« z i п‚і 1
x , zi п‚і 0
m ax  y i
i пЂЅ1
For each day i: y i п‚Ј 1
k

yi п‚Ј B
i пЂЅ1
Online setting:
• Primal: New constraints arrive one by one.
• Requirement: Upon arrival, constraints should
be satisfied.
• Monotonicity: Variables can only be increased.
Ski Rental – Algorithm
P: Primal Covering
D: Dual Packing
k
m in B x пЂ«
z
k
m ax  y i
i
i пЂЅ1
For each day i: x пЂ« z i п‚і 1
i пЂЅ1
For each day i: y i п‚Ј 1
x , zi п‚і 0
k

i пЂЅ1
Initially xпѓџ 0
Each new day (new constraint):
if x<1:
 zi  1-x
 x  x(1+ 1/B) + 1/(c*B)
 yi  1
- �c’ later.
yi п‚Ј B
Analysis of Online Algorithm
Proof of competitive factor:
1. Primal solution is feasible.
2. In each iteration, ΔP ≤ (1+ 1/c)ΔD.
3. Dual is feasible.
Conclusion: Algorithm is (1+ 1/c)-competitive
Initially xпѓџ 0
Each new day (new constraint):
if x<1:
 zi  1-x
 x  x(1+ 1/B) + 1/(c*B)
 yi  1
- �c’ later.
Analysis of Online Algorithm
1. Primal solution is feasible.
If x ≥1 the solution is feasible.
Otherwise set: zi пѓџ 1-x.
2. In each iteration, ΔP ≤ (1+ 1/c)ΔD:
Algorithm:
If x≥1, ΔP =ΔD=0
When new constraint
Otherwise:
arrives, if x<1:
ziпѓџ1-x
• Change in dual: 1
xпѓџ x(1+ 1/B) + 1/c*B
• Change in primal:
y пѓџ1
BО”x + zi = x+ 1/c+ 1-x = 1+1/c
i
Analysis of Online Algorithm
3.
Dual is feasible:
k
Need to prove:  y i  B
i пЂЅ1
We prove that after B days x≥1
x is a sum of geometric sequence
a1 = 1/(cB), q = 1+1/B
B
1 пѓ¶
пѓ¦
1
пЂ«
пѓ§
пѓ· пЂ­1
1 пѓЁ
Bпѓё
xпЂЅ
пѓ—
пЂЅ
1 пѓ¶
cB пѓ¦
1
пЂ«
пѓ§
пѓ· пЂ­1
Bпѓё
пѓЁ
B
1 пѓ¶
пѓ¦
1
пЂ«
пѓ§
пѓ· пЂ­1
Bпѓё
пѓЁ
c
Algorithm:
When new constraint
arrives, if x<1:
ziпѓџ1-x
xпѓџ x(1+ 1/B) + 1/c*B
yiпѓџ1
B
1 пѓ¶
пѓ¦
c п‚Ј пѓ§1 пЂ« пѓ· пЂ­ 1 п‚» e пЂ­ 1
Bпѓё
пѓЁ
1
e
1пЂ« п‚»
c e пЂ­1
Randomized Algorithm
0
1
X:
X1 X2
X3
X4
•
Choose d uniformly in [0,1]
•
Buy on the day corresponding to the “bin” d falls in
•
Rent up to that day
Analysis:
•
Probability of buying on the i-th day is xi
•
Probability of renting on the i-th day is at most zi
Key Idea for Primal-Dual
Primal: Min i ci xi
Dual: Max t bt yt
Step t, new constraint:
a1x1 + a2x2 + … + ajxj ≥ bt
New variable yt
+ bt yt in dual objective
xi пѓџ (1+ ai/ci) xi
yt пѓџ yt + 1
(mult. update)
(additive update)
пЃ„ primal cost =
= пЃ„ Dual Cost
The Online Set-Cover Problem
• Elements: e1, e2, …, en
• Set system: s1, s2, … sm
• Costs: c(s1), c(s2), … c(sm)
Online Setting:
• Elements arrive one by one.
• Upon arrival elements need to be covered.
• Sets that are chosen cannot be “unchosen”.
Goal: Minimize the cost of the chosen sets.
Set Cover – Linear Program
P: Primal Covering
D: Dual Packing
m ax  y ( e )
m in  c ( s ) x ( s )
eпѓЋ E
sпѓЋ S
пЂўe пѓЋ E

s eпѓЋ s
x(s) п‚і 1
пЂўs пѓЋ S
 y (e)  c ( s )
eпѓЋ s
Online setting:
• Primal: constraints arrive one by one.
• Requirement: each constraint is satisfied.
• Monotonicity: variables can only be increased.
Set Cover – Algorithm
P: Primal Covering
D: Dual Packing
m ax  y ( e )
m in  c ( s ) x ( s )
eпѓЋ E
sпѓЋ S
пЂўe пѓЋ E

x(s) п‚і 1
пЂўs пѓЋ S
 y (e)  c ( s )
eпѓЋ s
s eпѓЋ s
Initially x(s)пѓџ 0
When new element arrives, while  x ( s )  1 :
• y(e)  y(e)+1
s eпѓЋ s
• . s e  s x ( s )  x ( s )  1  1 / c ( s )   1 /  m  c ( s ) 
Analysis of Online Algorithm
Proof of competitive factor:
1. Primal solution is feasible.
2. In each iteration, ΔP ≤ 2ΔD.
3. Dual is (almost) feasible.
Conclusion: We will see later.
Initially x(S)пѓџ 0
When new element e arrives, while

s eпѓЋ s
x(s) пЂј 1 :
• y(e)  y(e)+1
• .  s e  s x ( s )  x ( s ) 1  1 / c ( s )   1 /  m  c ( s ) 
Analysis of Online Algorithm
1. Primal solution is feasible.
We increase the primal variables until the
constraint is feasible.
Initially x(S)пѓџ 0
When new element e arrives, while

s eпѓЋ s
x(s) пЂј 1 :
• y(e)  y(e)+1
• .  s e  s x ( s )  x ( s ) 1  1 / c ( s )   1 /  m  c ( s ) 
Analysis of Online Algorithm
2. In each iteration, ΔP ≤ 2ΔD.
In each iteration:
• ΔD = 1
пѓ© x(s)
пѓ№
1
 P =  c(s)   x ( s )   c(s)  
пЂ«
пѓє
c
(
s
)
m
пѓ—
c
(
s
)
s|eпѓЋs
s|eпѓЋs
пѓ«
пѓ»
пЂЅ

s|eпѓЋ s
x (s) пЂ«
 1/m  2
s|eпѓЋ s
Initially x(S)пѓџ 0
When new element e arrives, while

s eпѓЋ s
x(s) пЂј 1 :
• y(e)  y(e)+1
• .  s e  s x ( s )  x ( s ) 1  1 / c ( s )   1 /  m  c ( s ) 
Analysis of Online Algorithm
3.
Dual is (almost) feasible:
•
We prove that: пЂў s пѓЋ S ,
 y(e)  c(s)O (log m )
eпѓЋ S
•
If y(e) increases, then x(s) increases (for e in S).
•
x(s) is a sum of a geometric series:
a1 = 1/[mc(s)], q = (1+ 1/c(s))
Initially x(S)пѓџ 0
When new element e arrives, while

s eпѓЋ s
x(s) пЂј 1 :
• y(e)  y(e)+1
• .  s e  s x ( s )  x ( s ) 1  1 / c ( s )   1 /  m  c ( s ) 
Analysis of Online Algorithm
пѓЁ After c(s)O(log m) rounds:
x(s) пЂЅ
1
пЂЁ пЃ›1 пЂ« 1 / c ( s ) пЃќ
c ( s ) O (log m )
пЂ­1
пЃ›1 пЂ« 1 / c ( s ) пЃќ пЂ­ 1
m пѓ— c(s)
пЃ›1 пЂ« 1 / c ( s ) пЃќ
пЂЁ
пЂЅ
c ( s ) O (log m )
пЂ­1
пЂ© п‚і1
m
We never increase a variable x(s)>1!
Initially x(S)пѓџ 0
When new element e arrives, while

s eпѓЋ s
x(s) пЂј 1 :
• y(e)  y(e)+1
• .  s e  s x ( s )  x ( s ) 1  1 / c ( s )   1 /  m  c ( s ) 
пЂ©
Conclusion
•
The dual is feasible with cost 1/O(log m) of the primal.
пѓЁ The algorithm produces a fractional set cover that is
O(log m)-competitive.
•
Remark: No online algorithm can perform better in
general.
What about an integral solution?
•
Round fractional solution. (With O(log n) amplification.)
•
Can be done deterministically online [AAABN03].
•
Competitive ratio is O(log m log n).
Online Virtual Circuit Routing
Network graph G=(V, E)
capacity function u: Eпѓ Z+
Requests: ri = (si, ti)
• Problem: Connect si to ti by a path, or reject the
request.
• Reserve one unit of bandwidth along the path.
• No re-routing is allowed.
• Load: ratio between reserved edge bandwidth and
edge capacity.
• Goal: Maximize the total throughput.
Routing – Linear Program
y ( ri , p )
P ( ri )
= Amount of bandwidth allocated for ri on path p
- Available paths to serve request ri
m ax 
ri

y ( ri , p )
p пѓЋ P ( ri )
s.t:
For each ri:

y ( ri , p ) п‚Ј 1
p пѓЋ P ( ri )
For each edge e:

ri

p пѓЋ P ( ri ) eпѓЋ p
y ( ri , p ) п‚Ј u ( e )
Routing – Linear Program
P: Primal Covering
m in  u ( e ) x ( e ) 
eпѓЋ E
D: Dual Packing
 z (r )
m ax 
i
ri
ri
пЂў ri , p пѓЋ P ( ri ) :
пЂў ri
 x(e)  z ( r )  1
i
eпѓЋ p


y ( ri , p )
p пѓЋ P ( ri )
y ( ri , p ) п‚Ј 1
p пѓЋ P ( ri )
пЂўe :

ri

y ( ri , p ) п‚Ј u ( e )
p пѓЋ P ( ri ) e пѓЋ p
Online setting:
• Dual: new columns arrive one by one.
• Requirement: each dual constraint is satisfied.
• Monotonicity: variables can only be increased.
Routing – Algorithm
P: Primal Covering
m in  u ( e ) x ( e ) 
eпѓЋ E
D: Dual Packing
 z (r )
m ax 
i
ri
ri
пЂў ri , p пѓЋ P ( ri ) :
пЂў ri
 x(e)  z ( r )  1
i
eпѓЋ p


y ( ri , p )
p пѓЋ P ( ri )
y ( ri , p ) п‚Ј 1
p пѓЋ P ( ri )
пЂўe :

ri

y ( ri , p ) п‚Ј u ( e )
p пѓЋ P ( ri ) e пѓЋ p
Initially x(e)пѓџ 0
When new request arrives, if  p  P ( ri ),  x(e)  1 :
eпѓЋ p
 z(ri)  1
пѓ¦
1 пѓ¶
1
 . e  p : x ( e )  x ( e )  1 
пѓ·пЂ«
u (e ) пѓё n пѓ— u (e )
пѓЁ
 y(ri,p)  1
Analysis of Online Algorithm
Proof of competitive factor:
1. Primal solution is feasible.
2. In each iteration, ΔP ≤ 3ΔD.
3. Dual is (almost) feasible.
Conclusion: We will see later.
Initially x(e)пѓџ 0
When new request arrives, if  p  P ( ri ),  x(e)  1 :
eпѓЋ p
 z(ri)  1
пѓ¦
1 пѓ¶
1
 .e  p : x ( e )  x ( e )  1 
пѓ·пЂ«
u (e ) пѓё n пѓ— u (e )
пѓЁ
 y(ri,p)  1
Analysis of Online Algorithm
1. Primal solution is feasible.
If  p  P ( r ),  x(e)  1 : the solution is feasible.
i
eпѓЋ p
Otherwise: we update z(ri) пѓџ 1
Initially x(e)пѓџ 0
When new request arrives, if  p  P ( ri ),  x(e)  1 :
eпѓЋ p
 z(ri)  1
пѓ¦
1 пѓ¶
1
 . e  p : x ( e )  x ( e )  1 
пѓ·пЂ«
u (e ) пѓё n пѓ— u (e )
пѓЁ
 y(ri,p)  1
Analysis of Online Algorithm
In each iteration: ΔP ≤ 3ΔD.
If  p  P ( ri ) :  x(e)  1 ΔP = ΔD=0
eпѓЋ p
Otherwise:
О”D=1
2.
пЃ„P пЂЅ

eпѓЋ p
u ( e ) пЃ„ x ( e ) пЂ« z ( ri )
пѓ¦ x (e)
пѓ¶
1
  u (e) 
пЂ«
пѓ· пЂ«1п‚Ј 3
eпѓЋ p
пѓЁ u (e) n пѓ— u (e) пѓё
Initially x(e)пѓџ 0
When new request arrives, if  p  P ( ri ),  x(e)  1 :
eпѓЋ p
 z(ri)  1
пѓ¦
1 пѓ¶
1
 . e  p : x ( e )  x ( e )  1 
пѓ·пЂ«
u (e ) пѓё n пѓ— u (e )
пѓЁ
 y(ri,p)  1
Analysis of Online Algorithm
3. Dual is (almost) feasible.
We prove:
• For each e, after routing u(e)O(log n) on e, x(e)≥1
x(e) is a sum of a geometric sequence
x(e)1 = 1/(nu(e)), q = 1+1/u(e)
пѓЁ After u(e)O(log n) requests:
u ( e ) O (log n )
пѓ¦
1 пѓ¶
пЂ­1
пѓ§1 пЂ«
пѓ·
u (e) пѓё
1
пѓЁ
x (e) пЂЅ
пѓ—
пЂЅ
n пѓ— u (e )
пѓ¦
1 пѓ¶
пѓ§1 пЂ«
пѓ· пЂ­1
u (e) пѓё
пѓЁ
пѓ¦
1 пѓ¶
пѓ§1 пЂ«
пѓ·
u
(
e
)
пѓЁ
пѓё
u ( e ) O (log n )
пЂ­1
п‚і1
n
New Results via P-D Approach: Routing
Previous results (routing/packing):
• [AAP93] – Route O(log n) fraction of the optimal
without violating capacity constraints.
Capacities must be at least logarithmic.
• [AAFPW94] – Route all the requests with load of at
most O(log n) times the optimal load.
Observation [BN06] – Both results can be described
within the primal-dual approach.
New Results via P-D Approach: Routing
We saw a simple algorithm which is:
• 3-competitive and violates capacities by O(log n) factor.
Can be improved [Buchbinder, Naor, FOCS06] to:
• 1-competitive and violates capacities by O(log n) factor.
Non Trivial.
Main ideas:
• Combination of ideas drawn from casting of previous
routing algorithms within the primal-dual approach.
• Decomposition of the graph.
• Maintaining several primal solutions which are used to
bound the dual solution, and for the routing decisions.
New Results via P-D Approach: Routing
Applications [Buchbinder, N, FOCS 06]:
• Can be used as “black box” for many objective
functions and in many routing models:
– Previous Settings [AAP93,APPFW94].
– Maximizing throughput.
– Minimizing load.
– Achieving better global fairness results
(Coordinate competitiveness).
Road Map
Introducing the framework:
• Ski rental
• Online set cover
• Virtual circuit routing
The general framework:
• {0,1} covering/packing linear programs
• General covering/packing linear programs
Recent results:
• The ad-auctions problem
• Weighted caching
Online Primal-Dual Approach
• Can the offline problem be cast as a linear
covering/packing program?
• Can the online process be described as:
– New rows appearing in a covering LP?
– New columns appearing in a packing LP?
Yes ??
• Upon arrival of a new request:
– Update primal variables in a multiplicative way.
– Update dual variables in an additive way.
Online Primal Dual Approach
Next Prove:
1. Primal solution is feasible (or nearly feasible).
2. In each round, ΔP ≤ c ΔD.
3. Dual is feasible (or nearly feasible).
Got a fractional solution, but need an integral
solution ??
•
•
Randomized rounding techniques might work.
Sometimes, even derandomization (e.g., method of
conditional probabilities) can be applied online!
Online Primal-Dual Approach
Advantages:
1. Generic ideas and algorithms applicable to many
online problems.
2. Linear Program helps detecting the difficulties of the
online problem.
3. General recipe for the design and analysis of online
algorithms.
4. No potential function appearing “out of nowhere”.
5. Competitiveness with respect to a fractional optimal
solution.
General Covering/Packing Results
What can you expect to get?
•
For a {0,1} covering/packing matrix:
– Competitive ratio O(log D) [BN05]
(D – max number of non-zero entries in a constraint).
Remarks:
• Fractional solutions.
•
Number of constraints/variables can be exponential.
•
There can be a tradeoff between the competitive ratio
and the factor by which constraints are violated.
General Covering/Packing Results
• For a general covering/packing matrix [BN05] :
Covering:
– Competitive ratio O(log n)
(n – number of variables).
Packing:
– Competitive ratio O(log n + log [a(max)/a(min)])
a(max), a(min) – maximum/minimum non-zero entry
Remarks:
•
Results are tight.
Special Cases
The max number of non-zero entries in a
constraint is a constant?
• You can get a constant ratio.
The max number of non-zero entries in a
constraint is 2?
• Calls for an e/(e-1)-ratio.
Examples:
• Ski rental, Online matching, Ad-Auctions.
Known Results via P-D Approach
Covering Online Problems (Minimization):
•
O(log k)-algorithm for weighted caching [BBN07]
•
Ski rental, Dynamic TCP Acknowledgement
•
Parking Permit Problem [Meyerson 05]
•
•
Online Set Cover [AAABN03]
Online Graph Covering Problems [AAABN04]:
–
–
–
–
Non-metric facility location
Generalized connectivity: pairs arrive online
Group Steiner: groups arrive online
Online multi-cut: (s,t)--pairs arrive online
Known Results via P-D Approach
Packing Online Problems (maximization):
•
Online Routing/Load Balancing Problems [AAP93,
AAPFW93, BN06].
•
•
•
General Packing/routing e.g. Multicast trees.
Online Matching [KVV91] – Nodes arrive one-by-one.
Ad-Auctions Problem [MSVV05] – In a bit …
Road Map
Introducing the framework:
• Ski rental
• Online set cover
• Virtual circuit routing
The general framework:
• {0,1} covering/packing linear programs
• General covering/packing linear programs
Recent results:
• The ad-auctions problem
• Weighted caching
What are Ad-Auctions?
You type in a search engine: Vacation Eilat
You get:
And …
Advertisements
Algorithmic
Search results
How do search engines sell ads?
• Each advertiser:
– Sets a daily budget
– Provides bids on interesting keywords
• Search Engine (on each keyword):
– Selects ads
– Advertiser pays bid if user clicks on ad.
Goal (of Search engine):
Maximize revenue
Mathematical Model
• Buyer i:
– Has a daily budget B(i)
• Online Setting:
– Items (keywords) arrive one-by-one.
– Each buyer gives a bid on each of the items
(can be zero)
• Algorithm:
– Assigns each item to some interested buyer.
Assumption:
Bids are small compared to the daily budget.
Ad-Auctions – Linear Program
B(i) – Budget of buyer i
b(i,j) – bid of buyer i on item j
I - Set of buyers.
J - Set of items.
y (i , j )
= 1 пѓћ j-th ad-auction is sold to buyer i.
m ax 
iпѓЋ I
s.t:
For each item j:
jпѓЋ J
 y (i , j )  1
iпѓЋ I
For each buyer i:
 b (i, j ) y (i, j )
Each item is
Buyers
do not
sold once.
exceed their
budget
 b (i , j ) y (i , j )  B (i )
jпѓЋ J
Results
[MSVV FOCS 05]:
• (1-1/e)-competitive online algorithm.
• Bound is tight.
• Analysis uses tradeoff revealing family of LP’s - not
very intuitive.
Our Results [Buchbinder, Jain, N, 2007]:
• A different approach based on the primal-dual method:
very simple and intuitive … and extensions.
• Techniques are applicable to many other problems.
The Paging/Caching Problem
Set of n pages, cache of size k<n.
Request sequence of pages 1, 6, 4, 1, 4, 7, 6, 1, 3, …
If requested page is in cache, no penalty.
Else, cache miss!
And load page into cache, (possibly) evicting some page.
Goal: Minimize the number of cache misses.
Main Question: Which page to evacuate?
Previous Results: Paging
Paging (Deterministic) [Sleator Tarjan 85]:
• Any det. algorithm >= k-competitive.
• LRU is k-competitive (also other algorithms)
• LRU is k/(k-h+1)-competitive if optimal has cache of size h<k
Paging (Randomized):
• Rand. Marking O(log k) [Fiat, Karp, Luby, McGeoch, Sleator,
Young 91].
• Lower bound Hk [Fiat et al. 91], tight results known.
• O(log(k/k-h+1))-competitive algorithm if optimal has
cache of size h<k [Young 91]
The Weighted Paging Problem
One small change:
• Each page i has a different load cost w(i).
• Models scenarios in which the cost of bringing pages is
not uniform:
Main memory, disk, internet …
web
Goal
• Minimize the total cost of cache misses.
Weighted Paging (Previous Work)
Randomized
Deterministic
Paging
Weighted Paging
Lower bound k
LRU
k competitive
k-competitive [Chrobak, Karloff,
Payne, Vishwanathan 91]
k/(k-h+1) if opt’s cache size h
k/(k-h+1)
O(log k) Randomized
Marking
O(log k) for two weight classes
O(log k/(k-h+1))
[Young 94]
[Irani 02]
No o(k) algorithm known even
for 3 weight classes.
The k-server Problem
• k servers lie in an n-point metric space.
• Requests arrive at metric points.
• To serve request: Need to move some server there.
Goal: Minimize total movement cost
• Paging = k-server on a uniform metric.
(every page is a point, page in cache iff server on the point)
• Weighted paging = k-server on a weighted star metric.
The k-server Problem
• k servers lie in an n-point metric space.
• Requests arrive at metric points.
• To serve request: Need to move some server there.
Goal: Minimize total movement cost
(2k-1) Det. Work Function Alg
[Koutsoupias, Papadimitriou 95]
Randomized. No o(k) known
(even for very simple spaces).
Best lower bound пЃ—(log k)
(widely believed conjecture)
Our Results
Weighted Paging (Randomized):
(Bansal, Buchbinder, N., FOCS 2007)
• O(log k)-competitive algorithm for weighted paging.
• O(log (k/k-h+1))-competitive if opt’s cache size h<k.
Much simpler than previous approaches.
Metrical Task System (Randomized):
• O(log N)-competitive algorithm on a weighted star metric.
• Closely related to k-server problem (details in paper …)
Further Research
Generalized Caching
• Pages have both sizes and fetching costs.
• Motivation: Web-Caching
Special models:
• Bit model: Fetching cost proportional to size (minimize traffic)
• Fault model: Fetching cost is uniform (minimize number of
times a user has to wait for a page)
Results (Bansal, Buchbinder, N., 2008):
• O(log k)-competitive algorithms for Bit and Fault models.
• O(log2k)-competitive algorithm for the general model.
• Requires new interesting ideas and interesting analysis in
the rounding phase.
Further Research
• More applications.
• Extending the general framework
beyond packing/covering.
• The k-server problem?
Thank you
Документ
Категория
Презентации
Просмотров
6
Размер файла
1 276 Кб
Теги
1/--страниц
Пожаловаться на содержимое документа