Presentation is loading. Please wait.

Presentation is loading. Please wait.

A Optimal On-line Algorithm for k Servers on Trees Author : Marek Chrobak Lawrence L. Larmore 報告人:羅正偉.

Similar presentations


Presentation on theme: "A Optimal On-line Algorithm for k Servers on Trees Author : Marek Chrobak Lawrence L. Larmore 報告人:羅正偉."— Presentation transcript:

1 A Optimal On-line Algorithm for k Servers on Trees Author : Marek Chrobak Lawrence L. Larmore 報告人:羅正偉

2 Outline 1. Preliminaries of online algorithms 2. Introduction to k-server 3. An online algorithm for trees 4. Analysis of the algorithm 5. Some results about k-server 6. Conclusion

3 Preliminaries 1.What is a online algorithm? The choice of the algorithm at each step must be made online, i.e., without any knowledge of future requests. We will use ALG to denote an on-line algorithm for k-server problem. 2.For example, the paging algorithm for memories is a online algorithm.

4 Illustration -- LIFO Paging 1 2 3 Item : ABCDE Request : ABCDC A B C DCD D

5 Paging algorithm (cont.) 1. Each page request arrives only after its previous request is serviced. 2. The objective of an online algorithm is to make “online” decisions to minimize the overall page fault times.

6 Preliminaries (cont.) 1. An offline algorithm is allowed to know the whole list of accessing requests in advance, and does not have to run in polynomial time. 2. We will use OPT to denote an optimal offline algorithm, i.e., the cost is minimum overall all offline algorithm.

7 How to measure the quality of an online algorithm? Comparing to the cost incurred by an optimal offline algorithm.

8 Notation and definitions 1. Let I be a legal input for the problem. 2. Then, define ALG(I) (OPT(I), respectively) to be the cost incurred by ALG (OPT) with respect to input sequence I.

9 Competitive ratio 1. We say that an algorithm ALG is c- competitive (or of competitive ratio at most c) if ALG(I) ≤ c∙OPT(I) + O(1) holds for all legal inputs I. 2. Clearly, we want to design online algorithms whose competitive ratios are as small as possible.

10 Introduction to k-server The k-server problem is defined as follows: we are given k mobile servers that reside in a metric space M. (k < the number of nodes in M)  M is read, and in order to service the request, we must move one server to the request point. At every time step, a request r  M is read, and in order to service the request, we must move one server to the request point. The cost is the total distance traveled by the servers. The cost is the total distance traveled by the servers.

11 k-server definition (cont.) 1. The choice of server at each step must be made online, i.e., without the knowledge of future requests. 2. Metric space M is a graph G of N nodes with edge cost d, and satisfies the following: d(i, j) > 0 (positivity); d(i, i) = 0 (reflexivity); d(i, j) + d(j, k) ≥ d(i, k) (triangle inequality); d(i, j) = d(j, i) (symmetry).

12 Illustration (3 servers) 2 5 4 16 3 7 M S1S1 S3S3 S2S2 Request: 6 5 4 4 3 1/2 Cost: 1 1 1 1 0

13 Examples of applications 1.Paging 2.Two-headed(k-headed) disk 1 24 3 k1k1 k2k2 21435 k1k1 k2k2

14 Introduction to k-server 1. The k-server problem was introduced by Manasse, McGeoch, and Sleator in 1990. 2. They also showed that k is a lower bound on the competitive ratio of any deterministic online algorithm for the k-server problem, and gave a 2-competitive algorithm for 2 servers.

15 The adversary 1.In k-server problems, we can view the servicing of the requests as a game between our servers s 1,…, s k and adversary’s servers a1,…, a k, and measure the ratio between S (the work done by our servers) and A (the work done by adversary’s servers). 2.Then we want to show that S ≤ cA + b independently of the way the adversary move. (One of the adversary is the optimal.)

16 The adversary (cont.) 3. Additionally, we assume that at each step of the game, the adversary first moves a single server to the request point, and then we apply our algorithm to serve the requests.

17 Definitions and notation 1. 2.  t : The value of the potential function. 3. Assume that  0 is the initial value of the potential, depends only on the initial configuration. 4. A t and S t denote, respectively, the adversary’s and our costs at step t. 5. (x, y] denotes the unique path from x to y in a tree, and is called interval.

18 Definitions and notation (cont.) 6. If the request is on point x, then we call our server s p active, if there are no other our servers in the interval (s p, x]. If several servers occupy the same position as s p, and all satisfy the condition above, then only one of them is chosen arbitrarily as the active one, the others are not.

19 Algorithm 1. while none of our servers is on the request x do begin 2. let d = min p |s p,y p |, where y p  (s p,x] is either a vertex or x; 3. Move each active server s p by d towards x; 4. end

20 Theorem 1 This algorithm is k-competitive.

21 Analysis

22 Lemma 1 Suppose that following two conditions hold: Then S  (  /  ) A +  0, that is, our algorithm is c-competitive for c =  / .

23 Lemma 2 By Lemma 1 and 2, we can get Theorem 1, i.e., this algorithm is k-competitive.

24 Proof of Lemma 1 … … ++

25 Proof of Lemma 1 (cont.)

26 Proof of Lemma 2 Proof. Since the adversary only moves one server, only one edge in M min can change. If the adversary moves this server by d, then the potential increase at most kd.

27 Proof of Lemma 2 (cont.) Without loss of generality, we assume that the request is on a 1. Assume that the servers s 1,…,s q are active. It is easy to see that there is a minimum matching M min in which a 1 is matched to one of s 1,…,s q. Suppose that all our servers moved by d.

28 Proof of Lemma 2 (cont.) Proof. 1.The weight of a minimum matching M min can’t increase by more than (q-2)d. 2.For p = 1,…, q, let l p be the number of our servers s r such that s p is between s r and a1. When s p moves by d, the distance to l p -1 of our servers increases by d, but k- l p of our servers decreases by d.

29 Proof of Lemma 2 (cont.)

30 Some results about k-server 1990 M. Manasse, L.A. McGeoch, D. Sleator → A lower bound k of the deterministic competitive ratio in any metric space 1995 E. Koutsoupias, C. Papadimitriou → A upper bound 2k-1of the deterministic competitive ratio in any metric space (The best !) 2001, 2003 Y. Bartal, B. Bollobas, M.Mendel, N. Linial → In the randomized competitive ratio, a lower bound is Ω(log k / loglog k), and a upper bound is 2k-1, the same as that in the deterministic case. (The best !)

31 Some results about k-server (cont.) 2000 D. Achliloptas, M. Chrobak, J. Noga → For the uniform metric space (where all pairwise distances are equal), an randomized online algorithm of competitive ratio H k  ln k 2000 Y. Bartal, M. Chrobak, L.L. Larmore → 2-  randomized algorithm for 2 servers on the line 2001 B. Csaba, S. Lodha → O(n 2/3 log n)-competitive randomized algorithm for n equally- spaced points on the line

32 Conclusions 1. The challenging problem is to design randomized k-server algorithms that achieve competitive ratio strictly less than k for arbitrary metric spaces. 2. Lots of work has been devoted to achieve this goal with very little success thus far.

33 Conclusion (cont.) Some reference: 1.Y.Bartal, Probabilistic approximations of metric space and its algorithmic application, 1996 2. S.Seiden, A general decomposition theorem for the k- server problem, 2002 3. A. Fiat, M. Mendel, Better algorithms for unfair metrical task systems and application, 2003 4. Y. Bartal, M. Mendel, Randomized k-server algorithms for growth-rate bounded graphs, 2004


Download ppt "A Optimal On-line Algorithm for k Servers on Trees Author : Marek Chrobak Lawrence L. Larmore 報告人:羅正偉."

Similar presentations


Ads by Google