1/24 Algorithms for Generalized Caching Nikhil Bansal IBM Research Niv Buchbinder Open Univ. Israel Seffi Naor Technion.

Slides:



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

Tutorial at ICCV (Barcelona, Spain, November 2011)
Approximation Algorithms for Capacitated Set Cover Ravishankar Krishnaswamy (joint work with Nikhil Bansal and Barna Saha)
Online Algorithms Amrinder Arora Permalink:
Princeton University COS 423 Theory of Algorithms Spring 2001 Kevin Wayne Competitive Analysis.
An Optimal Lower Bound for Buffer Management in Multi-Queue Switches Marcin Bieńkowski.
2007/3/6 1 Online Chasing Problems for Regular n-gons Hiroshi Fujiwara* Kazuo Iwama Kouki Yonezawa.
1 Better Scalable Algorithms for Broadcast Scheduling Ravishankar Krishnaswamy Carnegie Mellon University Joint work with Nikhil Bansal and Viswanath Nagarajan.
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.
Approximation Algorithm: Iterative Rounding Lecture 15: March 9.
Approximation Algorithms
Combinatorial Interpretations of Dual Fitting and Primal Fitting Ari Freund Cesarea Rothschild Institute, University of Haifa Dror Rawitz Department of.
Online Oblivious Routing Nikhil Bansal, Avrim Blum, Shuchi Chawla & Adam Meyerson Carnegie Mellon University 6/7/2003.
Ecole Polytechnique, Nov 7, Online Job Scheduling Marek Chrobak University of California, Riverside.
Randomized Competitive Analysis for Two Server Problems Wolfgang Bein Kazuo Iwama Jun Kawahara.
Job Scheduling Lecture 19: March 19. Job Scheduling: Unrelated Multiple Machines There are n jobs, each job has: a processing time p(i,j) (the time to.
Integer Programming Difference from linear programming –Variables x i must take on integral values, not real values Lots of interesting problems can be.
Sandia is a multiprogram laboratory operated by Sandia Corporation, a Lockheed Martin Company, for the United States Department of Energy under contract.
Distributed Combinatorial Optimization
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,
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.
A tale of 2-dimensional (Guillotine) bin packing Nikhil Bansal (IBM) Andrea Lodi (Univ. of Bologna, Italy) Maxim Sviridenko (IBM)
Paging for Multi-Core Shared Caches Alejandro López-Ortiz, Alejandro Salinger ITCS, January 8 th, 2012.
Minimizing Cache Usage in Paging Alejandro Salinger University of Waterloo Joint work with Alex López-Ortiz.
A polylog competitive algorithm for the k-server problem Nikhil Bansal (Eindhoven) Niv Buchbinder (Open Univ., Israel) Aleksander Madry (MIT) Seffi Naor.
1 The Santa Claus Problem (Maximizing the minimum load on unrelated machines) Nikhil Bansal (IBM) Maxim Sviridenko (IBM)
LP-based Algorithms for Capacitated Facility Location Chaitanya Swamy Joint work with Retsef Levi and David Shmoys Cornell University.
Approximation Algorithms for Stochastic Combinatorial Optimization Part I: Multistage problems Anupam Gupta Carnegie Mellon University.
Online Oblivious Routing Nikhil Bansal, Avrim Blum, Shuchi Chawla & Adam Meyerson Carnegie Mellon University 6/7/2003.
A Primal-Dual Approach for Online Problems Nikhil Bansal.
Round and Approx: A technique for packing problems Nikhil Bansal (IBM Watson) Maxim Sviridenko (IBM Watson) Alberto Caprara (U. Bologna, Italy)
Online Paging Algorithm By: Puneet C. Jain Bhaskar C. Chawda Yashu Gupta Supervisor: Dr. Naveen Garg, Dr. Kavitha Telikepalli.
Randomized Online Algorithm for Minimum Metric Bipartite Matching Adam Meyerson UCLA.
1 Server Scheduling in the L p norm Nikhil Bansal (CMU) Kirk Pruhs (Univ. of Pittsburgh)
Strong LP Formulations & Primal-Dual Approximation Algorithms David Shmoys (joint work Tim Carnes & Maurice Cheung) TexPoint fonts used in EMF. Read the.
Approximation Algorithms Department of Mathematics and Computer Science Drexel 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.
LP-Based Algorithms for Capacitated Facility Location Hyung-Chan An EPFL July 29, 2013 Joint work with Mohit Singh and Ola Svensson.
Dynamic Covering for Recommendation Systems Ioannis Antonellis Anish Das Sarma Shaddin Dughmi.
Online Algorithms, Linear Programming, and the k-Server Problem
1/19 Minimizing weighted completion time with precedence constraints Nikhil Bansal (IBM) Subhash Khot (NYU)
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)
A Optimal On-line Algorithm for k Servers on Trees Author : Marek Chrobak Lawrence L. Larmore 報告人:羅正偉.
Frequency Capping in Online Advertising Moran Feldman Technion Joint work with: Niv Buchbinder,The Open University of Israel Arpita Ghosh,Yahoo! Research.
Instructor: Shengyu Zhang 1. Secretary hiring problem 2.
Lecture.6. Table of Contents Lp –rounding Dual Fitting LP-Duality.
Minimizing Response time in Broadcast Scheduling Nikhil Bansal Don Coppersmith and Maxim Sviridenko.
A Unified Continuous Greedy Algorithm for Submodular Maximization Moran Feldman Roy SchwartzJoseph (Seffi) Naor Technion – Israel Institute of Technology.
Introduction to the k-Server Problem Marcel Birkner.
Non-Preemptive Buffer Management for Latency Sensitive Packets Moran Feldman Technion Seffi Naor Technion.
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.
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.
Chapter 8 PD-Method and Local Ratio (5) Equivalence This ppt is editored from a ppt of Reuven Bar-Yehuda. Reuven Bar-Yehuda.
Chap 10. Sensitivity Analysis
Chapter 6. Large Scale Optimization
Dynamic and Online Algorithms for Set Cover
On Approximating Covering Integer Programs
Online Algorithms via Projections set cover, paging, k-server
Branch-and-Bound Algorithm for Integer Program
Chapter 6. Large Scale Optimization
Presentation transcript:

1/24 Algorithms for Generalized Caching Nikhil Bansal IBM Research Niv Buchbinder Open Univ. Israel Seffi Naor Technion

2/24 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, … If requested page already in cache, no penalty. Else, cache miss: Fetch page in cache (possibly) evicting some other page. Goal: Minimize the number of cache misses. Main Question: Which page to evict?

3/24 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.

4/24 Generalized Caching First Extension: Pages have different fetching costs. Models scenarios in which the fetching cost is not uniform: Main memory, disk, internet … Second (Orthogonal) Extension: Pages have different sizes (in range [1,k]) Models web-caching problems (Proxy Servers, local cache in browser) web

5/24 Generalized Paging Deterministic: (k+1)-competitive [Cao, Irani 97], [ Young 98] Randomized: General Problem: Nothing better Special cases [Irani 97] Bit Model (wt = size): O(log 2 k) Fault Model (wt = 1): O(log 2 k) Offline: NP-Hard, 4-approximation [Bar-noy, Bar-yehuda, Freund, Naor, Schieber 01]

6/24 Our Results Thm: O(log 2 k) competitive alg. for Generalized Caching Thm: O(log k) for bit and fault model. Main Technique: Primal Dual Method for Online Algorithms (formalized by Buchbinder and Naor 05) [based on multiplicative updates, several previous works…] Recent Update: Improved to O(log k) [Adamaszek, Czumaj, Englert, Räcke]

7/24 High level approach First step: O(log k)-competitive for fractional generalized caching.  Maintains fractions on pages. Second Step: Transform fractional solution into Randomized Alg.: Maintain distribution on cache states that is “consistent” with the fractional solution. Keep costs comparable We lose O(1) for Bit/Fault model, O(log k) for general model.

8/24 Rest of the Talk Online Primal Dual Method Formulation of Caching Problem Knapsack cover inequalities Final Algorithm

9/24 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)

10/24 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

11/24 General Covering Results Thm [Buchbinder-Naor 05]: O(log n) competitive fractional alg. (n – number of variables). –Can improve if more structure (e.g. O(log k) for caching, O(ln d) for d-sparse matrix) –Can add “box” constraints to covering LP (e.g. x · 1) –Tradeoff feasibility vs. competitive ratio –Allow variables to increase or decrease –More general forms than covering/packing

12/24 Online Primal Dual Approach Primal updated based on dual. Recall, any dual solution is a lower bound on optimum. At each step:  Primal · c (  Dual) (if primal and dual feasible) ! c competitive fractional algorithm Algorithm is always similar.

13/24 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 i /dy = a i x i /c i so, x varies as exp(y) =  Dual Cost

14/24 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. Complementary slackness : x > 0 only if dual constraint for x is tight. Set x=1/n when its dual constraint becomes tight.

15/24 Rest of the Talk Online Primal Dual Method Formulation of Caching Problem Knapsack cover inequalities Final Algorithm

16/24 Fractional covering LP At each time we have a profile of how much “fraction” of each page has been evicted.  i w i x i ¸ W - k (W = total size of all pages) Real variables: x(i,j) j-th request for page i Initially 0 when page requested, then increases as page evicted over time. If x(i,j) increases by , pay c(i) 

17/24 Large Integrality Gap Input: Two pages of size k/2+1 requested alternately. 1) Any solution must fault on every step. 2) But LP can hold 1-O(1/k) fraction of each page, incurring only O(1/k) cost at each step. Cannot hope to show o(k) guarantees.

18/24 Rest of the Talk Online Primal Dual Method Formulation of Caching Problem Knapsack cover inequalities Final Algorithm

19/24 Knapsack Cover Inequalities Knapsack Cover Problem: Knapsack of size D, n items with sizes w 1,w 2,…,w n and cost c 1,..,c n Goal: Choose min cost subset, that covers knapsack (i.e. total size ¸ D) LP: min c i x i s.t.  i w i x i ¸ D, x i = {0,1} 2 [0,1] Bad example: Only one item of size 1000 D. LP can just choose 1/1000 of this item. Simple fix: min c i x i s.t.  i min(w i, D) x i ¸ D

20/24 Still Bad Bad example: 2 items, s 1 = s 2 = D-1 c 1 =0, c 2 = L Any solution must choose item 2. (Integer cost = L) LP: sets x 1 =1 and x 2 = 1/(D-1) (LP cost = L/(D-1)) Consider a subset of jobs S. Even if choose all items in S, still need to cover at least D-W(S) size with remaining items. Thm: Factor 2 in general (Carr, Fleischer, Leung, Phillips’ 97) Exponential constraints, but poly time.

21/24 Consider the LP strengthened with Knapsack inequalites (exponentially many per time step) While there exist an unsatisfied primal constraint of set of pages S and time t: Increase the dual variable y(t,S). And update primal according to general recipe. Thm: Gives O(log k)-competitive fractional algorithm. Sketch of Primal-Dual algorithm

22/24 Fractional -> Randomized At each time t, LP gives a fractional state p = (p 1,…,p n ) Say p ! p’ at fractional cost =  Randomized alg: Distribution on cache states D -> D’ cost should be close to  Offline rounding (K.C. inequalities) + Online maintainability Easy: If lose O(log W) and O(log P) (reduce to uniform) We avoid for bit and fault model, but lose O(log k) for general model.

23/24 Concluding Remarks Primal-dual approach gives simple unifying framework for caching and many online problems. Strong relation to multiplicative updates technique Recently, used to obtain the first polylog(n,k) competitive algorithm for k-server problem on general metrics [B., Buchbinder, Naor, Madry 11]

24/24 Thank You!