330 likes | 446 Views
A Optimal On-line Algorithm for k Servers on Trees. Author : Marek Chrobak Lawrence L. Larmore. 報告人:羅正偉. Outline. 1. Preliminaries of online algorithms 2. Introduction to k -server 3. An online algorithm for trees 4. Analysis of the algorithm
E N D
A Optimal On-line Algorithm for k Servers on Trees Author : Marek Chrobak Lawrence L. Larmore 報告人:羅正偉
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
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.
Illustration -- LIFO Paging Item : A B C D E 1 A Request : A B C D C B 2 D C D 3 C D
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.
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.
How to measure the quality of an online algorithm? Comparing to the cost incurred by an optimal offline algorithm.
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.
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.
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) • 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.
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).
Illustration (3 servers) Request: Cost: 1 6 S1 M 6 1 1/2 7 5 2 5 1 S2 4 1 3 4 S3 4 0 3 1
Examples of applications k1 1 1.Paging 2.Two-headed(k-headed) disk k2 2 4 3 k1 k2 1 2 3 4 5
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.
The adversary 1.In k-server problems, we can view the servicing of the requests as a game between our servers s1,…, sk and adversary’s servers a1,…, ak, 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.)
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.
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. At and St 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.
Definitions and notation (cont.) 6. If the request is on point x, then we call our server sp active, if there are no other our servers in the interval (sp, x]. If several servers occupy the same position as sp, and all satisfy the condition above, then only oneof them is chosen arbitrarily as the active one, the others are not.
Algorithm 1. while none of our servers is on the request x do begin 2. let d = minp|sp,yp|, where yp(sp,x] is either a vertex or x; 3. Move each active server sp by d towards x; 4. end
Theorem 1 This algorithm is k-competitive.
Lemma 1 Suppose that following two conditions hold: Then S (/) A + 0, that is, our algorithm is c-competitive for c = /.
Lemma 2 • By Lemma 1 and 2, we can get Theorem 1, i.e., • this algorithm is k-competitive.
Proof of Lemma 1 … … + +
Proof of Lemma 2 Proof. Since the adversary only moves one server, only one edge in Mmin can change. If the adversary moves this server by d, then the potential increase at most kd.
Proof of Lemma 2 (cont.) Without loss of generality, we assume that the request is on a1. Assume that the servers s1,…,sq are active. It is easy to see that there is a minimum matching Mmin in which a1 is matched to one of s1,…,sq. Suppose that all our servers moved by d.
Proof of Lemma 2 (cont.) Proof. 1.The weight of a minimum matching Mmin can’t increase by more than (q-2)d. 2.For p = 1,…, q, let lp be the number of our servers sr such that sp is between sr and a1. When sp moves by d, the distance to lp-1 of our servers increases by d, but k-lp of our servers decreases by d.
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 !)
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 Hk 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(n2/3 log n)-competitive randomized algorithm for n equally- spaced points on the line
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.
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