The k-server problem 17.Januar 2008

Vergelijkbare documenten
Bin packing and scheduling

ALGORITMIEK: answers exercise class 7

FOR DUTCH STUDENTS! ENGLISH VERSION NEXT PAGE. Toets Inleiding Kansrekening 1 8 februari 2010

Add the standing fingers to get the tens and multiply the closed fingers to get the units.

FOR DUTCH STUDENTS! ENGLISH VERSION NEXT PAGE

FOR DUTCH STUDENTS! ENGLISH VERSION NEXT PAGE

SAMPLE 11 = + 11 = + + Exploring Combinations of Ten + + = = + + = + = = + = = 11. Step Up. Step Ahead

Esther Lee-Varisco Matt Zhang

FOR DUTCH STUDENTS! ENGLISH VERSION NEXT PAGE

Quality requirements concerning the packaging of oak lumber of Houthandel Wijers vof ( )

Preschool Kindergarten

Opgave 2 Geef een korte uitleg van elk van de volgende concepten: De Yield-to-Maturity of a coupon bond.

MyDHL+ Van Non-Corporate naar Corporate

General info on using shopping carts with Ingenico epayments

Travel Survey Questionnaires

Introductie in flowcharts

After that, the digits are written after each other: first the row numbers, followed by the column numbers.

L.Net s88sd16-n aansluitingen en programmering.

Group work to study a new subject.

Eye Feature Detection Towards Automatic Strabismus Screening

(1) De hoofdfunctie van ons gezelschap is het aanbieden van onderwijs. (2) Ons gezelschap is er om kunsteducatie te verbeteren

Meetkunde en Lineaire Algebra

ANGSTSTOORNISSEN EN HYPOCHONDRIE: DIAGNOSTIEK EN BEHANDELING (DUTCH EDITION) FROM BOHN STAFLEU VAN LOGHUM

FOR DUTCH STUDENTS! ENGLISH VERSION NEXT PAGE. Toets Inleiding Kansrekening 1 7 februari 2011

Classification of triangles

The first line of the input contains an integer $t \in \mathbb{n}$. This is followed by $t$ lines of text. This text consists of:

B1 Woordkennis: Spelling

Algorithms for Max-Flow

Global TV Canada s Pulse 2011

Four-card problem. Input

01/ M-Way. cables

Handleiding Zuludesk Parent

Settings for the C100BRS4 MAC Address Spoofing with cable Internet.

Activant Prophet 21. Prophet 21 Version 12.0 Upgrade Information

Concept of Feedback. P.S. Gandhi Mechanical Engineering IIT Bombay

Notitie : In de grond gevormde palen met grondverwijdering

Meetkunde en Lineaire Algebra

DALISOFT. 33. Configuring DALI ballasts with the TDS20620V2 DALI Tool. Connect the TDS20620V2. Start DALISOFT

Calculator spelling. Assignment

FOR DUTCH STUDENTS! ENGLISH VERSION NEXT PAGE. Toets Inleiding Kansrekening 1 22 februari 2013

8+ 60 MIN Alleen te spelen in combinatie met het RIFUGIO basisspel. Only to be played in combination with the RIFUGIO basicgame.

Intermax backup exclusion files

2019 SUNEXCHANGE USER GUIDE LAST UPDATED

Luister alsjeblieft naar een opname als je de vragen beantwoordt of speel de stukken zelf!

L.Net s88sd16-n aansluitingen en programmering.

04/11/2013. Sluitersnelheid: 1/50 sec = 0.02 sec. Frameduur= 2 x sluitersnelheid= 2/50 = 1/25 = 0.04 sec. Framerate= 1/0.

RECEPTEERKUNDE: PRODUCTZORG EN BEREIDING VAN GENEESMIDDELEN (DUTCH EDITION) FROM BOHN STAFLEU VAN LOGHUM

MyDHL+ ProView activeren in MyDHL+

LDA Topic Modeling. Informa5ekunde als hulpwetenschap. 9 maart 2015

Handleiding Installatie ADS

Procedure Reset tv-toestellen:

Ontpopping. ORGACOM Thuis in het Museum

TOEGANG VOOR NL / ENTRANCE FOR DUTCH : lator=c&camp=24759

!!!! Wild!Peacock!Omslagdoek!! Vertaling!door!Eerlijke!Wol.!! Het!garen!voor!dit!patroon!is!te!verkrijgen!op! Benodigdheden:!!

Function checklist for the ML-350 or XL-350 with a print set. Missing loop.

De Branch-and-Bound methode

Het is geen open boek tentamen. Wel mag gebruik gemaakt worden van een A4- tje met eigen aantekeningen.

Linear Algebra I. Ronald van Luijk, 2011

Uitwerking van opgaven in Sipser

Firewall van de Speedtouch 789wl volledig uitschakelen?

FRAME [UPRIGHT MODEL] / [DEPTH] / [HEIGHT] / [FINISH] TYPE OF BASEPLATE P Base plate BP80 / E alternatives: ZINC finish in all cases

How to install and use dictionaries on the ICARUS Illumina HD (E652BK)

I.S.T.C. Intelligent Saving Temperature Controler

1a. We werken het geval voor het tandenpoetsen uit. De concepten zijn (we gebruiken Engelse termen en afkortingen):

Bijlage 2: Informatie met betrekking tot goede praktijkvoorbeelden in Londen, het Verenigd Koninkrijk en Queensland

AE1103 Statics. 25 January h h. Answer sheets. Last name and initials:

It s all about the money Group work

Find Neighbor Polygons in a Layer

Tentamen Objectgeorienteerd Programmeren

Tentamen T1 Chemische Analysemethoden 6 maart 2014

Engels op Niveau A2 Workshops Woordkennis 1

S e v e n P h o t o s f o r O A S E. K r i j n d e K o n i n g

Online Resource 1. Title: Implementing the flipped classroom: An exploration of study behaviour and student performance

Het Effect van Verschil in Sociale Invloed van Ouders en Vrienden op het Alcoholgebruik van Adolescenten.

My Inspiration I got my inspiration from a lamp that I already had made 2 years ago. The lamp is the you can see on the right.

LONDEN MET 21 GEVARIEERDE STADSWANDELINGEN 480 PAGINAS WAARDEVOLE INFORMATIE RUIM 300 FOTOS KAARTEN EN PLATTEGRONDEN

OUTDOOR HD BULLET IP CAMERA PRODUCT MANUAL

Lists of words from the books, and feedback from the sessions, are on

De grondbeginselen der Nederlandsche spelling / Regeling der spelling voor het woordenboek der Nederlandsche taal (Dutch Edition)

Meetkunde en Lineaire Algebra

ETS 4.1 Beveiliging & ETS app concept

Cambridge Assessment International Education Cambridge International General Certificate of Secondary Education. Published

Exercise P672 Lightweight Structures. A.P.H.W. Habraken. Report

2000 Volkswagen Passat GLS

Het beheren van mijn Tungsten Network Portal account NL 1 Manage my Tungsten Network Portal account EN 14

i(i + 1) = xy + y = x + 1, y(1) = 2.

Screen Design. Deliverable 3 - Visual Design. Pepijn Gieles Docent: Jasper Schelling

Transcriptie:

Sanders/van Stee: Approximations- und Online-Algorithmen 1 The k-server problem 17.Januar 2008 Problem definition Examples An offline algorithm A lower bound and the k-server conjecture Several online algorithms

Sanders/van Stee: Approximations- und Online-Algorithmen 2 Problem definition k > 1 servers M is a metric space with metric d Servers are located at points of M Request sequence σ consists of points of M A request is served by moving a server there Cost is total distance traveled by servers Goal: minimize the total cost

Sanders/van Stee: Approximations- und Online-Algorithmen 3 Examples (1) Paging Uniform space (all distances are 1) Servers are slots in the cache Fault (moving a server) costs 1 Weighted paging As above, but cost of moving a page into the cache depends on the page E.g. a distributed file system Asymmetric k-server problem This space is not metric!

Sanders/van Stee: Approximations- und Online-Algorithmen 4 Examples (2) k-headed disk A disk with multiple read/write heads Each head can access all locations on the disk Which head should be moved for a particular request? Possible performance measure: total distance moved by all heads

Sanders/van Stee: Approximations- und Online-Algorithmen 5 The offline problem Can be solved using dynamic programming This is not the most efficient solution Better: reduce to mincost / maxflow problem We will construct a graph with maximum flow k Minimum cost for this flow will correspond to k-server solution

Sanders/van Stee: Approximations- und Online-Algorithmen 6 Construction of the graph Servers are s 1,...,s k Request sequence is r 1,...,r n Nodes are s,t,s 1,...,s k,r 1,r 1,...,r n,r n All arcs have capacity 1 Costs depend on arcs We assume all servers start in the same point, the origin O

Sanders/van Stee: Approximations- und Online-Algorithmen 7 The graph for 3 servers and 2 requests s 1 r 1 r 2 s s 2 t s 3 r 1 r 2 0 K d

Sanders/van Stee: Approximations- und Online-Algorithmen 8 The graph for 3 servers and 2 requests s 1 d(o,r ) 1 r 1 d(o,r ) 2 r 2 s s 2 d(o,r ) 2 t d(r,r ) 1 2 d(o,r ) 1 s 3 r 1 r 2 0 K d

Sanders/van Stee: Approximations- und Online-Algorithmen 9 The graph for 3 servers and 2 requests s 1 r 1 r 2 s s 2 K K t s 3 r 1 r 2 0 K d

Sanders/van Stee: Approximations- und Online-Algorithmen 10 The maximum flow Since all capacities are one, maxflow = k (consider the servers) Since all capacities are integer, we can find an integral min-cost flow of value k in time O(kn 2 ) This flow basically consists of k disjoint paths All edges (r i,r i) will be used in a min-cost solution Each path corresponds to a server visiting the requests on its path This gives an optimal schedule for the servers

Sanders/van Stee: Approximations- und Online-Algorithmen 11 Lower bound We show a lower bound of k for an arbitrary online algorithm ALG We use an arbitrary space with k + 1 points We compare to k different other algorithms A 1,...,A k that the adversary controls An algorithm is determined by the uncovered point (hole) Invariant: holes of ALG and k other algorithms cover the space

Sanders/van Stee: Approximations- und Online-Algorithmen 12 Cruel request sequence Before first request, each A i moves one server to hole of ALG to ensure invariant holds At each step, we request the hole of ALG Denote request by r, then ALG moves to r from, say, s Other algorithms: all have a server at r, exactly one (say A i ) has no server at s Now, A i moves from s to r The other k 1 algorithms do nothing

Sanders/van Stee: Approximations- und Online-Algorithmen 13 Cruel request sequence The stupidity of LaTeX continues to annoy me. I wish I didn t have to type this nonsense in order to get slides the right way up. ALG r A 1 A 2 Ai s r r r s s s

Sanders/van Stee: Approximations- und Online-Algorithmen 14 Relative costs In each step j, ALG pays some cost c j Only one of the other algorithms A 1,...,A k pays c j Summing over all algorithms and the entire sequence, we get k i=1 A i (σ) = ALG(σ) + k i=1 d(x i,x 0 ) There must be one algorithm which has a cost of at most ALG(σ)/k (plus an additive constant) This proves the lower bound

Sanders/van Stee: Approximations- und Online-Algorithmen 15 The k-server conjecture Any metric space allows for a deterministic, k-competitive algorithm. The work function algorithm is (2k 1)-competitive in any metric space For certain metric spaces, k-competitive algorithms are known Fundamental open question in online algorithms

Sanders/van Stee: Approximations- und Online-Algorithmen 16 The k-server conjecture Any metric space allows for a deterministic, k-competitive algorithm. Note: other generalizations of paging results fail! There is no k/(k h + 1)-competitive k-server algorithm for the (h, k)-server problem Not every metric space allows a randomized H k -competitive algorithm

Sanders/van Stee: Approximations- und Online-Algorithmen 17 The greedy algorithm Definition: serve each request by the closest server

Sanders/van Stee: Approximations- und Online-Algorithmen 18 The greedy algorithm Definition: serve each request by the closest server This algorithm is not competitive a b c Request sequence: c,b,a,b,a,b,a,... Greedy leaves one server at c forever The other one moves between a and b OPT moves servers to a and b and has constant cost

Sanders/van Stee: Approximations- und Online-Algorithmen 19 k servers on the line Algorithm Double Cover Two cases: request is between two servers, or at one side 1 2 new request move closest server servers move 2 closest servers at equal speed If two servers are at same point, choose one to move

Sanders/van Stee: Approximations- und Online-Algorithmen 20 Double Cover on first example Request c a b c b a b a b a b c a b c a b c a b c Eventually, servers are at a and b and stop moving

Sanders/van Stee: Approximations- und Online-Algorithmen 21 Analysis of Double Cover We show that DC is k-competitive We use a potential function as in the List Update problem Let min be the cost of the minimum cost matching between the servers of DC and OPT Let s i be the ith server of DC Define sum = i<j d(s i,s j ) Potential function: Φ = k min + sum

Sanders/van Stee: Approximations- und Online-Algorithmen 22 The potential function Φ = k min + sum, so it is bounded from below We show: 1. If OPT moves a distance d, Φ increases by at most kd 2. If DC moves a distance d, Φ decreases by at least d Since Φ 0 at all times, this shows DC is k-competitive Property 1 holds since sum is unchanged by move of adversary min cannot increase by more than d

Sanders/van Stee: Approximations- und Online-Algorithmen 23 Change of Φ when DC moves DC moves only 1 server over a distance d: it moves away from all other servers sum increases by (k 1)d there exists a minimum cost matching where this server is matched to this request (one OPT server is there) Therefore, min decreases by at least d Overall decrease of Φ is at least k d (k 1)d = d 1 move closest server

Sanders/van Stee: Approximations- und Online-Algorithmen 24 Change of Φ when DC moves DC moves two servers, s 1 and s 2, by a distance d: one of them is matched to the request in some minimum cost matching min is decreased by at least d by this move other server moves at most d away from its match min does not increase overall 2 OPT servers d d

Sanders/van Stee: Approximations- und Online-Algorithmen 25 Change of Φ when DC moves DC moves two servers, s 1 and s 2, by a distance d: what is the change of sum? total distance from s 1 and s 2 to any other online server is unchanged distance between s 1 and s 2 decreases by 2d Overall decrease of sum (and therefore Φ) is at least 2d d d 2 OPT servers

Sanders/van Stee: Approximations- und Online-Algorithmen 26 k servers on trees Algorithm Double Cover can be extended for trees It still has a competitive ratio of k Definition of DC-TREE: At all times, all the servers neighboring the request are moving in a constant speed towards the request On a line, DC-TREE is identical to DC new request servers 1 move closest server 2 move 2 closest servers at equal speed

Sanders/van Stee: Approximations- und Online-Algorithmen 27 DC-TREE DC-TREE may move all k servers simultaneously and this text is here so that it fits with the next slide r

Sanders/van Stee: Approximations- und Online-Algorithmen 28 DC-TREE While moving towards a request, some servers may get cut off and stop moving r

Sanders/van Stee: Approximations- und Online-Algorithmen 29 Upper bound for DC-TREE We use the same potential function Φ = k min + sum A move by OPT still increases Φ by at most kd We break the action of DC-TREE to serve a single request into phases In each phase, the subset of servers that moves is fixed Need to show: Φ decreases at least by total distance traveled by DC-TREE We consider separately the change of min and sum in a phase

Sanders/van Stee: Approximations- und Online-Algorithmen 30 The change of min Denote the number of neighbours in a phase by m One of these is matched to the request in a minimum cost matching Moving that server by d decreases min by d Moving the m 1 other servers by d increases min by at most (m 1)d min increases by at most (m 2)d

Sanders/van Stee: Approximations- und Online-Algorithmen 31 The change of sum: non-moving servers Consider a server s which is not moving (no neighbour of the request) r Exactly one server is moving away from s, m 1 others are moving towards s Change in sum caused by this server is (m 2)d s

Sanders/van Stee: Approximations- und Online-Algorithmen 32 The change of sum: non-moving servers We need to sum over the k m non-moving servers sum decreases by (k m)(m 2)d

Sanders/van Stee: Approximations- und Online-Algorithmen 33 The change of sum: moving servers Each pair of moving servers gets closer together by 2d Summing over m(m 1)/2 pairs, this gives a decrease in sum of dm(m 1)

Sanders/van Stee: Approximations- und Online-Algorithmen 34 The change of Φ min increases by at most (m 2)d Due to non-moving servers, sum decreases by (k m)(m 2)d Due to moving servers, sum decreases by dm(m 1) In total, Φ = k min + sum decreases by at least (k m)(m 2)d + dm(m 1) k(m 2)d = dm This is exactly the total distance that DC-TREE moves

Sanders/van Stee: Approximations- und Online-Algorithmen 35 Application: arbitrary graph G take a spanning tree T, apply DC-TREE on it Let n be the number of nodes of G An edge of length d in G has a detour on T of length at most (n 1)d Thus OPT-TREE(σ) (n 1)OPT(σ) Since DC-TREE is k-competitive on trees, we have DC-TREE(σ) k OPT-TREE(σ) We have a (n 1)k-competitive algorithm

Sanders/van Stee: Approximations- und Online-Algorithmen 36 Application: paging Suppose there are N slow memory pages Create a star graph with N edges of length 1/2 The central node is labeled v The other nodes are the page nodes

Sanders/van Stee: Approximations- und Online-Algorithmen 37 DC-TREE for paging (1) Servers start on k page nodes On first request, all servers move to v One server continues to requested page On subsequent requests, other servers move away from v Once all servers have left, next request causes all servers to return to v One server continues to request, etc.

Sanders/van Stee: Approximations- und Online-Algorithmen 38 DC-TREE for paging (2) This algorithm is equivalent to FLUSH-WHEN-FULL Moving to v is equivalent to clearing the cache This gives an alternative proof that FWF is k-competitive

Sanders/van Stee: Approximations- und Online-Algorithmen 39 Euclidean spaces DC is k-competitive for the line This is the one-dimensional Euclidean space Can we extend this to the higher dimensions? Even for the plane, no efficient algorithm with good competitive ratio is known Efficient = computational cost per request does not depend on length of input sequence

Sanders/van Stee: Approximations- und Online-Algorithmen 40 The Work Function Algorithm Tries to mimic OPT Keeps track of optimal offline cost so far Tries to have a configuration similar to OPT Is (2k 1)-competitive for any metric space

Sanders/van Stee: Approximations- und Online-Algorithmen 41 Work functions Configuration = set of locations of servers This is a multiset (two servers may be at same location) For a configuration C, the work function w(c) is the minimum cost to reach C (from the starting configuration) Suppose sequence so far is σ, new request is r How do we compute w σr (C), given w σ (C)?

Sanders/van Stee: Approximations- und Online-Algorithmen 42 Calculation of work function If r C, then w σr (C) = w σ (C) Otherwise, we need to move one server from some other configuration B The difference between B and C is one point (server) We need to minimize the cost to get to B while serving σ i, and then move to r Thus, w σr (C) = min x C (w σ(c x + r) + d(x,r))

Sanders/van Stee: Approximations- und Online-Algorithmen 43 Definition of WFA Let C be the current configuration Let r be the new request We serve r with server s C which satisfies Notes: s = arg min(w(c x + r) + d(x,r)) x C Minimizing only d(x,r) is what the greedy algorithm does Minimizing w(c x + r) mimics OPT so far (retrospective greedy)

Sanders/van Stee: Approximations- und Online-Algorithmen 44 Idea behind WFA From C, we can move to k different configurations to serve r (we can move any of k servers) We move to the best one that is not too far away In effect, the algorithm is trying to find the optimal servers, without paying too much We do not use any properties of the metric space

Sanders/van Stee: Approximations- und Online-Algorithmen 45 Performance of WFA WFA is (2k 1)-competitive The proof uses a (complicated) potential function For some special metric spaces, WFA is known to be k-competitive E.g., the line, any metric space with at most k + 2 points The popular conjecture is that WFA is k-competitive in any metric space