Download presentation
Presentation is loading. Please wait.
Published byAileen Carroll Modified over 9 years ago
1
Introduction to the k-Server Problem Marcel Birkner
2
Introduction to k-server k-server problem was introduced by Manasse, McGeoch and Sleator in 1990 The k-server problem is defined as follows: –we are given k servers that reside in a metric space –every time step, we have to service a request and move one server to the request point –the cost is the total distance traveled by the servers
3
Vancouver Montreal Toronto 5000 km 500 km 4500 km Metric space, Canada 3 customers in Vancouver, Toronto and Montreal can request a service 2 customer support teams (servers) distance between customers Problem: for each service request r i by a customer send a team right away to solve the problem. The total costs of the distance the teams travel has to be minimal
4
Vancouver Montreal Toronto 5000 km 500 km 4500 km A B C Start: Teams Yellow and Blue are located in Montreal at the start … 5.0002.000B 5.0001.500C 5.0001.000B 5.000500C 5.0000A YellowBlueRequests Not optimal Greedy Criteria: Send Team that is nearest! Greedy Algorithm Travel Costs: 5*10 5 Online algorithm No knowledge about future requests 1000 x C B Service Calls: A C B C B C B C B C B … C B
5
Vancouver Montreal Toronto 5000 km 500 km 4500 km A B C … 9.5000B 0C 0B 0C 5.0000A YellowBlueRequests optimal Optimal Travel Costs: 1*10 4 Offline algorithm Knows the whole sequence at the start Start: Teams Yellow and Blue are located in Montreal at the start 1000 x C B Service Calls: A C B C B C B C B C B … C B
6
Greedy vs. Randomization (Harmonic) Algorithm Suppose node r makes a request The algorithm works as follows: –Let d i be the distance from server i to the request node r –If any d i = 0, do nothing (server i will serve the request) –Else (Harmonic k-server Algorithm) use server i with probability inversely proportional to d i –Else (Greedy k-server Algorithm) use server that is nearest to r among all servers
7
Competitive ratio Sleator and Tarjan suggested to compare the solution produced by an online algorithm to the optimal solution of an offline algorithm: –the online algorithm has no knowledge of future requests –the offline algorithm is allowed to know the whole list of requests in advance costALG(p) ≤ c * costOPT(p) + I(C 0 ) Input sequence p, initial configuration C 0, competitive ratio c
8
Sketch: Proof competitive ratio Potential function Φ describes the entire state of a system –Current locations of the online/offline servers –Φ is an upper bound on the expected amount of work the algorithm can be forced to do if the offline servers do not move to prove competitiveness, the potential function should satisfy certain properties: –First stage: Adversary moves a server to the request r –Second stage: Online Algorithm moves server to r i-1i’i 1 st stage 2 nd stage i th step
9
Properties of Φ P1: Φ ≥ 0 –the potential function is non-negativ P2: Φ i’ – Φ i-1 ≤ c * cost ADV (r i ) –when the adversary moves a server at the beginning of phase i, the potential function does not increase by more than c times the cost paid by the adversary P3: E[ Φ i – Φ i’ ] ≤ - E[cost HAR (r i )] –when the harmonic algorithm moves a server to the service request r, the expected drop in potential is large enough to cover the expected cost paid by the harmonic in serving r i i-1i’i 1 st stage 2 nd stage i th step cost ADV (r i ) = cost paid by the adversary during the move after request r i cost HAR (r i ) = cost paid by the online Harmonic algorithm during the move after request r i Lemma:If there exists a potential function Φ, satisfying the above properties with respect to some online algorithm HAR, then HAR is c-competitive
10
P1: Φ ≥ 0 P2: Φ i’ – Φ i-1 ≤ c * cost ADV (r i ) P3: E[ Φ i – Φ i’ ] ≤ - E[ cost HAR (r i ) ] Proof: m – random variable equal to the length of the request sequence p i – outcome of the rest of the coin tosses Induction on i (induction basis i = m-1 for 1≤i ≤m): E pi [ cost i (HAR) ] – C(k) * E pi [ cost i (ADV) ] ≤ E pi [ Φ i-1 – Φ m ] Induction hypothesis for i+1: E pi+1 [ cost i+1 (HAR) ] – C(k) * E pi+1 [ cost i+1 (ADV) ] ≤ E pi+1 [ Φ i – Φ m ] LEMMA
11
Proof: E pi [ cost i (HAR) ] – C(k) * E pi [ cost i (ADV) ] =E pi [ Z i – C(k) * D i + cost i+1 (HAR) – C(k) * cost i+1 (ADV) ] ≤E pi [ (Φ i’ – Φ i-1 ) – (Φ i’ – Φ i-1 ) ] + E pi [ (Φ i – Φ m ) ] P1: Φ ≥ 0 P2: Φ i’ – Φ i-1 ≤ c * costADV(r i ) P3: E[ Φ i – Φ i’ ] ≤ - E[ costHAR(r i ) ] i i+1 =E pi [ Φ i-1 – Φ m ) ] Hence, we obtain that for the entire request sequence: E [ cost(HAR) ] – C(k) * E[ cost(ADV) ] ≤ E[ Φ 0 – Φ m ]
12
Previous results Manasse et al. [1990] –for k=2, constructed a deterministic 2-competitive algorithm –Proved no deterministic algorithm can have a competitive ratio less than k Berman et al. [1990] –for k=3 Harmonic has ratio of about 3 17.000 Chrobak and Larmore [1992] –for k=2 Harmonic is 3-competitive
13
5000 km 1000 km 5000 km A B C How to think about the potential functions 5 00010 000C 5 0008000+2000C 5 00010 000B 5 0006000 +2000B 5 0004000 +2000C 5 0002000 +2000B 5 0000 + 2000C 5 0000A YellowBlueRequests … 0 5 000 4 000 3 000 2 000 1 000 … BANK $ For every move we put a little extra into the bank for big future requests! 1000 x C B A C B C B C B C B C B … C B Prob[Yellow] return is 20% with the Harmonic algorithm Harmonic is 3-competitive with 2 servers
14
Literature Bartal, Y. and Grove, E. 2000. The harmonic k-server algorithm is competitive. J. ACM 47, 1, Jan. 2000 A. Floratos and R. Boppana, The On-Line {K}-Server Problem, 1997 Marek Chrobak, Lawrence L. Larmore, HARMONIC is a 3–competitive for two servers, Theoretical Computer Science, v.98 n.2, p.339-346, 18 May 1992 Amos Fiat, Yuval Rabani, Yiftach Ravid, Competitive k-server algorithms, Journal of Computer and System Sciences, v.48 n.3, p.410-428, June 1994 E. F. Grove, The harmonic online K-server algorithm is competitive, Proceedings of the twenty-third annual ACM symposium on Theory of computing, p.260-266, May 05-08, 1991, New Orleans, Louisiana, United States Mark S. Manasse, Lyle A. McGeoch, Daniel D. Sleator, Competitive algorithms for server problems, Journal of Algorithms, v.11 n.2, p.208-230, Jun. 1990 Richard Karp, http://www.cs.berkeley.edu/~karp/greatalgo/
15
Thank you for your attention Do you have any questions? Vancouver Montreal Toronto 5000 km 500 km 4500 km
16
Definition A metric space M = (V,d) consists of a set of points V with a distance function d: V x V R satisfying the following properties: –d(u,v) ≥ 0 for all u, v є V –Reflexivity d(u,v) = 0 iff u = v –Symmetry d(u,v) = d(v,u) for all u, v є V –Triangle inequality d(u,v) + d(v,w) ≥ d(u,w) for all u,v,w є V
17
Metric Space Completed weighted graph Distance between nodes equals the weight of the edge 2 2 3 3 3 2 2 3 111 1
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.