a optimal on-line algorithm for k servers on trees

33
A Optimal On-line Algorithm for k Servers on Trees Author : Marek Chrobak Lawrence L. Larmor e 報報報 報報報

Upload: karena

Post on 28-Jan-2016

47 views

Category:

Documents


0 download

DESCRIPTION

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 - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: A Optimal On-line Algorithm for  k  Servers on Trees

A Optimal On-line Algorithm for k Servers on Trees

Author : Marek Chrobak

Lawrence L. Larmore

報告人:羅正偉

Page 2: A Optimal On-line Algorithm for  k  Servers on Trees

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

Page 3: A Optimal On-line Algorithm for  k  Servers on Trees

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.

Page 4: A Optimal On-line Algorithm for  k  Servers on Trees

Illustration -- LIFO Paging

1

2

3

Item : A B C D E

Request :

A B CDC

A

B

C

D C D

D

Page 5: A Optimal On-line Algorithm for  k  Servers on Trees

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.

Page 6: A Optimal On-line Algorithm for  k  Servers on Trees

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.

Page 7: A Optimal On-line Algorithm for  k  Servers on Trees

How to measure the quality of an online algorithm?

Comparing to the cost incurred by an optimaloffline algorithm.

Page 8: A Optimal On-line Algorithm for  k  Servers on Trees

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.

Page 9: A Optimal On-line Algorithm for  k  Servers on Trees

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.

Page 10: A Optimal On-line Algorithm for  k  Servers on Trees

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 MM is read, is read, and in order to service the request, we must and in order to service the request, we must move one server to the request point.move one server to the request point.

The cost is the total distance traveled by the The cost is the total distance traveled by the servers.servers.

Page 11: A Optimal On-line Algorithm for  k  Servers on Trees

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).

Page 12: A Optimal On-line Algorithm for  k  Servers on Trees

Illustration (3 servers)

2 5

4

1 6

3

7

M S1

S3

S2

Request:

6

5

4

4

3

1/2

Cost:

1

1

1

1

0

Page 13: A Optimal On-line Algorithm for  k  Servers on Trees

Examples of applications

1.Paging

2.Two-headed(k-headed) disk

1

2 4

3

k1

k2

21 43 5k1 k2

Page 14: A Optimal On-line Algorithm for  k  Servers on Trees

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.

Page 15: A Optimal On-line Algorithm for  k  Servers on Trees

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.)

Page 16: A Optimal On-line Algorithm for  k  Servers on Trees

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.

Page 17: A Optimal On-line Algorithm for  k  Servers on Trees

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.

move. sadversary' additional one and steps 1after

function potential theof value thedenote ~

Let

t

t

Page 18: A Optimal On-line Algorithm for  k  Servers on Trees

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 one of them is chosen arbitrarily as the active one, the others are not.

Page 19: A Optimal On-line Algorithm for  k  Servers on Trees

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

Page 20: A Optimal On-line Algorithm for  k  Servers on Trees

Theorem 1

This algorithm is k-competitive.

Page 21: A Optimal On-line Algorithm for  k  Servers on Trees

Analysis

.|| is

) ,( edge of weight the where},,...,{ and

},...,{component graph with bipartite a

in matching weight minimum a is where

,|| ||

by defined isfunction potentialOur

1

1

min

min

ip

ipk

k

qpqp

as

asaa

ss

M

ssMk

Page 22: A Optimal On-line Algorithm for  k  Servers on Trees

Lemma 1

Suppose that following two conditions hold:

Then S (/) A + 0, that is, our algorithm is c-competitive for c = /.

)1( ~

(ii)

~

(i) 1

ttt

ttt

S

A

Page 23: A Optimal On-line Algorithm for  k  Servers on Trees

Lemma 2

ttt

ttt

S

k

~

.2

A ~

.1

: trueare

conditions twofollowing thealgorithm, In this

1-

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

Page 24: A Optimal On-line Algorithm for  k  Servers on Trees

Proof of Lemma 1

nnnnnn SA

SA

SA

~

~

~

~

~

~

1

222212

111101

… …

+ +

)2)...(...( )1)...(...(

)...()~

...~

( )...()~

...~

(11

11101

nn

nnnn

SSAA

Page 25: A Optimal On-line Algorithm for  k  Servers on Trees

Proof of Lemma 1 (cont.)

00

0

01

111

111

)/(/)/(

)...(

)...()~

...~

(

)...()~

...~

()...(

(2), and (1)By

AAS

AS

AA

SS

n

nn

nnn

Page 26: A Optimal On-line Algorithm for  k  Servers on Trees

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.

ttt kA ~

.1 1-

qp

qpssMk || || min

Page 27: A Optimal On-line Algorithm for  k  Servers on Trees

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.

ttt S ~

.2

qp

qpssMk || || min

Page 28: A Optimal On-line Algorithm for  k  Servers on Trees

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.

ttt S ~

.2

qp

qpssMk || || min

Page 29: A Optimal On-line Algorithm for  k  Servers on Trees

Proof of Lemma 2 (cont.)ttt S

~ .2

qp

qpssMk || || min

cost.)our also is ( ~

]2)2([

]2)2([

)1()2(

~:mostat is potential theof change theTherefore

1

1

qdqd

qddkqqkqk

dkqqlqk

dlkldqk

tt

q

pp

q

ppp

tt

Page 30: A Optimal On-line Algorithm for  k  Servers on Trees

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 space1995 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 !)

Page 31: A Optimal On-line Algorithm for  k  Servers on Trees

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

Page 32: A Optimal On-line Algorithm for  k  Servers on Trees

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.

Page 33: A Optimal On-line Algorithm for  k  Servers on Trees

Conclusion (cont.)

Some reference:1.Y.Bartal, Probabilistic approximations of metric space a

nd 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