A Primal-Dual Approach for Online Problems Nikhil Bansal.

Slides:



Advertisements
Similar presentations
A Primal-Dual Approach to Online Optimization Problems.
Advertisements

Primal Dual Combinatorial Algorithms Qihui Zhu May 11, 2009.
Totally Unimodular Matrices
Primal-Dual Algorithms for Connected Facility Location Chaitanya SwamyAmit Kumar Cornell University.
Online Algorithms Amrinder Arora Permalink:
Online Scheduling with Known Arrival Times Nicholas G Hall (Ohio State University) Marc E Posner (Ohio State University) Chris N Potts (University of Southampton)
Interchanging distance and capacity in probabilistic mappings Uriel Feige Weizmann Institute.
Instructor Neelima Gupta Table of Contents Lp –rounding Dual Fitting LP-Duality.
Online Algorithms, Linear Programming, and the k-Server Problem Seffi Naor Computer Science Dept. Technion Approximation Algorithms: The Last Decade and.
Totally Unimodular Matrices Lecture 11: Feb 23 Simplex Algorithm Elliposid Algorithm.
A Constant Factor Approximation Algorithm for the Multicommodity Rent-or-Buy Problem Amit Kumar Anupam Gupta Tim Roughgarden Bell Labs CMU Cornell joint.
Approximation Algorithm: Iterative Rounding Lecture 15: March 9.
Approximation Algorithms
Online Oblivious Routing Nikhil Bansal, Avrim Blum, Shuchi Chawla & Adam Meyerson Carnegie Mellon University 6/7/2003.
Primal-Dual Algorithms for Connected Facility Location Chaitanya SwamyAmit Kumar Cornell University.
Competitive Paging Algorithms Amos Fiat, Richard Karp, Michael Luby, Lyle McGeoch, Daniel Sleator, Neal Young presented by Seth Phillips.
A General Approach to Online Network Optimization Problems Seffi Naor Computer Science Dept. Technion Haifa, Israel Joint work: Noga Alon, Yossi Azar,
Priority Models Sashka Davis University of California, San Diego June 1, 2003.
Approximation Algorithms: Bristol Summer School 2008 Seffi Naor Computer Science Dept. Technion Haifa, Israel TexPoint fonts used in EMF. Read the TexPoint.
Online Function Tracking with Generalized Penalties Marcin Bieńkowski Institute of Computer Science, University of Wrocław, Poland Stefan Schmid Deutsche.
Paging for Multi-Core Shared Caches Alejandro López-Ortiz, Alejandro Salinger ITCS, January 8 th, 2012.
A polylog competitive algorithm for the k-server problem Nikhil Bansal (Eindhoven) Niv Buchbinder (Open Univ., Israel) Aleksander Madry (MIT) Seffi Naor.
1/24 Algorithms for Generalized Caching Nikhil Bansal IBM Research Niv Buchbinder Open Univ. Israel Seffi Naor Technion.
1 The Santa Claus Problem (Maximizing the minimum load on unrelated machines) Nikhil Bansal (IBM) Maxim Sviridenko (IBM)
Approximation Algorithms for Stochastic Combinatorial Optimization Part I: Multistage problems Anupam Gupta Carnegie Mellon University.
1.3 Modeling with exponentially many constr.  Some strong formulations (or even formulation itself) may involve exponentially many constraints (cutting.
Competitive On-Line Admission Control and Routing By: Gabi Kliot Presentation version.
Online Oblivious Routing Nikhil Bansal, Avrim Blum, Shuchi Chawla & Adam Meyerson Carnegie Mellon University 6/7/2003.
Throughput Competitive Online Routing Baruch Awerbuch Yossi Azar Serge Plotkin.
Guy Even & Moti Medina EE Tel-Aviv University Gregor Schaffrath & Stefan Schmid Deutsche Telekom Labs, TU Berlin.
The Multiplicative Weights Update Method Based on Arora, Hazan & Kale (2005) Mashor Housh Oded Cats Advanced simulation methods Prof. Rubinstein.
Round and Approx: A technique for packing problems Nikhil Bansal (IBM Watson) Maxim Sviridenko (IBM Watson) Alberto Caprara (U. Bologna, Italy)
1 Introduction to Approximation Algorithms. 2 NP-completeness Do your best then.
Primal-Dual Algorithms for Connected Facility Location Chaitanya SwamyAmit Kumar Cornell University.
Packing Rectangles into Bins Nikhil Bansal (CMU) Joint with Maxim Sviridenko (IBM)
Minimizing Cache Usage in Paging Alejandro López-Ortiz, Alejandro Salinger University of Waterloo.
Minimizing Stall Time in Single Disk Susanne Albers, Naveen Garg, Stefano Leonardi, Carsten Witt Presented by Ruibin Xu.
Online Algorithms, Linear Programming, and the k-Server Problem
CSE 589 Part VI. Reading Skiena, Sections 5.5 and 6.8 CLR, chapter 37.
1 Iterative Integer Programming Formulation for Robust Resource Allocation in Dynamic Real-Time Systems Sethavidh Gertphol and Viktor K. Prasanna University.
Linear Program Set Cover. Given a universe U of n elements, a collection of subsets of U, S = {S 1,…, S k }, and a cost function c: S → Q +. Find a minimum.
Approximation Algorithms Department of Mathematics and Computer Science Drexel University.
A polylog competitive algorithm for the k-server problem Nikhil Bansal (IBM) Niv Buchbinder (Open Univ.) Aleksander Madry (MIT) Seffi Naor (Technion)
Hierarchical Well-Separated Trees (HST) Edges’ distances are uniform across a level of the tree Stretch  = factor by which distances decrease from root.
A Optimal On-line Algorithm for k Servers on Trees Author : Marek Chrobak Lawrence L. Larmore 報告人:羅正偉.
Implicit Hitting Set Problems Richard M. Karp Erick Moreno Centeno DIMACS 20 th Anniversary.
Hon Wai Leong, NUS (CS6234, Spring 2009) Page 1 Copyright © 2009 by Leong Hon Wai CS6234: Lecture 4  Linear Programming  LP and Simplex Algorithm [PS82]-Ch2.
Lecture.6. Table of Contents Lp –rounding Dual Fitting LP-Duality.
Minimizing Response time in Broadcast Scheduling Nikhil Bansal Don Coppersmith and Maxim Sviridenko.
© The McGraw-Hill Companies, Inc., Chapter 12 On-Line Algorithms.
Introduction to the k-Server Problem Marcel Birkner.
Matroids, Secretary Problems, and Online Mechanisms Nicole Immorlica, Microsoft Research Joint work with Robert Kleinberg and Moshe Babaioff.
Algorithmic Game Theory and Internet Computing Vijay V. Vazirani 3) New Market Models, Resource Allocation Markets.
Linear Programming Chapter 9. Interior Point Methods  Three major variants  Affine scaling algorithm - easy concept, good performance  Potential.
1 Approximation Algorithms for Generalized Scheduling Problems Ravishankar Krishnaswamy Carnegie Mellon University joint work with Nikhil Bansal, Anupam.
11 -1 Chapter 12 On-Line Algorithms On-Line Algorithms On-line algorithms are used to solve on-line problems. The disk scheduling problem The requests.
Instructor: Shengyu Zhang 1. Offline algorithms Almost all algorithms we encountered in this course assume that the entire input is given all at once.
PRIMAL-DUAL APPROXIMATION ALGORITHMS FOR METRIC FACILITY LOCATION AND K-MEDIAN PROBLEMS K. Jain V. Vazirani Journal of the ACM, 2001.
Approximation Algorithms Duality My T. UF.
Approximation Algorithms based on linear programming.
Lap Chi Lau we will only use slides 4 to 19
Topics in Algorithms Lap Chi Lau.
Chapter 5. Optimal Matchings
1.3 Modeling with exponentially many constr.
Chapter 6. Large Scale Optimization
Analysis of Algorithms
Dynamic and Online Algorithms for Set Cover
On Approximating Covering Integer Programs
Online Algorithms via Projections set cover, paging, k-server
Chapter 6. Large Scale Optimization
Presentation transcript:

A Primal-Dual Approach for Online Problems Nikhil Bansal

Online Algorithms Input revealed in parts. Algorithm has no knowledge of future. Scheduling, Load Balancing, Routing, Caching, Finance, Machine Learning … Competitive ratio = Expected Competitive ratio = Alternate view: game between algorithm and adversary

Some classic problems

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. Deterministic: 2 Randomized: e/(e-1) ¼ 1.58

Online Virtual Circuit Routing Network graph G=(V, E) capacity function u: E  Z + Requests: r i = (s i, t i ) Problem: Connect s i to t i 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.

Virtual Circuit Routing - Example t1t1 s1s1 t2t2 s2s2 s3s3 t3t3 Maximum Load: 0 1/5 2/53/5 Edge capacities: 5

Virtual Circuit Routing Key decision: 1)Whether to choose request or not? 2)How to route request? O(log n)-congestion, O(1)-throughput [Awerbuch Azar Plotkin 90’s] Various other versions and tradeoffs. Main idea: Exponential penalty approach length (edge) = exp (congestion) Decisions based on length of shortest (s i,t i ) path Clever potential function analysis

The Paging/Caching Problem Set of pages {1,2,…,n}, cache of size k<n. Request sequence of pages 1, 6, 4, 1, 4, 7, 6, 1, 3, … a) If requested page already in cache, no penalty. b) Else, cache miss. Need to fetch page in cache (possibly) evicting some other page. Goal: Minimize the number of cache misses. Key Decision: Upon a request, which page to evacuate?

Previous Results: Paging Paging (Deterministic) [Sleator Tarjan 85]: Any det. algorithm ¸ k-competitive. LRU is k-competitive (also other algorithms) Paging (Randomized): Rand. Marking O(log k) [Fiat, Karp, Luby, McGeoch, Sleator, Young 91]. Lower bound H k [Fiat et al. 91], tight results known.

Do these problems have anything in common?

An Abstract Online Problem min 3 x x 2 + x x 4 + … 2 x 1 + x 3 + x 6 + … ¸ 3 x 3 + x 14 + x 19 + … ¸ 8 x x 4 + x 12 + … ¸ 2 Goal: Find feasible solution x * with min cost. Requirements: 1) Upon arrival constraint must be satisfied 2) Cannot decrease a variable. Covering LP (non-negative entries)

Example min x 1 + x 2 + … + x n x 1 + x 2 + x 3 + … + x n ¸ 1 x 2 + x 3 + … + x n ¸ 1 x 3 + … + x n ¸ 1 … x n ¸ 1 Online ¸ ln n (1+1/2+ 1/3+ … + 1/n) Opt = 1 ( x n =1 suffices) Set all x i to 1/n Increase x 2,x 3,…,x n to 1/n-1 … Increase x n to 1

The Dual Problem max 3 y y 2 + y y 4 + … 2 y 1 + y 2 + y 3 + … · 3 y 1 + y y 3 + … · 8 y 1 +7 y 2 + y 3 + … · 2 Goal: Find y * with max cost. Requirements: 1) Variables arrive sequentially 2) At step t, can only modify y(t) Packing LP (non-negative entries) All previous problems can be expressed as Covering/Packing LP

Ski Rental – Integer Program Subject to: For each day i: (either buy or rent)

Routing – Linear Program s.t: For each r i : For each edge e: = Amount of bandwidth allocated for r i on path p - Available paths to serve request r i

Paging – Linear Program Time line Pg i At any time t, can have at most k such intervals. x(i,j): How much interval (i,j) evacuated thus far If interval not present, then cache miss.  at least n-k intervals must be absent Cost =  i  j x(i,j) n: number of distinct pages t Pg i’ 0 · x(i,j) · 1  i: i  p t x(i,r(i,t)) ¸ n-k 8 t (i,1) (i,2)

What can we say about the abstract problem ?

General Covering/Packing Results For a {0,1} covering/packing matrix: [Buchbinder Naor 05] –Competitive ratio O(log D) –Can get e/e-1 for ski rental and other problems. (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. Fractional solution ! randomized algorithm (online rounding)

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) – max/min non-zero entry Remarks: Results are tight. Can add “box” constraints to covering LP (e.g. x · 1)

Consequences The online covering LP problem (and its dual packing counterpart) is a powerful framework Ski-Rental, Adword auctions, Dynamic TCP acknowledgement, Online Routing, Load Balancing, Congestion Minimization, Caching, Online Matching, Online Graph Covering, Parking Permit Problem, … Routing: O( log n) congestion, 1 competitive on throughput Can incorporate fairness Awerbuch, Azar, Plotkin result obtained by derandomizing the scheme online by applying pessimistic estimators.

Consequences (Weighted Paging) Each page i has a different fetching cost w(i). Main memory, disk, internet … Goal: Minimize the total cost of cache misses. web O(log k) competitive algorithm [B., Buchbinder, Naor 07] Previously, o(k) known only for the case of 2 weights [Irani 02] O(log 2 k) for Generalized Paging (arbitrary weights and sizes) [B., Buchbinder, Naor 08] Previously, o(k) known only for special cases. [Irani 97]

Rest of the Talk 1)Overview of LP Duality, offline P-D technique 2)Derive Online Primal Dual (very natural) 3)Further Extensions

Duality Min 3 x x 2 x 1 + x 2 >= 3 x x 2 >= 5 Want to convince someone that there is a solution of value 12. Easy, just demonstrate a solution, x 2 = 3

Duality Min 3 x x 2 x 1 + x 2 >= 3 x x 2 >= 5 Want to convince someone that there is no solution of value 10. How? 2 * first eqn + second eqn 3 x x 2 >= 11 LP Duality Theorem: This seemingly ad hoc trick always works!

LP Duality Min c j x j  j a ij x j ¸ b i So, for any y ¸ 0 satisfying  i a ij y i · c j for all i  j x j c j ¸  i y i b i Equality when Complementary Slackness i.e. y i > 0 (only if corresponding primal constraint is tight) x i > 0 (only if corresponding dual constraint is tight)  i y i  j a ij x j ¸  i y i b i  j x j (  i a ij y i ) ¸  i y i b i Dual LP Dual cost Linear combination (y ¸ 0)

Offline Primal-Dual Approach min cx max b y Ax ¸ b A t y · c x ¸ 0 y ¸ 0 Generic Primal Dual Algorithm: 0) Start with x=0, y=0 (primal infeasible, dual feasible) 1) Increase dual and primal together, s.t. if dual cost increases by 1, primal increases by · c 2) If both dual and primal feasible ) c approximate solution

Key Idea for Online Primal Dual Primal: Min  i c i x i Dual Step t, new constraint: New variable y t a 1 x 1 + a 2 x 2 + … + a j x j ¸ b t + b t y t in dual objective How much:  x i ? y t ! y t + 1 (additive update)  primal cost = dx/dy proportional to x so, x varies as exp(y) =  Dual Cost

How to initialize A problem: dx/dy is proportional to x, but x=0 initially. So, x will remain equal to 0 ? Answer: Initialize to 1/n. When: Complementary slackness tells us that x > 0 only if dual constraint corresponding to x is tight. Set x=1/n when its dual constraint becomes tight.

The Algorithm Min  j c j x j  j a ij x j ¸ b i On arrival of i-th constraint, Initialize y i =0 (dual var. for constraint) If current constraint unsatisfied, gradually increase y i If x j =0, set x j = 1/n when  i a ij y i = c j else update x j as 1/n ¢ exp( (  i a ij y i / c j ) - 1 ) 1) Primal Cost · Dual Cost 2) Dual solution violated by at most O(log n) factor. Max  i b i y i  i a ij y i · c j

Corresponding Dual constraint Example: Caching 1/k 1 Dual is tight Dual violated by O(log k) Page fully in cache (“marked”) Page fully evacuated Page is “unmarked” 0 x p : fraction of p missing from cache

Part 2: Rounding Primal dual technique gives fractional solution. Problem specific rounding/interpretation: 1) Easy for ski rental (value of x, is prob. of buying by then) 2) Routing: Can derandomize online using pessimistic estimator or other techniques 3) Caching (tricky): Gives probability distribution on pages, Actually want probability distribution on cache states.

Beyond Packing/Covering LPs

Extended Framework Limitations of current framework 1. Only covering or packing LP 2. Variables can only increase. Cannot impose: a ¸ b or a ¸ b 1 – b 2 Problem with monotonicity: Predicting with Experts: Do as well as best expert in hindsight n experts: Each day, predict rain or shine. Online · Best expert (1+  ) + O(log n)/  (low regret) In any LP, x i,t = Prob. of expert i at time t.

New LP for weighted paging Variable y p,t : How much page p missing from cache at time t. p t = page requested at time t. Min  p,t w p z p,t +  t 1 ¢ y p t,t  p 2 S y p,t ¸ |S|-k 8 S,t z p,t ¸ y p,t – y p,t-1 8 p,t y p,t ¸ 0 8 p,t The insights from previous approach can be used. Notably, multiplicative updates Solve finely competitive paging. [B., Buchbinder, Naor 10]

K-Server Problem

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 distance traveled. Objective: Competitive ratio Move Nearest Algorithm

The Paging/Caching Problem K-server on the uniform metric. Server on location p = page p in cache 1 n...

Previous Results: Paging Paging (Deterministic) [Sleator Tarjan 85]: Any deterministic algorithm >= k-competitive. LRU is k-competitive (also other algorithms) Paging (Randomized): Rand. Marking O(log k) [Fiat, Karp, Luby, McGeoch, Sleator, Young 91]. Lower bound H k [Fiat et al. 91], tight results known.

K-server conjecture [Manasse-McGeoch-Sleator ’88]: There exists k competitive algorithm on any metric space. Initially no f(k) guarantee. Fiat-Rababi-Ravid’90: exp(k log k) … Koutsoupias-Papadimitriou’95: 2k-1 Chrobak-Larmore’91: k for trees.

Randomized k-server Conjecture There is an O(log k) competitive algorithm for any metric. Uniform Metric: log k Polylog for very special cases (uniform-like) Line: n 2/3 [Csaba-Lodha’06] exp(O(log n) 1/2 ) [Bansal-Buchbinder-Naor’10] Depth 2-tree: No o(k) guarantee

Result Thm [B.,Buchbinder,Madry,Naor 11]: There is an O(log 2 k log 3 n) competitive* algorithm for k-server on any metric with n points. * Hiding some log log n terms Key Idea: Multiplicative Updates

Our Approach Hierarchically Separated Trees (HSTs) [Bartal 96]. Any Metric Allocation Problem (uniform metrics): [Cote-Meyerson-Poplawski’08] (decides how to distribute servers among children) O(log n) Allocation instances K-server on HST

Outline Introduction Allocation Problem Fractional Caching Algorithm The final solution

Allocation Problem Uniform Metric At each time t, request arrives at some location i Request = (h t (0),…,h t (k)) [monotone: h(0) ¸ h(1) … ¸ h(k)] Upon seeing request, can reallocate servers Hit cost = h t (k i ) [k i : number of servers at i] Total cost = Hit cost + Move cost Eg: Paging = cost vectors ( 1,0,0,…,0) *Total servers k(t) can also change (let’s ignore this)

Allocation to k-server Thm [Cote-Poplawski-Meyerson]: An online algorithm for allocation s.t. for any  > 0, i) Hit Cost (Alg) · (1+  ) OPT ii) Move Cost (Alg) ·  OPT gives ¼ O(d  1/d)) competitive k-server alg. on depth d HSTs d = log (aspect ratio) So,  = poly(1/  ) polylog(k,n) suffices *HSTs need some well-separatedness *Later, we do tricks to remove dependence on aspect ratio We do not know how to obtain such an algorithm.

Fractional Allocation Problem x i,j : prob. of having j servers at location i (at time t)  j x i,j = 1 (prob. distribution)  i  j j x i,j · k (global server bound) Cost: Hit cost with h(0),…,h(k) =  j x i,j h(j) Moving  mass from (i,j) to (i,j’) costs  |j’-j| Surprisingly, fractional allocation does not give good randomized alg. for allocation problem.

A gap example Allocation Problem on 2 points Requests alternate on locations. Left: (1,1,…,1,0) Right: (1,0,…,0,0) Any integral solution must pay  (T) in T steps. Claim: Fractional Algorithm pays only T/(2k). X L,0 = 1/k x L,k = 1-1/k X R,1 = 1 No move cost. Hit cost of 1/k on left requests. LeftRight

Fractional Algorithm Suffices Thm (Analog of Cote et al): Suffices to have fractional allocation algorithm with (1+ ,  (  )) guarantee. Gives a fractional k-server algorithm on HST Thm (Rounding): Fractional k-server alg. on HSTs -> Randomized Alg. with O(1) loss. Thm (Frac. Allocation): Design a fractional allocation algorithm with  = O(log (k/  )).

Outline Introduction Allocation Problem Fractional Caching Algorithm The final Solution

Fractional Paging Algorithm State: For each location i, we have p i,0 + p i,1 =1 and  i p i,1 =k. Say request at 1 arrives. Algorithm: Need to bring p 1,0 =1-p 1,1 mass into p 1,1. Rule: For each page i decrease p i,1 / p i,0 +  (  = 1/k) Intuition: If p i,1 close to 1, be more conservative in evicting. Multiplicative Update: d(p) / (p) 0 Pg 1Pg 2 Pg n … P 1,1 P 1,0 p 2,0 P 2, P n,0 P n,1

Allocation Problem Suppose cost vector  j = ( , ,…, ,0,…,0) at location 1. (i.e. cost  if · j servers, 0 otherwise) Hit cost Y=  (x 1,0 + …+ x 1,j ) Increase servers by ¼ Y Fix number: For each location i (including 1), rebalance prob. mass by multiplicative update. (location 1) 012 jj+1 k Recall  j x ij = 1, 8 i …… Each x i,j (except last j) Increases /  x i,j

Analysis An extension of analysis for paging works. Use potential function based analysis of caching (inspired by primal dual algorithm).

Concluding Remarks Primal Dual and Multiplicative Updates: Unifying idea in many online algorithms.

Thank you