Competitive Paging Algorithms Amos Fiat, Richard Karp, Michael Luby, Lyle McGeoch, Daniel Sleator, Neal Young presented by Seth Phillips.

Slides:



Advertisements
Similar presentations
Online Algorithm Huaping Wang Apr.21
Advertisements

Online Algorithms Advanced Seminar A Supervisor: Matya Katz Ran Taig, Achiya Elyasaf December, 2009.
Gibbs sampler - simple properties It’s not hard to show that this MC chain is aperiodic. Often is reversible distribution. If in addition the chain is.
A Separator Theorem for Graphs with an Excluded Minor and its Applications Paul Seymour Noga Alon Robin Thomas Lecturer : Daniel Motil.
Online Algorithms Amrinder Arora Permalink:
Princeton University COS 423 Theory of Algorithms Spring 2001 Kevin Wayne Competitive Analysis.
Complexity ©D Moshkovitz 1 Approximation Algorithms Is Close Enough Good Enough?
Dynamic Wavelength Allocation in All-optical Ring Networks Ori Gerstel and Shay Kutten Proceedings of ICC'97.
2007/3/6 1 Online Chasing Problems for Regular n-gons Hiroshi Fujiwara* Kazuo Iwama Kouki Yonezawa.
1 Competitive analysis of the LRFU paging algorithm Edith Cohen -- AT&T Haim Kaplan -- Tel Aviv Univ. Uri Zwick -- Tel Aviv Univ.
Every H-decomposition of K n has a nearly resolvable alternative Wilson: e(H) | n(n-1)/2 and gcd(H) | n-1 n>> then there exists an H-decomposition of K.
The number of edge-disjoint transitive triples in a tournament.
Fast FAST By Noga Alon, Daniel Lokshtanov And Saket Saurabh Presentation by Gil Einziger.
1 List Coloring and Euclidean Ramsey Theory TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: A A A A Noga Alon, Tel Aviv.
Online Algorithms – II Amrinder Arora Permalink:
A Linear Round Lower Bound for Lovasz-Schrijver SDP relaxations of Vertex Cover Grant Schoenebeck Luca Trevisan Madhur Tulsiani UC Berkeley.
Online Algorithms Lecture notes for lectures given by Dr. Ely Porat, Bar-Ilan University Notes taken by: Navot Akiva Yair Kaufman Raz Lin Ohad Lipsky July.
Randomized Algorithms and Randomized Rounding Lecture 21: April 13 G n 2 leaves
Institute of Computer Science University of Wroclaw Page Migration in Dynamic Networks Marcin Bieńkowski Joint work with: Jarek Byrka (Centrum voor Wiskunde.
Online Algorithms Motivation and Definitions Paging Problem Competitive Analysis Online Load Balancing.
Shortest Path Problems Directed weighted graph. Path length is sum of weights of edges on path. The vertex at which the path begins is the source vertex.
Lower Bounds for the Ropelength of Reduced Knot Diagrams by: Robert McGuigan.
The k-server Problem Study Group: Randomized Algorithm Presented by Ray Lam August 16, 2003.
Randomized Competitive Analysis for Two Server Problems Wolfgang Bein Kazuo Iwama Jun Kawahara.
1 Separator Theorems for Planar Graphs Presented by Shira Zucker.
Quantum Algorithms II Andrew C. Yao Tsinghua University & Chinese U. of Hong Kong.
Online Algorithms Lecture notes for lectures given by Dr. Ely Porat, Bar-Ilan University Notes taken by: Navot Akiva Yair Kaufman Raz Lin Ohad Lipsky July.
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/24 Algorithms for Generalized Caching Nikhil Bansal IBM Research Niv Buchbinder Open Univ. Israel Seffi Naor Technion.
Ch. 8 & 9 – Linear Sorting and Order Statistics What do you trade for speed?
The Theory of NP-Completeness 1. Nondeterministic algorithms A nondeterminstic algorithm consists of phase 1: guessing phase 2: checking If the checking.
Approximation Algorithms for Stochastic Combinatorial Optimization Part I: Multistage problems Anupam Gupta Carnegie Mellon University.
The Theory of NP-Completeness 1. What is NP-completeness? Consider the circuit satisfiability problem Difficult to answer the decision problem in polynomial.
International Graduate School of Dynamic Intelligent Systems, University of Paderborn Improved Algorithms for Dynamic Page Migration Marcin Bieńkowski.
Competitive On-Line Admission Control and Routing By: Gabi Kliot Presentation version.
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.
Edge-disjoint induced subgraphs with given minimum degree Raphael Yuster 2012.
Expanders via Random Spanning Trees R 許榮財 R 黃佳婷 R 黃怡嘉.
Online Algorithms. Introduction An offline algorithm has a full information in advance so it can compute the optimal strategy to maximize its profit (minimize.
Minimizing Cache Usage in Paging Alejandro López-Ortiz, Alejandro Salinger University of Waterloo.
CSE 5314 On-line Computation Homework 1 Wook Choi Feb/26/2004.
CSE 589 Part VI. Reading Skiena, Sections 5.5 and 6.8 CLR, chapter 37.
CAS 721 Course Project Implementing Branch and Bound, and Tabu search for combinatorial computing problem By Ho Fai Ko ( )
The length of vertex pursuit games Anthony Bonato Ryerson University CCC 2013.
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 報告人:羅正偉.
© The McGraw-Hill Companies, Inc., Chapter 12 On-Line Algorithms.
Unique Games Approximation Amit Weinstein Complexity Seminar, Fall 2006 Based on: “Near Optimal Algorithms for Unique Games" by M. Charikar, K. Makarychev,
Introduction to the k-Server Problem Marcel Birkner.
Non-Preemptive Buffer Management for Latency Sensitive Packets Moran Feldman Technion Seffi Naor Technion.
International Graduate School of Dynamic Intelligent Systems, University of Paderborn Fighting Against Two Adversaries: Page Migration in Dynamic Networks.
Matroids, Secretary Problems, and Online Mechanisms Nicole Immorlica, Microsoft Research Joint work with Robert Kleinberg and Moshe Babaioff.
1 Covering Non-uniform Hypergraphs Endre Boros Yair Caro Zoltán Füredi Raphael Yuster.
1 Fault-Tolerant Consensus. 2 Communication Model Complete graph Synchronous, network.
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.
1 Distributed Vertex Coloring. 2 Vertex Coloring: each vertex is assigned a color.
The Theory of NP-Completeness 1. Nondeterministic algorithms A nondeterminstic algorithm consists of phase 1: guessing phase 2: checking If the checking.
TU/e Algorithms (2IL15) – Lecture 12 1 Linear Programming.
Instructor: Dr. GautamDas February 24, 2009 Class notes by Ranganath M R.
CSE 5314 – Spring 2004 Homework #1 - Solutions [Soumya Sanyal] Q 1.5: Prove that the algorithm “MTF every-other-access” (i.e. move the item to the front.
Clustering Data Streams A presentation by George Toderici.
Trees.
The Theory of NP-Completeness
Streaming & sampling.
Exercise Exercise Proof that
Enumerating Distances Using Spanners of Bounded Degree
The Theory of NP-Completeness
Presentation transcript:

Competitive Paging Algorithms Amos Fiat, Richard Karp, Michael Luby, Lyle McGeoch, Daniel Sleator, Neal Young presented by Seth Phillips

Overview Introduction Introduction Server Problems Server Problems Marking Algorithm Marking Algorithm EATR EATR Lower Bound Lower Bound Competitive Against Other Algorithms Competitive Against Other Algorithms

Introduction – Paging Problem System with k pages of fast memory (cache/RAM) System with k pages of fast memory (cache/RAM) Has n-k pages of slow memory (RAM/virtual) Has n-k pages of slow memory (RAM/virtual) Requesting a page not in fast memory Requesting a page not in fast memory Eject a page to make room (page fault) Eject a page to make room (page fault)

Online paging algorithm Decision made without knowledge of future requests Decision made without knowledge of future requests Performance analyzed against off-line algorithm – complete knowledge Performance analyzed against off-line algorithm – complete knowledge Deterministic algorithms are k-competitive Deterministic algorithms are k-competitive

Randomized Algorithms Analyzed as a sum cost of the algorithm Analyzed as a sum cost of the algorithm Cost on a sequence of input averaged over all the random choices that the algorithm makes while processing the sequence Cost on a sequence of input averaged over all the random choices that the algorithm makes while processing the sequence

Overview Introduction Introduction Server Problems Server Problems Marking Algorithm Marking Algorithm EATR EATR Lower Bound Lower Bound Competitive Against Other Algorithms Competitive Against Other Algorithms

K-server Problem Let G be an n-vertex graph with positive edge lengths obeying the triangle inequality Let G be an n-vertex graph with positive edge lengths obeying the triangle inequality Let k mobile servers occupy vertices of G Let k mobile servers occupy vertices of G Given a sequence of requests, each of which specifies a vertex, decide how to move the servers in response to each request Given a sequence of requests, each of which specifies a vertex, decide how to move the servers in response to each request

K-server continued Requests must be satisfied in order of their occurrence in the sequence Requests must be satisfied in order of their occurrence in the sequence Cost of handling a sequence is equal to the total distance moved by the servers Cost of handling a sequence is equal to the total distance moved by the servers It is conjectured that there exists a k-competitive k-server algorithm for any graph It is conjectured that there exists a k-competitive k-server algorithm for any graph

Uniform k-server problem Cost of moving a server from any vertex to any other vertex is 1 Cost of moving a server from any vertex to any other vertex is 1 Isomorphic to the paging problem: any vertex with a server is in fast memory and the vertices of the graph represent the address space Isomorphic to the paging problem: any vertex with a server is in fast memory and the vertices of the graph represent the address space

Overview Introduction Introduction Server Problems Server Problems Marking Algorithm Marking Algorithm EATR EATR Lower Bound Lower Bound Competitive Against Other Algorithms Competitive Against Other Algorithms

Marking Algorithm Randomized algorithm for uniform k-server problem on graph with n vertices Randomized algorithm for uniform k-server problem on graph with n vertices Servers are initially on vertices 1 through k Servers are initially on vertices 1 through k Algorithm maintains a set of marked vertices Algorithm maintains a set of marked vertices Initially these are the vertices covered by the servers Initially these are the vertices covered by the servers

Marking Each time a vertex is requested, it is marked Each time a vertex is requested, it is marked If k+1 vertices are marked, all marks except the most recently requested vertex are erased If k+1 vertices are marked, all marks except the most recently requested vertex are erased

Serving If vertex is covered, then no servers move If vertex is covered, then no servers move If vertex is not covered, then a server is chosen uniformly at random from the unmarked vertices If vertex is not covered, then a server is chosen uniformly at random from the unmarked vertices That server is moved to cover That server is moved to cover

Competitiveness 2*H_k competitive (H_k on the order of ln(k)) 2*H_k competitive (H_k on the order of ln(k)) Algorithm implicitly divides request sequence into phases. Algorithm implicitly divides request sequence into phases. First phase begins with r(i), where I is the smallest integer such that r(i) is not in the set {1 through k}. First phase begins with r(i), where I is the smallest integer such that r(i) is not in the set {1 through k}.

Comp. continued In general the phase starting with r(i) ends with r(j) In general the phase starting with r(i) ends with r(j) j is the smallest integer such that the set {r(i), r(i+1),..., r(j+1)} has cardinality k+1 j is the smallest integer such that the set {r(i), r(i+1),..., r(j+1)} has cardinality k+1

Comp. continued Implicitly the first request of every phase is made to an unmarked vertex Implicitly the first request of every phase is made to an unmarked vertex A vertex is clean if it was not requested in the previous phase and has not yet been requested in this phase – we’ll say there are l of these A vertex is clean if it was not requested in the previous phase and has not yet been requested in this phase – we’ll say there are l of these A vertex is stale if it was requested in the previous phase and has not yet been requested in this phase A vertex is stale if it was requested in the previous phase and has not yet been requested in this phase

Adversary Amortized Cost At least l/2 because: At least l/2 because: Let d be the number of servers that do not coincide with marking’s at the beginning of the phase Let d be the number of servers that do not coincide with marking’s at the beginning of the phase Let d’ be this quantity at the end of the phase Let d’ be this quantity at the end of the phase Cost(A) >= l – d because l requests have to be met, mitigated by a possible d different server locations Cost(A) >= l – d because l requests have to be met, mitigated by a possible d different server locations

Adversary Cost Continued C(Adv) >= d’ because: C(Adv) >= d’ because: The vertices of S are those covered by Marking at the end of the phase, so d’ servers are not in S The vertices of S are those covered by Marking at the end of the phase, so d’ servers are not in S Since Adversary is lazy (does not unnecessarily move servers) at least d’ of A’s servers were outside of S for the entire phase Since Adversary is lazy (does not unnecessarily move servers) at least d’ of A’s servers were outside of S for the entire phase

Adversary Cost Continued C(Adv) >= max(l – d, d’) >= ½(l – d + d’) C(Adv) >= max(l – d, d’) >= ½(l – d + d’) D and d’ naturally telescope so simply C(Adv) >= l/2 D and d’ naturally telescope so simply C(Adv) >= l/2

Marking Expected Cost l requests to clean vertices – each costs 1 l requests to clean vertices – each costs 1 k – l requests to stale vertices – each based on the probability that there is no server there k – l requests to stale vertices – each based on the probability that there is no server there Highest cost is when the l requests to clean vertices come first (allows the most stale vertices to be reassigned) Highest cost is when the l requests to clean vertices come first (allows the most stale vertices to be reassigned) That leaves the cost of the k-l stales to be: That leaves the cost of the k-l stales to be: l/k + l/(k-1) + l/(k-2) l/(l+1) = l*(H_k – H_l) l/k + l/(k-1) + l/(k-2) l/(l+1) = l*(H_k – H_l)

Final Cost Competitiveness l*H_k – l*H_l + l <= l*H_k l*H_k – l*H_l + l <= l*H_k Since the cost of the adversary is l/2: Since the cost of the adversary is l/2: The Marking algorithm is 2*H_k competitive The Marking algorithm is 2*H_k competitive For the n-1 server problem it is H_n-1 competitive, but for time constraints I’ll skip this For the n-1 server problem it is H_n-1 competitive, but for time constraints I’ll skip this

Overview Introduction Introduction Server Problems Server Problems Marking Algorithm Marking Algorithm EATR EATR Lower Bound Lower Bound Competitive Against Other Algorithms Competitive Against Other Algorithms

EATR Stands for End After Twice Requested Stands for End After Twice Requested This is an algorithm specific to the uniform 2- server problem This is an algorithm specific to the uniform 2- server problem Servers initially on vertices Servers initially on vertices Stale redefined to not clean and not the most recently requested vertex Stale redefined to not clean and not the most recently requested vertex When a stale vertex is requested, the servers are placed on the two most recently requested vertices When a stale vertex is requested, the servers are placed on the two most recently requested vertices

EATR Analysis Let l be the number of clean vertices requested during a phase Let l be the number of clean vertices requested during a phase The number of stale vertices before the request that terminates the phase is l+1 The number of stale vertices before the request that terminates the phase is l+1 The probably of a server on each of these is 1/(l+1) The probably of a server on each of these is 1/(l+1) The expected cost of each phase is l + l/(l+1) The expected cost of each phase is l + l/(l+1)

Adversary Analysis The best possible cost incurred by any algorith for each phase is at least l The best possible cost incurred by any algorith for each phase is at least l The competitive factor is therefore: (l + l/(l+1))/l = 1 + 1/(l+1) <= 3/2 The competitive factor is therefore: (l + l/(l+1))/l = 1 + 1/(l+1) <= 3/2

Overview Introduction Introduction Server Problems Server Problems Marking Algorithm Marking Algorithm EATR EATR Lower Bound Lower Bound Competitive Against Other Algorithms Competitive Against Other Algorithms

Lower Bound There is no c-competitive randomized algorithm for the uniform (n-1) server problem on n vertices with c < H_n-1 There is no c-competitive randomized algorithm for the uniform (n-1) server problem on n vertices with c < H_n-1 (Time constraints) The article proves this, which also makes the marking algorithm in a class of best possible algorithms for this problem (Time constraints) The article proves this, which also makes the marking algorithm in a class of best possible algorithms for this problem

Overview Introduction Introduction Server Problems Server Problems Marking Algorithm Marking Algorithm EATR EATR Lower Bound Lower Bound Competitive Against Other Algorithms Competitive Against Other Algorithms

Algorithms Competitive Against Several Others Adopt a viewpoint where each algorithm is tailored for a specific choice of k and n. Adopt a viewpoint where each algorithm is tailored for a specific choice of k and n. The ordered pair (k, n) is called the type of algorithm The ordered pair (k, n) is called the type of algorithm Let A be adeterministic and B be a deterministic on-line algorithms of the same type and c be a positive constant Let A be adeterministic and B be a deterministic on-line algorithms of the same type and c be a positive constant If for every sequence r of requests C_A(r) <= c*C_B(r) + alpha then A is c-competitive with B If for every sequence r of requests C_A(r) <= c*C_B(r) + alpha then A is c-competitive with B

ACASO continued Let c* = (c(1), c(2),... C(m)) be a sequence of postive real numbers Let c* = (c(1), c(2),... C(m)) be a sequence of postive real numbers c* is realizable if, for every (k,n) and every sequence B(1), B(2)...B(m) there exists an algorithm A of type (k,n) such then A is c(i) competitive with B(i) c* is realizable if, for every (k,n) and every sequence B(1), B(2)...B(m) there exists an algorithm A of type (k,n) such then A is c(i) competitive with B(i) c* realizable iff: Sum from 1 to m of (1/c(i)) <= 1 c* realizable iff: Sum from 1 to m of (1/c(i)) <= 1