Online Algorithms, Linear Programming, and the k-Server Problem

Slides:



Advertisements
Similar presentations
The Primal-Dual Method: Steiner Forest TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AA A A AA A A A AA A A.
Advertisements

A Primal-Dual Approach to Online Optimization Problems.
Primal Dual Combinatorial Algorithms Qihui Zhu May 11, 2009.
1 LP Duality Lecture 13: Feb Min-Max Theorems In bipartite graph, Maximum matching = Minimum Vertex Cover In every graph, Maximum Flow = Minimum.
Introduction to Algorithms
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)
Combinatorial Algorithms for Market Equilibria Vijay V. Vazirani.
Basic Feasible Solutions: Recap MS&E 211. WILL FOLLOW A CELEBRATED INTELLECTUAL TEACHING TRADITION.
Interchanging distance and capacity in probabilistic mappings Uriel Feige Weizmann Institute.
Approximation Some Network Design Problems With Node Costs Guy Kortsarz Rutgers University, Camden, NJ Joint work with Zeev Nutov The Open University,
A Randomized Polynomial-Time Simplex Algorithm for Linear Programming Daniel A. Spielman, Yale Joint work with Jonathan Kelner, M.I.T.
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.
Network Design Adam Meyerson Carnegie-Mellon University.
Approximation Algorithms
Online Oblivious Routing Nikhil Bansal, Avrim Blum, Shuchi Chawla & Adam Meyerson Carnegie Mellon University 6/7/2003.
Network Design with Concave Cost Functions Kamesh Munagala, Stanford University.
Primal-Dual Algorithms for Connected Facility Location Chaitanya SwamyAmit Kumar Cornell University.
Distributed Combinatorial Optimization
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.
Computational aspects of stability in weighted voting games Edith Elkind (NTU, Singapore) Based on joint work with Leslie Ann Goldberg, Paul W. Goldberg,
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.
Approximation Algorithms for Stochastic Combinatorial Optimization Part I: Multistage problems Anupam Gupta Carnegie Mellon University.
Primal-Dual Meets Local Search: Approximating MST’s with Non-uniform Degree Bounds Author: Jochen Könemann R. Ravi From CMU CS 3150 Presentation by Dan.
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.
A Primal-Dual Approach for Online Problems Nikhil Bansal.
Randomized Online Algorithm for Minimum Metric Bipartite Matching Adam Meyerson UCLA.
Linear Programming Data Structures and Algorithms A.G. Malamos References: Algorithms, 2006, S. Dasgupta, C. H. Papadimitriou, and U. V. Vazirani Introduction.
Primal-Dual Algorithms for Connected Facility Location Chaitanya SwamyAmit Kumar Cornell University.
Stochastic Multicast with Network Coding Ajay Gopinathan, Zongpeng Li Department of Computer Science University of Calgary ICDCS 2009, June , Montreal.
Models in I.E. Lectures Introduction to Optimization Models: Shortest Paths.
Linear Programming Erasmus Mobility Program (24Apr2012) Pollack Mihály Engineering Faculty (PMMK) University of Pécs João Miranda
Advanced Operations Research Models Instructor: Dr. A. Seifi Teaching Assistant: Golbarg Kazemi 1.
Algorithmic Game Theory and Internet Computing Vijay V. Vazirani Georgia Tech Primal-Dual Algorithms for Rational Convex Programs II: Dealing with Infeasibility.
2) Combinatorial Algorithms for Traditional Market Models Vijay V. Vazirani.
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.
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 報告人:羅正偉.
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.
CPSC 536N Sparse Approximations Winter 2013 Lecture 1 N. Harvey TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AAAAAAAAAA.
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.
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.
Instructor: Shengyu Zhang 1. Offline algorithms Almost all algorithms we encountered in this course assume that the entire input is given all at once.
TU/e Algorithms (2IL15) – Lecture 12 1 Linear Programming.
Approximation Algorithms Duality My T. UF.
1 Chapter 7 Network Flow Slides by Kevin Wayne. Copyright © 2005 Pearson-Addison Wesley. All rights reserved.
Linear Programming Piyush Kumar Welcome to CIS5930.
Approximation Algorithms based on linear programming.
The NP class. NP-completeness Lecture2. The NP-class The NP class is a class that contains all the problems that can be decided by a Non-Deterministic.
Tuesday, March 19 The Network Simplex Method for Solving the Minimum Cost Flow Problem Handouts: Lecture Notes Warning: there is a lot to the network.
Unconstrained Submodular Maximization Moran Feldman The Open University of Israel Based On Maximizing Non-monotone Submodular Functions. Uriel Feige, Vahab.
Lap Chi Lau we will only use slides 4 to 19
Topics in Algorithms Lap Chi Lau.
The minimum cost flow problem
Chap 9. General LP problems: Duality and Infeasibility
Online Algorithms via Projections set cover, paging, k-server
Presentation transcript:

Online Algorithms, Linear Programming, and the k-Server Problem Seffi Naor Computer Science Dept. Technion Barriers in Computational Complexity II Workshop 8/2010 Joint papers: Nikhil Bansal, Niv Buchbinder, Kamal Jain

Online Algorithms / Competitive Analysis Input I: given “in pieces” over time, each piece is called a “request” Upon arrival of a new request: Online algorithm has to serve the request Decisions for previous requests cannot be changed Competitive ratio: competes against best possible solution (in hindsight!) Deterministic: maxI Alg(I) / OPT(I) Randomized: maxI E[Alg(I)] / OPT(I)] (adversary can’t see actual random coins of algorithm) Can we do anything at all? Surprisingly, Yes!

Canonical Example: Caching / Paging CPU cache Browser cache web

The Paging/Caching Problem Universe of n pages, cache of size k<n. Request sequence of pages 1, 6, 4, 1, 4, 7, 6, 1, … If requested page is already in cache, no penalty. Otherwise, cache miss! Cache miss: fetch page into the cache, (possibly) evicting some other page Main Question: which page to evict? Goal: minimize number of cache misses

The Paging/Caching Problem What can be obtained deterministically? Best Algorithm: Evict the least recently used page (LRU) Theorem: LRU is k-competitive. (number of cache misses at most k times the optimal) Theorem: Any algorithm is at least k-competitive.

The Paging/Caching Problem Can randomization help? A lot! Theorem: There is an O(log k)-competitive randomized paging algorithm (marking algorithm, 1988) Any randomized algorithm is Ω(log k)-competitive

Outline The k-server Problem Linear Programming and Online Primal-Dual Approach New problems new techniques Back to k-server

The k-server Problem k servers (fire trucks) lie in an n-point metric space. Requests arrive at points. To serve request: move a server to request point. Goal: Minimize total distance traveled by servers. Example:

Paging/Caching Problem 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. Lower bounds: Deterministic: k Randomized: (log k) Barrier 1: Deterministic k-server conjecture: There is a k-competitive algorithm for any metric Randomized k-server conjecture: There is an O(log k)-competitive algorithm for any metric

25 years of deterministic history [Sleator, Tarjan 1985]: LRU k-competitive for paging, k/(k-h+1)-competitive compared to opt with cache size h. Any algorithm at least k-competitive, [Manasse McGeoch Sleator 1988]: Definition of k-server and the k-server conjecture. [Fiat,Rabani, Ravid 1990]: (k!)3 for general metrics (independent of metric size) [Chrobak, Karloff, Payne, Vishwanathan 1990]: k-competitive for line. [Chrobak Larmore 1991]: k-competitive algorithm for trees [Koutsoupias, Papadimitriou 1994]: (2k-1)-competitive algorithm for any metric. [Young 1994]: k and k/(k-h+1)-competitive algorithm for weighted paging using duality!

25 years of randomized history [Fiat, Karp, Luby, McGoch, Sleator, Young 1988]: O(log k)-competitive algorithm for paging. Any algorithm at least Ω(log k)-competitive. [Bartal, Blum, Burch, Tomkin 1997], [Fiat, Mendel 2000]: O(poly log k)-competitive algorithm for metric with k+c points. [Seiden 2001]: O(poly log k)-competitive algorithm for some well separated spaces. [Casba Lodha 2006]: O(n2/3)-competitive algorithm for the equally spaced line. [Bansal, Buchbinder, Naor 2007]: O(log k)-competitive algorithm for weighted paging. [Cote, Meyerson, Poplawski 2008]: O(log Δ)-competitive algorithm on binary HST with stretch Ω(log Δ)

Outline The k-server Problem Linear Programming and Online Primal-Dual Approach New problems new techniques Back to k-server

Linear Programming Linear constraints, linear objective Min x1 – 3 x2 + 2 x3 x1 – x2 + 7 x3 ≤ 2 x2 - x3 ≥ 0 x1 + 3 x2 + x3 ≥ -3 polynomial time solvable lies at the heart of optimization

Covering/Packing Problems Primal solutions Dual solutions P* = D* P: Primal Covering D: Dual Packing covering/packing framework captures many problems: matching, flows, cuts, connectivity problems … ci, aij, bj and the variables xi are all non-negative. Every covering LP has a dual packing LP: Primal constraint  dual variable Primal variable  dual constraint Dual solutions – lower bound on primal solutions.

Covering Packing Problems Primal solutions P: Primal Covering D: Dual Packing P* = D* Dual solutions Generic (offline) primal-dual algorithm: Start: x=0, y=0 (primal infeasible, dual feasible) Increase dual and primal together: ΔD=1, ΔP≤c End: Primal/Dual are feasible  P ≤cD ≤cP*  c-approximate solution

Covering Packing Problems Primal solutions P: Primal Covering D: Dual Packing P* = D* Dual solutions Primal-dual algorithms: Huge success for designing offline algorithms. Many approximate/exact algorithms are actually primal-dual: shortest path, matching, flows, cuts …

An Abstract Online Problem P: Primal Covering D: Dual Packing Primal: constraints arrive one by one. Primal Goal: Find feasible solution x* with min cost. Requirements: Upon arrival constraint must be satisfied Cannot decrease variables (online nature)

An Abstract Online Problem P: Primal Covering D: Dual Packing Dual: columns arrive one by one (new variables). Dual Goal: find feasible solution y* with max profit Requirements: new variable is set only upon arrival (online nature)

Example 1: Lower Bound min x1 + x2 + … + xn x1 + x2 + x3 + … + xn ¸ 1 Online ¸ ln n (1+1/2+ 1/3+ … + 1/n) Opt = 1 ( xn=1 suffices) Set all xi to 1/n Increase x2 ,x3,…,xn to 1/n-1 … Increase xn to 1

Example 2: Ski Rental 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 Subject to: For each day i:

Example 3: 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. Goal: Maximize the total throughput.

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

General Covering/Packing Results {0,1} covering/packing matrix: [Buchbinder-N 05] Competitive ratio O(log D) (D: max number of non-zero entries in a constraint). Remarks: Fractional solutions  randomized algorithm (online rounding). Number of constraints/variables can be exponential. Possible tradeoff: competitive ratio/violation of constraints.

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)

Key Idea for Online Primal-Dual Primal: Min i ci xi Dual Step t, new constraint: New variable yt a1x1 + a2x2 + … + ajxj ≥ bt + bt yt in dual objective How much:  xi ? yt  yt + 1 (additive update)  primal cost = =  Dual Cost dx/dy proportional to x … so, x varies as exp(y)

Discrete vs. Continuous Discrete version: multiplicative update Continuous version: exponential function as long as c is not too small. (c ≥1) Description of discrete algorithm is usually simpler Analysis of continuous algorithm is usually simpler

Advantages Unified framework: generic ideas and algorithms applicable to many online problems: Ski rental, Dynamic TCP-Acknowledgement, Parking Permit Problem, Online Routing/Load Balancing Problems, Online Matching, Adwords Problem, Online Set Cover, Online Graph Covering Problems, Paging … Linear Program helps detecting the difficulties of the online problem. General recipe for the design and analysis of online algorithms. No potential function appearing “out of nowhere”. Competitiveness with respect to a fractional optimal solution.

Fractional Weighted Paging Model: Fractions of pages are kept in cache: probability distribution over pages p1,…,pn The total sum of fractions of pages in the cache is at most k. If pi changes by , cost =  w(i) k units of cache

Overview High level idea: Design a primal-dual O(log k)-competitive algorithm for fractional weighted paging. Obtain a randomized algorithm while losing only a constant factor.

Setting up the Linear Program time line Page i Page j Page i Page j Page pt B(t): Set of pages requested until time t (including pt) We can only keep k pages out of the B(t) pages Evict ≥ [|B(t)| - 1 - (k- 1)] = [|B(t)|-k] pages from B(t)\{pt}

Weighted Paging – Linear Program Idea: charge for evicting pages instead of fetching pages x(i,j) – indicator for the event that page i is evicted from the cache between the j-th and (j+1)-st times it is requested r(i,t) - number of times page i is requested till time t, including t

Primal and Dual Programs P: Primal Covering D: Dual Packing For each page i and the j th time it was asked:

Fractional Caching Algorithm New primal constraint: Dual variable y(t) & constraint:

Fractional Caching Algorithm New primal constraint: Dual variable y(t) & constraint: While primal constraint infeasible: Increase y(t) When dual constraint tight, x(i,j) = 1/k From then on, increase exponentially (until x(i,j)=1)

The growth function of x(i,j) 1 1/k Corresponding Dual constraint Dual violated by O(log k) Dual is tight Page fully in memory (marked) Page fully evicted Page is “unmarked”

Analysis of Online Algorithm Proof of competitive factor: Primal solution is feasible. Primal ≤ 2 Dual. Dual is feasible up to O(log k) factor Conclusion (weak duality): Algorithm is O(log k)-competitive

Barrier 2 Extend the online primal-dual framework beyond covering/packing linear programs Design new update rules for setting the primal and dual variables

Commercial break The Design of Competitive Online Algorithms More about this approach: The Design of Competitive Online Algorithms via a Primal-Dual Approach By Niv Buchbinder and Seffi Naor Foundations and Trends® in Theoretical Computer Science

Outline The k-server Problem Linear Programming and Online Primal-Dual Approach New problems new techniques Back to k-server

Back to Barrier 1 Are these techniques strong enough to resolve the randomized k-server conjecture? Answer: maybe … but we don’t know how. certainly looks like the right direction. Main Difficulty: k-server is an online version of min cost flow. The solution of more general LP-s may be needed (Barrier 2 …)

Revisiting the C/P Framework Positive objective function. New covering constraints arrive one-by-one. Feasible region is not known in advance (gradually exposed as more covering constraints appear). When out of feasible region - should move back inside and pay movement cost. Cost of “infinity” for staying outside the feasible region.

Metrical Task System (uniform) Feasible region: distribution yt on n points (simplex) Each round: cost vector ct defines the cost at every point Algorithm: changes the distribution: yt-1  yt Payments: Service cost: ct yt (cost of serving at a point) Movement cost: earthmover distance metric between distributions

Metrical Task System (MTS) [BBN10]: A new algorithm for MTS that for any 0<ɛ<1: Pays service cost at most (1+ɛ)OPT Pays movement cost at most log(n/ɛ)OPT Known using learning algorithms [BBBT97] Leads to best known algorithm for general metrics [FM00]. Very intuitive primal-dual algorithm MTS is formulated by a non-covering LP:

Learning from Expert Advice Problem: N experts trying to predict “rain/sun” in each day Should I take an umbrella or sunglasses? Goal: predict (almost) as good as the best expert called minimum regret

Learning from Expert Advice Feasible region: distribution yt on n points (simplex) Each round: cost vector ct defines cost in every point (right/wrong) Algorithm: Changes the distribution: yt-1  yt Payments: Service cost: ct yt-1 (cost of staying in a point) Movement cost: free [BBN10]: primal-dual algorithm: same guarantees on the regret as weighted majority

Paging Feasible region: “distribution of k-mass” on n points Each round: mass on current request should be 1 Algorithm: Changes the distribution: yt-1  yt Payments: Service cost: free Movement cost: earthmover distance metric between distributions [BBN10]: LP formulation more involved … algorithm and analysis: very simple.

Outline The k-server Problem Linear Programming and Online Primal-Dual Approach New problems new techniques Back to k-server

Coping with the k-Server Problem The allocation Problem [Cote, Meyerson, Poplawski 08]: N (=5) possible locations for projects (uniform metric) k (=8) workers Projects arrive online (total) Service Cost | Move cost 1 3 k-ary Vector: How much does it cost to run/service the project with any number of workers. Vectors are always monotonically decreasing. 3 4 3≥1≥1 ≥1v≥0… 6 4 10≥4≥2 ≥1 ≥0… … 2≥2≥1≥0≥0…

Hierarchically Separated Trees (HSTs) α2 α 1 HSTs: requests and servers reside in the leaves c-competitive algorithm on an α-HST O(cα log n)-competitive algorithm for general metrics

Allocation Problem & k-Server [CMP08] Theorem: An algorithm for the allocation problem that: pays at most (1+ɛ)OPT service cost. pays at most O(log(k/ɛ))OPT movement cost.  Õ(log2D logn log2k)-competitive algorithm for k-server for any metric (Õ – additional loglog factors) Main idea: applying recursively the allocation problem to the nodes of an HST Remark: Important to have good bounds with respect to the service cost D: Diameter of the metric n: number of points in the metric k: number of servers

What is Known? Not a lot … [CMP08]: 1-service 1-movement on (only) 2 nodes. O(log D)-competitive algorithm on binary HST with stretch Ω(log D) (D – diameter of the metric) Ideas seem to be tailored to the binary case and not extend beyond that a line can be embedded into a binary HST, however allocation needs α=Ω(log D).

More known results (1+ɛ)-service + O(log(k/ɛ))-movement for general allocation problem … but with convexity (concavity) assumption [BBN10] Each project vector Marginal utility of each additional worker is decreasing Service Cost 1 2 3 4 5 6 7 Num. of workers

Relation to k-Server Is solving the convex version of the problem enough? Not clear … Instances used in the proof of the theorem do not have this property Maybe in some aggregate sense? Considering several steps together?

(Configurations of the k workers + embedding) What’s Next? Option 1: “fix” the application to the k-server problem via the convex allocation problem Option 2: solve original allocation problem (Barrier 3) Considering option 2: Allocation Problem on d points  MTS problem on HST with n= kd nodes. (Configurations of the k workers + embedding) 2. A new one shot MTS algorithm for HSTs that is (1+ɛ, min{l log (n/ɛ), log2(n/ɛ)})-competitive [BBN, ICALP 10] (l – height of the HST)

What Do We Get for k-Server? An (1+ɛ, d log2n log n/ɛ)-competitive algorithm for the allocation problem on d points (without the convexity assumption)  Randomized algorithm for the k-server problem on certain well separated/low degree/low height HSTs A randomized O(exp(√ln n lnln k))-competitive algorithm for an n-point line (improving on the previous O(n2/3) competitive ratio)

Barrier 3 Can a primal-dual approach be applied directly to the k-server problem on HSTs (huge breakthrough)? Even to a 2-level HST? Recall that paging corresponds to a “single level HST”

Where Do We Go From Here? Primal-dual method: powerful method for offline problems. seems useful for online problems as well Main questions: Extending the online primal-dual framework beyond covering/packing linear programs – how far can we push it? (problematic even in the offline setting) Randomized/deterministic k-server conjectures

Thank you