A Comparison of Performance Measures for Online Algorithms
This paper provides a systematic study of several proposed measures for online algorithms in the context of a specific problem, namely, the two server problem on three colinear points. Even though the problem is simple, it encapsulates a core challen…
Authors: Joan Boyar, S, y Irani
A Compariso n of P erformance Measures fo r Online Algorithms ∗ Joan Bo yar † Sandy Irani ‡ Kim S. Larsen † Octob er 23, 20 18 Abstract This pa pe r provides a sys tema tic study of several prop osed mea- sures for online algo rithms in the context of a specific pr o blem, namely , the t wo server pr oblem on three colinear p oints. Even t ho ugh the problem is simple, it enca psulates a core challenge in online a lgorithms which is to ba lance g reediness and adaptability . W e examine Comp eti- tive A na lysis, the Max/Max Ratio, the Random Order Ratio, B ijective Analysis and Relativ e W orst Order Analysis, and determine how thes e measures co mpare the Gr eedy Algo rithm, Double Cov erag e, and Lazy Double Co verage, commonly studied a lgorithms in the context of server problems. W e find that by the Max/Max Ra tio and Bijectiv e Analysis, Greedy is the bes t o f the three algorithms. Under the other mea sures, Double Cov erag e and Lazy Double Cov er age are better, t ho ugh Rela- tive W orst Order Analysis indicates that Greedy is sometimes b etter. Only Bijective Analysis and R e la tive W orst Order Analysis indicate that Lazy Double Coverage is better than Double Co verage. Our re- sults also provide the first pro of of optimality of an algorithm under Relative W o rst Order Analysis. ∗ A preliminary vers ion of this paper app eared in 11th International Algorithms and Data Structur es Symp osium (W ADS 2009) , v olume 5664 of L e ctur e Notes in Computer Scienc e , pages 119-130, Springer, 2009. † Department of Mathematics and Computer Science, Univ ersity of Southern Denmark, Campusvej 55, DK-5230 Odense M, Denmark, { jo an,kslarsen } @imada.sdu.dk. Supp orted in part by th e Danish Council for Indep endent Researc h. Part of this wo rk w as carried out while these authors w ere v isiting the Univer sity of Cal ifornia, Irvine, and the Universi ty of W aterlo o, Canada. ‡ Department of Computer Science, U niversit y of Calif ornia, Irvine, C A 92697, USA, irani@ics.uci.edu. Supp orted in part b y N SF Grants CCR-05140 82 and CCF-0916181. 1 1 In tro d uction Since its introd uction b y Sleator and T arjan in 198 5 [19], Comp etitiv e Anal- ysis has b een the most widely used metho d f or ev aluating onlin e algorithms. A pr oblem is said to b e online if the input to the problem is give n a p iece at a time, and the algorithm m ust commit to parts of the solution o v er time b efore the entire in put is reve aled to the algo r ithm. Comp etitive Ana lysis ev aluates an online algorithm in comparison to th e optimal offline algo- rithm whic h receiv es the input in its en tiret y in adv ance and has unlimited computational p o we r in determining a solution. Informally sp eaking, one considers the worst-case input wh ic h maximizes the ratio of the c ost of the online algorithm for that input to the cost of the optimal offline algorithm on th at same input. The maximum ratio a chiev ed is c alled the Comp etitive R atio . Thus, one facto r s out the inh eren t difficult y of a particular input (for whic h the offline alg orithm is p en alized along with the on lin e algorithm) and measures what is lost in m aking decisions with p artial inf orm ation and/or limited pow er. Despite the popu larit y of Comp etitiv e Analysis, researc hers hav e b een well a wa r e of its deficiencies and ha ve b een seeking better alternativ es almost since the time th at it came in to wide u se. (See [10] for a fairly recen t surv ey .) Man y of the prob lems with Comp etitiv e Analysis stem from the fact that it is a w orst case measure and fails to examine the p erformance of alg orithms on instances that would b e exp ected in a p articular application. It has also b een observed that Comp etitiv e Analysis sometimes fails to distinguish b et ween algo r ithms which h av e very differen t p erf ormance in practice and in tuitive ly differ in qualit y . Ov er the y ears, researc hers ha v e devised alternativ es to Comp etitiv e Anal- ysis, eac h d esigned to address o n e or all of its shortcomings. T here are ex- ceptions, but it is fair to sa y that man y alternativ es are application-sp ecific, and v ery often, the pap er s in wh ic h they are int r o duced only presen t a d ir ect comparison b et w een a new measure and Comp etitiv e Analysis. This pap er is a study of sev eral generally-a p p licable alternativ e measures for ev aluating online algorithms that h a ve b een suggested in the literature. W e p erform this comparison in the con text of a particular problem: the 2-serv er problem on the line with three p ossib le requ est points, nick-named here the b aby server p r oblem . Inv estigating simple k -server pr oblems to shed ligh t on new idea s has also b een done in [3], f or ins tance. W e fo cu s on three algorithms, Gree dy , Dou ble Covera ge ( Dc ) [9], a n d 2 Lazy Doubl e Covera ge ( Ldc ), and four different analysis tec hniqu es (p erformance measures): Bijectiv e Analysis, the Max/Max Ratio , the Ran- dom Order Ratio, and Relativ e W orst Order Analysis. In in v estigating the bab y serv er problem, we find that a ccording to some qualit y measures for onlin e algorithms, Greedy is b etter than Dc and Ldc , wh ereas for others, Dc an d Ldc are b etter than Greedy . In ad- dition, for some measures Ldc is b etter than Dc , while for o thers they are indistinguishable. The analysis metho ds th at conclude that Dc and Ldc are b etter th an Greedy are fo cused on a w orst-case sequence for the ratio of an algorithm’s cost compared to Opt . In th e case of Greed y vs. Dc and Ldc , this conclu- sion mak es use of the fact that there e xists a family of sequences for whic h Greedy ’s cost is u n b oundedly larger than the cost of Opt , whereas f or eac h of Dc and Ldc , the cost is alw a ys at most a factor of tw o larger than the cost of Opt . On the other hand, the measures th at conclude that Greedy is b est compare t wo algo r ithms based on the multiset of costs stemming from the set of all sequences of a fixed length. In the case of Greedy and Ldc , this makes use of the fact that for an y fixed n , b oth the maxim um as wel l as the a verag e cost of Ldc o ve r all sequences of length n are grea ter th an the corresp onding v alues for Gree dy . Using R elativ e W orst Order Analysis a more nuanced result is obtained, concluding that Ldc can b e at most a factor of t wo w orse than Greedy , while Greed y can b e unboun dedly w orse than Ldc . The analysis m etho ds that d istinguish b et ween Dc and Ld c (Bijectiv e Anal- ysis and Relativ e W orst Order Analysis) tak e adv an tage of the fact that Ldc p erforms at least as w ell as Dc on ev ery sequence and p erforms b etter on some. The others (Comp etitiv e Analysis, the Max/ Max Ratio, and the Ran- dom Order Ratio) cannot distinguish b et we en them, due to the in termediate comparison to Opt , i.e., alg orithms are compared t o Opt and then the r e- sults of this comparison are compared. On some sequen ces where Dc and Ldc do worst in comparison with Opt , t h ey p erform identi cally , so t h ese w orst ca se measures conclude that the tw o algorithms p erform iden tically o v erall. T his phenomenon o ccurs in other problems also. F or example, s ome analysis metho ds fail to d istin gu ish b etw een the p aging algorithms LR U and FWF, eve n though the form er is clearly b etter and is at least as go o d on ev ery sequence. The simplicit y of the bab y serv er p roblem also enables us to giv e the first 3 pro of of optimalit y in Relativ e W orst Ord er Analysis: Ldc is an optimal algorithm for this problem. Though our main fo cus is the greediness/adaptabilit y issue that w e inv es- tigate through the analyses of Greedy and Ldc o ver a br oad collection of qualit y m easures, we also include some results ab out the balance algo- rithm [18], Bal . Because of the interest f or this serv er algorithm in the literature, we find it natural to menti on the results for Bal that can b e obtained relat ively easily within our fr amew ork. 2 Preliminaries In this section, w e define the serv er problem used through ou t this pap er as the basis for our comparison. W e also defin e the serv er algorithms u sed, and the qualit y measures whic h are the sub ject of this stud y . 2.1 The Serve r Problem Serv er problems [5] ha v e b een the ob jects of man y stud ies. I n its fu ll gen- eralit y , one assumes that some n u m b er k of servers are a v ailable in some metric s p ace. Then a sequence of r equests must b e treated. A r equest is simply a p oint in the metric space, and a k -serve r algorithm m u s t mo ve serv ers in r esp onse to the request to ensure that at least on e serv er is p laced on the r equest p oin t. A cost is asso ciated with an y mo ve of a serv er (this is usually the distance mov ed in the g iven metric sp ace), and the o b jectiv e is to m inimize total cost. The initial configuration (location o f serve r s) ma y or ma y not b e a part of the problem formulat ion. In inv estigating the strengths and weaknesses of the v arious m easures for the qualit y of online algorithms, we define the simplest p ossible non trivial serv er problem: Definition 1 The b aby server pr oblem is a 2-serv er problem on the line with three p ossib le request p oin ts A , B , and C , in that order from left to righ t, with dista n ce o n e betw een A and B and i ntegral d istance d ≥ 2 betw een B and C . Th e cost of mo vin g a serv er is defi ned to b e the distance it is mo ved. W e assume that initially the t wo servers are placed on A and C . ✷ As a side remark, w e ha v e considered most pro ofs in this pap er in the co n - text of a non-in tegral distance d b etw een B and C . The main conclusions 4 remain the same, but man y of the pro ofs b ecome longer an d th e form ulas less readable. In a few places, w e consider v arian ts of Ldc , wh ere the righ t- most serv er mo v es at a sp eed a times faster than the left-most serv er. Also in this case w e assume th at d/a is integ r al in order to highlight th e core findings. All results in the pap er p ertain to the bab y serv er problem. Eve n though the problem is simple, it requir es balancing greediness and adaptabilit y which is a central problem in all k -serv er settings and man y online prob lems in general. This simple prob lem w e consider is sufficien t to sho w the non- comp etitiv eness of Greed y with resp ect to Comp etitiv e Analysis [5 ]. 2.2 Serv er Algorithms First, w e define some relev ant p r op erties o f serve r algorithms: Definition 2 A serv er a lgorithm is ca lled • noncr ossing if serv ers nev er c hange their r elativ e p osition on the line. • lazy [18] if it nev er mo ves more than one serv er in resp onse to a request and it do es not mo ve an y serv ers if the requested p oint is already o ccupied b y a se r v er. A serv er algorithm fulfilling b oth these prop erties is called c ompliant . ✷ Giv en an algo r ithm, A , w e define the algorithm lazy A , L A , as follo ws: L A will mainta in a v irtual set of serv ers and their lo cations as w ell as the real set of serv ers in the metric space. Th ere is a one-to- one corresp ond ence b et ween real serv ers and virtual serve r s. The vir tu al set will simulate the b ehavio r of A . The initial serv er p ositions of the virtual and real s erv ers are the same. When a requ est arrives, the virtu al serve r s are mov ed in accordance with algorithm A . Af ter this happ ens , there will alwa ys b e at least one virtual serv er on the requested p oin t. Then the real servers mo ve to satisfy the request: If th er e is already a real server on the requested p oin t, nothing more happ ens. Oth er w ise, the real serve r corresp ond ing to the virtu al serv er on the requested point mo ves to th e requested p oint. If there is more than one virtual serv er on the requested p oin t, tie -br aking ru les may b e applied. In o u r ca se, we will pic k the clo sest serv er to mo ve to the requested p oint. 5 General k -serv er pr oblems th at are more complicated than the b ab y serv er problem may need more in volv ed tiebreaking r ules to b e d eterministically defined. Note that as a sp ecial case of the ab ov e, a virtual mo ve ca n b e of distance z er o, while still leading to a real mov e of non-zero d istance. In [9], it w as observ ed that for an y 2-serv er algorithm, there exists a n on- crossing algorithm with the same cost on all sequences. I n [18], it w as observ ed that for an a lgorithm A a n d its lazy version L A , f or an y sequence I of requests, A ( I ) ≥ L A ( I ) (we refer to this as the laziness observation ). Note that the laz in ess obser v ation ap p lies to the general k -serv er p roblem, so the results that dep end only on this observ ation can also b e generalize d b eyo n d t h e bab y s erv er problem. W e define a n umber of algo r ithms b y sp ecifying t h eir b eha vior on the next request p oint, p . F or all algorithms considered here, no mo v es are made if a serv er already o ccupies the request p oint (though in tern al state c han ges a r e sometimes made in suc h a situation). Greedy mo ves the closest serve r to p . Note th at d ue to the problem for- m ulation, ties ca n not occur (and the serv er on C is nev er mo ved). If p is in b et ween the t w o serv ers, Doub le Co verag e ( Dc ), mo ves b oth serve r s at the same sp eed in the directio n of p un til at lea st one serv er reac hes the p oint. If p is on the same side of b oth serv ers, the n earest serv er mov es to p . W e defi n e a -Dc to work in the same w ay as Dc , except that the right- most serv er mo ves at a sp eed a ≤ d times faster than th e left-most server. W e refer to the lazy v ersion of Dc as Ldc and the lazy v ersion of a -Dc as a -Ldc . The balance algorithm [18], Bal , make s its d ecisions b ased on the total distance tra vel led by eac h server. F or eac h server, s , let d s denote the total distance trav elled b y s from the initiation of the algorithm up to the curr en t p oint in time. On a r equest, Bal mov es a server, aiming to obtain the smallest p ossible max s d s v alue after the mo ve . In case of a tie, Bal mo ve s the serv er whic h m u st m ov e the furthest. As an example, sh owing that some care must b e tak en w hen defin ing the lazy algorithms, consider th e follo wing serv er pr oblem whic h is sligh tly more complicated than th e one w e consider in the rest of the pap er. W e illustrate the example in Figure 1. Th ere are four p oin ts A = 0, B = 2, C = 6, and D = 11 in u se, and th ree servers, initially on A , B , and D . W e consider the request sequence C B C , serv ed by Ldc . Af ter the fir s t request to C , 6 0 1 2 3 4 5 6 7 8 9 10 11 A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . B . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . C . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . D . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Request B Request C Initial Figure 1: Illustration of the 3-server example. Th e server p ositions are giv en in bla ck and the virtual p ositions in grey . w e h a v e the configuration A ( A ), C ( C ), D (7), where the server p ositions are listed fr om left to right with their virtu al p ositions in paren th eses. At the request to B , it b ecomes B ( B ), C (4), D (7). No w, w hen requesting C again, note that virtually , the right-mo s t serv er is closest, b ut the m iddle serv er is actually on C . 2.3 Qualit y Measures In analyzing algorithms for the baby se r v er prob lem, we consider input se- quences I of request p oin ts. An algorithm A , whic h treats such a sequence has s ome cost, whic h is the total d istance mo ved by the t wo servers. This cost is denoted by A ( I ). Since I is of fi nite length, it is clear that there exists an o fflin e a lgorithm with minimal cost. By Opt , we refer to suc h an algorithm and Opt ( I ) denotes the unique minimal cost of pro cessing I . All of th e m easures d escrib ed b elo w can lead to a conclusion as to whic h one of t wo algorithms is b etter. In con trast to the others, Bijecti ve Analysis do es not quantify how m u c h b etter o n e a lgorithm is t h an another. 7 2.3.1 Comp etitive Analysis: In Comp etitiv e Analysis [13, 19, 15], we define an algorithm A to b e c - comp etitiv e if there exists a constan t α suc h that for all input sequences I , A ( I ) ≤ c Opt ( I ) + α . 2.3.2 The Max/Max Rat io: The Max/Max Ratio [4] compares an algorithm’s wo r s t cost for an y sequence of length n to Op t ’s w orst cost for any sequence of length n . Th e Max/Ma x Ratio o f an alg orithm A , w M ( A ), is M ( A ) / M ( Opt ), where M ( A ) = lim su p t →∞ max | I | = t A ( I ) /t. 2.3.3 The Random O rder Ratio: Ken yon [16] defines the Random Order Ratio to b e the w orst ratio obtained o v er all sequ ences I , comparin g the exp ected v alue of an alg orithm , A , with resp ect to a uniform distribution of all p erm utations of I , to th e v alue of Opt on I : lim sup Opt ( I ) →∞ E σ [ A ( σ ( I ))] Opt ( I ) The original con text for this definition is Bin Pac king for which the optimal pac king is the same, regardless o f the order in whic h the items are pr esen ted. Therefore, it do es not mak e sense to tak e an a verag e o ver all p erm u tations for Opt . F or serv er problems, how ever, the ord er of r equests in the sequence ma y ve r y w ell c h ange the co st of Opt , so w e compare to Opt ’s p erformance, also on a random p erm u tation of the inpu t sequence. In addition, taking the limit as Op t ( I ) → ∞ , causes a problem with analyzing Greedy on the bab y serve r problem (and presumably other algorithms for other p roblems), since there is an in finite family of sequences, I n , w here Opt ’s cost on I n is the same constant for all n , bu t Greedy ’s c ost gro ws with n . T h u s, we consider the limit as the length of the sequence goes to infinity , as in another alternativ e d efinition of th e Random Or der R atio in [14]. W e c ho ose to mo dify the Rand om Or der Ratio as shown to the left, bu t for th e results present ed here, the defin ition to the right wo u ld giv e the same: lim sup | I |→∞ E σ [ A ( σ ( I ))] E σ [ Opt ( σ ( I ))] lim sup | I |→∞ E σ A ( σ ( I )) Opt ( σ ( I )) 8 2.3.4 Bijectiv e Analysis and Av erage Analysis: In [1], Bijecti ve and Av erage Analysis are defined, as method s of comparin g t wo online algorithms directly . W e adapt those definitions to the notation used here. As with the Max/Max Ratio and Relativ e W orst Or d er Analysis, the t wo a lgorithms are not necessarily compared on the same sequence. In Bijectiv e Analysis, th e sequ ences of a giv en length are mapp ed, us ing a bijection, onto the same set of sequences. The p erformance of the first algorithm on a sequence, I , is compared to the p erformance of the second algorithm on th e sequence I is mapp ed to. If I n denotes the set of all input sequences of length n , then an online algorithm A is no w orse than an online algorithm B acco r d ing to Bijectiv e Analysis if there exists an in teger n 0 ≥ 1 suc h that for eac h n ≥ n 0 , there is a bijection f : I n → I n satisfying A ( I ) ≤ B ( f ( I )) for eac h I ∈ I n . A is strictly b etter than B if A is no w orse than B , and there is no b ij ection sho wing that B is n o worse than A . Av erage Analysis can b e view ed as a r elaxatio n of Bijectiv e Analysis. An online algorithm A is n o worse than an online algorithm B acco r ding to Av erage Analysis if ther e exists an in teger n 0 ≥ 1 such that for eac h n ≥ n 0 , Σ I ∈ I n A ( I ) ≤ Σ I ∈ I n B ( I ). A is strictly b etter than B if this inequalit y is strict. 2.3.5 Relativ e W orst Order Analysis: Relativ e W orst Ord er An alysis was in tro duced in [6] and extended in [7]. It compares tw o online algorithms d irectly . As with the Max/Max Ratio, it compares tw o algorithms on their worst s equence in the same part of a partition. The partition is based on the Random O rder Ratio, so that the algorithms are compared on sequences ha v in g the same con ten t, but p ossib ly in differen t orders. Definition 3 Let I b e any inpu t sequence, and le t n be t h e length of I . If σ is a p erm utation on n elemen ts, then σ ( I ) denotes I p ermuted by σ . Let A be an y alg orithm . Then A ( I ) is the cost of runn in g A on I , and A W ( I ) = max σ A ( σ ( I )) . ✷ 9 Definition 4 F or an y pair of algorithms A and B , w e define c l ( A , B ) = sup { c | ∃ b : ∀ I : A W ( I ) ≥ c B W ( I ) − b } and c u ( A , B ) = inf { c | ∃ b : ∀ I : A W ( I ) ≤ c B W ( I ) + b } . If c l ( A , B ) ≥ 1 or c u ( A , B ) ≤ 1, the algorithms are said to b e c omp ar able and the R elative Worst O r der R atio WR A , B of algorithm A to algo r ithm B is defined. Otherw ise, W R A , B is undefined. If c l ( A , B ) ≥ 1 , then WR A , B = c u ( A , B ) , and if c u ( A , B ) ≤ 1 , then WR A , B = c l ( A , B ) . If WR A , B < 1 , algorithms A an d B are said to b e c omp ar able in A ’s favor . Similarly , if WR A , B > 1, the algorithms are said to b e c omp ar able in B ’s favor . If at lea st one of the ratios c u ( A , B ) and c u ( B , A ) is finite, then the algorithms A a n d B are ca lled ( c u ( A , B ) , c u ( B , A )) -r elate d . Algorithms A and B are we akly c omp ar able in A ’s favor , 1) if A and B are comparable in A ’s fav or, 2) if c u ( A , B ) is finite an d c u ( B , A ) is in finite, or 3) if c u ( A , B ) ∈ o ( c u ( B , A )). ✷ An informal s ummary , comparing these m easures is give n in T able 1. Note that some details are m issing, including the additiv e constan ts for asymp- totic a n alysis. T able 2 is a su mmary of th e results comparing Ldc and Gree dy on the bab y server p roblem u sing eac h of th e measures defined. Additionally , it lists the effect of laziness applied t o Dc . 3 Comp etitiv e Analysis The k -serv er problem has b een stu died using Comp etitiv e Analysis starting in [17]. In [9], it is sho wn that on the r eal line, the Comp etitiv e Ratios of Dc and Ldc are k , whic h is optimal, and that Gree dy is not co mp etitiv e. The result in [17], sho wing that the Comp etitiv e Ratio of Bal is n − 1 on a m etric sp ace with n p oin ts if k = n − 1, shows that Bal has the same Comp etitiv e Ratio of 2 as Dc and Ldc on the bab y serv er problem. 10 Measure V alue Comp etitiv e Ratio C R A = max I A ( I ) Opt ( I ) Max/Max R atio M R A = max | I | = n A ( I ) max | I ′ | = n Opt ( I ′ ) Random Or d er Ra tio RR A = max I E σ A ( σ ( I )) E σ [ Opt ( σ ( I ))] Relativ e W orst Ord er Ratio W R A , B = max I max σ A ( σ ( I )) max σ ′ B ( σ ′ ( I )) T able 1: Comp arison of those measur es wh ic h giv e a ratio. 4 The Max/Max Ratio In [4], a concrete example is giv en with t wo serv ers and three non-colinear p oints. It is observ ed th at the Max/Max Ratio fa vo r s the greedy algorithm o v er the balance a lgorithm, Bal . Bal b eha v es similarly to Ldc and id en tically on Ldc ’s wo r st case sequences. The fol lowing theorem sho ws that the sa m e co n clus ion is reac h ed when the three p oin ts are on the line. Theorem 1 Greedy is better than Dc and Ldc on th e baby server prob- lem with resp ect to the Max/Max Ratio, with w M ( Dc ) w M Greedy ) = w M ( Ldc ) w M ( Greedy ) = 1 + d − 1 d +1 . Pro of Giv en a sequence of length n , Greedy ’s maximum cost is n , so M ( Greedy ) = 1. Since Opt is at least as go o d as Gre edy , its cost is at most n . Thus, M ( Opt ) ≤ 1. T o ob tain a lo wer b oun d for M ( Opt ), w e consid er requ est sequences consisting of rep etitions of the sequence (( B A ) d C ) k . In eac h s u c h rep etition, Opt must incur a cost of at least 2 d . Thus, w e can b ou n d M ( Opt ) b y M ( Opt ) ≥ 2 d 2 d +1 . W e no w determine M ( Ldc ), and t h e same argumen t holds for M ( Dc ). 11 Measure F a v ored Algorithm Dc vs. Ldc Comp etitiv e Ratio Ldc iden tical Max/Max Ratio Greedy iden tical Random Order Ratio Ldc iden tical Bijectiv e Analysis Greedy Ldc best Av erage Analysis Greedy Ldc best Relativ e W orst Order Ratio Ld c weakly fav ored Ldc best T able 2: The second column summ arizes the results comparing Ldc and Greedy on the baby serv er problem u sing eac h of the measures d efined. In add ition to the information in the column, Greedy is uniqu ely opti- mal according to Bijectiv e and Av erage Analysis, and Ldc and Greedy are (2 , ∞ )-related according to R elativ e W orst O rder Analysis. The th ird column lists which measures d istinguish b et w een Dc and its lazy v ariant, Ldc . F or any p ositiv e intege r n , we define the sequence I n = (( B A ) d B C ) p X of length n , where the le n gth of the alternating A/ B -sequ en ce b efore the C is 2 d + 1, X is a p ossibly emp t y alternating sequence of A s and B s starting with a B , | X | = n mo d (2 d + 2), and p = n −| X | 2 d +2 . First, w e claim that I n is a sequence of l en gth n w h ere Ldc has the la r gest a v erage cost p er mo ve. Eac h mo ve th at the righ t-most serve r , origi n ally on C , make s costs d > 1 and the left-most serv er’s mo ves cost only one. F or ev ery mov e th e r igh t-most serv er mak es from C to B , there are d mo ves b y the left-most serv er fr om A to B an d thus d mo ves bac k fr om B to A . The su bsequence ( B A ) d do es th is with cost one for Ldc for ev ery mov e. Since the m ov e a f ter every C has cost one, it is imp ossib le to define another sequence with a larger a verage co st p er mo v e. If | X | < 2 d + 1, then the serv er on C do es not mo v e again, and Ldc ( s ) = p (2 d + 2 d ) + | X | = n + ( d − 1)( n −| X | ) d +1 . Otherwise, | X | = 2 d + 1, the server on C is mo ve d to B , and we obtain 12 Ldc ( I n ) = p (2 d + 2 d ) + | X | + d − 1 = n + ( d − 1)( n −| X | ) d +1 + d − 1. Since we are taking the supremum, w e restrict our atten tion to sequences where | X | = 0. Thus, M ( Ldc ) = n + ( d − 1) n d +1 n = 1 + d − 1 d +1 Finally , w M ( Greedy ) = M ( Greedy ) M ( Opt ) = 1 M ( Opt ) , while w M ( Ldc ) = M ( Ldc ) M ( Opt ) = 1 + d − 1 d +1 M ( Opt ) . Since M ( Opt ) is b ounded, w M ( Ldc ) w M ( Greedy ) = 1 + d − 1 d +1 , w hic h is greater than one for d > 1. ✷ It follo ws from the pro of of this th eorem that Greedy is close to optimal with resp ect to the Max/Ma x Ratio, since the cost of Gre edy divided b y the co st of Opt tends to ward one for la r ge d . Since Ldc and Dc p erform id en tically on their wo r st sequences of an y given length, they also ha ve the same Ma x/Max Ratio. 5 The Random Order Ratio The Random Order Ratio categorize s Dc and Ldc as b eing equally go o d . The proof is structur ed into seve r al lemmas b elo w. In the follo wing, w e use the term run to mean a sequ ence of the same item in a longer s equ ence, and it is maximal if it cannot b e made longer by includin g a p ossible neigh b oring item. F or example, the three maximal run s of A s in AAAB AAAAB B A ha ve lengths 3, 4, and 1, resp ectiv ely . The Random Or der Ratio is the w orst ratio obtained o ver all sequences, comparing the exp ected v alue of an algorithm o v er all p ermutatio n s of a giv en sequence to th e exp ecte d v alue of Opt o ve r all p erm utations of the giv en sequence. The in tuition in establishing the follo wing result is that if one c h o oses a random p ermuta tion of a sequence with many more A s an d B s than C s, then, with high probabilit y , there w ill b e sufficien tly man y switc hes b et ween requests to A s and B s in b et w een eac h t w o successiv e o ccurrences of C s that b oth Dc and Ldc will exp erience the full p enalt y compared to OPT, i.e., after eac h request to C , they will use one serve r to s erv e requests 13 to b oth A and B b efore ev en tu ally m o ving the server from C to B , where it will sta y unt il the next request to C . The t wo main comp onents in the pro of are the follo win g: First, ev en though w e choose a sequence with man y more A s and B s than C s, we m u st pro ve that with high pr obabilit y , there are enough requests b etw een any t wo C s. If there are j ust a small constant fraction of pairs of successiv e C s that do not ha ve enough A s and B s in b et ween them, w e will not ge t the Random Order Ratio of t w o th at we are tryin g to obtain. Second, ev en th ou gh th er e are man y requests to A s and B s in b et ween t wo consecutive C s, if the A s or B s, resp ectiv ely , app ear as runs to o frequen tly (man y A s in a ro w , follo we d b y man y B s in a ro w), then th ere will not b e sufficien tly man y switches b et ween requests to A s and B s to pu ll a server from C to B . Again, we cannot a fford to ha v e this p r oblem o ccur a constan t fractio n of the times if w e w ant a ratio of t w o. In the pr o of, we c h o ose to u se n requests to A s as well as B s and ⌊ log n ⌋ requests to C s. In add ition, we limit the successiv e r equ ests to A s and B s separately to ⌊ √ n ⌋ with high probabilit y . T h e c hoice of the fun ctions n , log n , and √ n is mostly to wo r k with familiar fu n ctions in the lemmas b elo w. Many other c hoices of functions would w ork, as long as their rates of gro wth are similar. It is not quite sufficien t that they are differen t, since w e also n eed to use, for instance , that √ n log 2 n ∈ o ( n ). W e u se the notatio n [ n ] r , where r ≤ n , for the expression n ( n − 1)( n − 2) · · · ( n − r + 1). The follo w in g r esult is from [8], using the index for the last term of the summation from [2, page 56]. W e h a v e sub stituted in our v ariable names: Prop osition 1 In a rand om p erm u tation of n A s and n B s, the probabilit y that t h e longe st run of A s (or B s) is shorter than r is P ( r ) = 1 − n +1 1 [ n ] r [2 n ] r + n +1 2 [ n ] 2 r [2 n ] 2 r − n +1 3 [ n ] 3 r [2 n ] 3 r + . . . +( − 1) ⌊ n r ⌋ n + 1 n r [ n ] ( ⌊ n r ⌋ r ) [2 n ] ( ⌊ n r ⌋ r ) W e first d eriv e a simple lo w er b oun d on this pr obabilit y . Lemma 1 If r ≥ log n , then in a random p ermuta tion of n A s an d n B s, the probabilit y P ( r ) that the longest run of B s is shorter than r is at least 1 − n +1 2 r . 14 Pro of W e first p ro ve that the absolute v alue of the terms in the exp ression for P ( r ) from Prop osition 1 are n on-increasing. Let 1 ≤ i ≤ n r − 1. W e consider t wo successiv e terms and sho w that the absolute v alue of th e first is at least as large as the absolute v alue of the second, pro vided that r ≥ log n . n +1 i [ n ] ir [2 n ] ir ≥ n +1 i +1 [ n ] ( i +1) r [2 n ] ( i +1) r m n +1 i n ( n − 1) ··· ( n − ir +1) 2 n (2 n − 1) ··· (2 n − ir + 1) ≥ n +1 i +1 n ( n − 1) ··· ( n − ( i +1) r +1) 2 n (2 n − 1) ··· (2 n − ( i +1) r +1) m n +1 i ≥ n +1 i +1 ( n − ir )( n − ir − 1) ··· ( n − ( i +1) r +1) (2 n − ir )(2 n − ir − 1) ··· (2 n − ( i +1) r +1) ⇑ ( n +1)! i !( n +1 − i )! ≥ ( n +1)! ( i +1)!( n − i )! n − ir 2 n − ir ir ⇑ 1 ≥ n − i +1 i +1 1 2 ir m 2 ir ≥ n − i +1 i +1 ⇑ r ≥ log n where the fir st implication follo ws f r om considering the fr actions of corre- sp ond in g factors fr om the numerato r and denominator and c h o osing the largest. Ha ving sho wn t h at the terms are non-increasing, it follo ws that P ( r ) ≥ 1 − n +1 1 [ n ] r [2 n ] r , i.e., dropping all bu t the fi rst t wo term s . Since, for corresp onding factors in [ n ] r and [2 n ] r , we hav e that n − j 2 n − j ≤ 1 2 , w e can conclud e that P ( r ) ≥ 1 − n +1 2 r . ✷ W e can use this lemma to s ho w that switc hes b et ween A s and B s o ccur quite ofte n . Lemma 2 Let I n = A n B n . F or an y ε > 0, there exist s an n 0 suc h that f or all n ≥ n 0 , the probabilit y when selecting a random p erm utation of I n that all m aximal r uns of A s (or B s) ha v e lengths at most ⌊ √ n ⌋ is at least 1 − ε . Pro of By Lemma 1, for any giv en n , the probabilit y is at lea s t 1 − n +1 2 ⌊ √ n ⌋ . Since n + 1 ∈ o (2 √ n ), this pr ob ab ility approac h es one for increasing v alues of n . ✷ 15 No w w e sho w that when ha ving so f ew C s compared to A s an d B s, w e ca n b e almost certa in to find a large n u m b er of A s and B s b et we en t wo succe ss iv e o ccurrences of C s. Lemma 3 F or an y ε > 0, there exists an n 0 suc h that for all n ≥ n 0 , the probabilit y when selecti n g a random p ermutatio n of I n = A n B n C ⌊ log n ⌋ that all maximal run s of A s and B s (lo oking at A s and B s as the same item) ha ve length at l east (2 d + 2) ⌊ √ n ⌋ is at le ast 1 − ε . Pro of W e do n ot distinguish b et we en A s and B s here, so we ju s t use that there are a to tal of 2 n of them, and refer to all o f them as X s. T o compute the probabilit y , w e consider the num b er of w ays the C s can b e placed as dividers int o a sequence of 2 n X s, creating ⌊ log n ⌋ + 1 groups. The standard metho d is to consider 2 n + ⌊ log n ⌋ p ositions and place the C s in ⌊ log n ⌋ of these, whic h can b e d one in 2 n + ⌊ log n ⌋ ⌊ log n ⌋ w ays. Similarly , if w e w ant (2 d + 2) ⌊ √ n ⌋ X s in eac h group, w e ma y reserv e these (2 d + 2) ⌊ √ n ⌋ ( ⌊ log n ⌋ + 1) X s and just consider the division of the remaining X s. Thus, this can b e done in 2 n − (2 d + 2) ⌊ √ n ⌋ ( ⌊ log n ⌋ + 1) + ⌊ log n ⌋ ⌊ log n ⌋ w ays. W e no w find a l ow er b ound o n the probabilit y of there b eing this many A s and B s b et we en C s us in g the ab o ve count in g argumen t: 2 n − (2 d + 2) ⌊ √ n ⌋ ( ⌊ log n ⌋ + 1) + ⌊ log n ⌋ ⌊ log n ⌋ 2 n + ⌊ log n ⌋ ⌊ log n ⌋ = [(2 n − (2 d + 2) ⌊ √ n ⌋ ( ⌊ log n ⌋ + 1) + ⌊ log n ⌋ )] ⌊ log n ⌋ [(2 n + ⌊ log n ⌋ )] ⌊ log n ⌋ ≥ 2 n − (2 d + 2) ⌊ √ n ⌋ ( ⌊ log n ⌋ + 1) + 1 2 n + 1 ⌊ log n ⌋ = 1 − (2 d + 2) ⌊ √ n ⌋ ( ⌊ log n ⌋ + 1) 2 n + 1 ⌊ log n ⌋ where the inequalit y follo ws fr om considering corr esp onding factors in the n u merator a n d denominator, and using the smallest fraction of th ese. 16 Using the binomial theorem, this last e xp ression c an b e writte n ⌊ log n ⌋ X i =0 ⌊ log n ⌋ i − (2 d + 2) ⌊ √ n ⌋ ( ⌊ log n ⌋ + 1) 2 n + 1 i = 1 − ⌊ log n ⌋ (2 d + 2) ⌊ √ n ⌋ ( ⌊ log n ⌋ + 1) 2 n + 1 + T where T cont ains the additional te r ms o f the binomial expansion. W e no w argue that the absolute v alues of successiv e terms in T decrease for large enough n : ⌊ log n ⌋ i (2 d +2) ⌊ √ n ⌋ ( ⌊ log n ⌋ +1) 2 n +1 i > ⌊ log n ⌋ i +1 (2 d +2) ⌊ √ n ⌋ ( ⌊ log n ⌋ +1) 2 n +1 i +1 m [ ⌊ log n ⌋ ] i i ! > [ ⌊ log n ⌋ ] i +1 (2 d +2) ⌊ √ n ⌋ ( ⌊ log n ⌋ +1) ( i +1)!(2 n +1) m 1 > ( ⌊ log n ⌋− i )(2 d +2) ⌊ √ n ⌋ ( ⌊ log n ⌋ +1) ( i +1)(2 n +1) Since √ n log 2 n ∈ o ( n ), this holds when n is sufficien tly la r ge. F or n large enough, this means that T ≥ 0 and the p robabilit y w e are computing will b e b ounded from b elo w b y 1 − ⌊ log n ⌋ (2 d +2) ⌊ √ n ⌋ ( ⌊ log n ⌋ +1) 2 n +1 . Again, since √ n log 2 n ∈ o ( n ), the probabilit y approac hes one as n increases. ✷ With the use of the lemmas ab o v e, w e can establish the th eorem. Theorem 2 Dc an d Ldc both ha v e the Random Ord er Ratio tw o. Pro of The u pp er b ounds follo w dir ectly fr om the fact that their Comp et- itiv e Ratios are tw o. Thus, if that is the factor on worst case sequences, clearly the exp ected ratio cannot b e w orse, since the av erages for these al- gorithms and Opt is ov er the same set of sequences. F or the lo wer, let I n = A n B n C ⌊ log n ⌋ . W e sho w that for any ε > 0, there exists an n 0 so that for n ≥ n 0 , the probabilit y of Dc and Ldc incurring a cost of a factor t wo more than Opt is at least 1 − ε . This immediately implies that the exp ected cost of the t wo algorithms cannot b e smaller, giving u s the result. 17 By Lemma 3, there exists an n ′ so that for all n ≥ n ′ , the probabilit y that all maximal run s of A s and B s hav e length at least (2 d + 2) ⌊ √ n ⌋ is at least 1 − ε 2 . Considering only the A s and B s, b y Lemma 2, there exists an n ′′ so that for all n ≥ n ′′ , the probabilit y that all maximal r uns of A s and B s, resp ectiv ely , ha ve lengths at most ⌊ √ n ⌋ is at least 1 − ε 2 . Th u s, for all n ≥ max { n ′ , n ′′ } , the probabilit y of ha ving b oth prop erties is at least 1 − ε , and we argue that in this ca se, the cost of D c and Ldc are a factor t wo larger than the cost of Opt . Since the num b er of A s and B s b etw een tw o C s is at least (2 d + 2) ⌊ √ n ⌋ and the length of maximal ru n s of A s and B s, resp ectiv ely , is at most ⌊ √ n ⌋ , there must at least 2 d + 2 ru n s in b et ween t wo successive C s, and at least 2 d + 1 runs if w e w an t to count fr om th e first r un of B s. F or b oth algorithms, this is sufficien t for the algorithm to mov e the s erv er from C to B . Dc will hav e b oth servers on B after the d th run of B s h as b een pro cessed, whereas for Ldc , the right- m ost serve r will only virtually b e at B at t h at point, but will b e mo ved there at t h e ( d + 1) st run of B s. F or eac h C , O pt incur s the cost 2 d of m o ving a server from C to B and bac k again, and it incurs cost d after th e last C . The online algorithms hav e the same cost, plus th e additional cost of moving a serve r back and forth b et ween A and B until the serv er fr om C is mo v ed to B . This additional cost consists of 2 d complete mo v es from A to B and bac k. Asymptotically , the requests after the last C can b e ignored, so this giv es the ratio 4 d/ 2 d = 2. ✷ This result, saying th at Ld c and Dc are e qu iv alen t according the Random Order Ratio, is an example of where a coun ter-int u itiv e r esult is clearly due to the in termediate comparison to Opt , b ecause on some of the sequences where Ldc and Dc d o w orst compared to Opt , they do equ ally badly com- pared to Opt . W e illustrate this p r oblem with the intermediate comparison to Opt by sh o wing b elo w ho w a vo idin g this comparison could giv e the result that Ldc is b etter than Dc . If the definition was m o dified in the most straigh tforward manner to allo w direct co mp arison o f algorithms, one w ould first note that for any sequen ce I , E σ [ Dc ( σ ( I ))] ≥ E σ [ Ldc ( σ ( I ))], by the laziness observ ation. Then, one w ould consider some families of sequences with r elativ ely large n umb ers of C s and sho w that Ld c ’s cost is some constant fraction b etter than Dc ’s on random p er mutations of that sequence. 18 F or example, let I = ( C AB C ) n . Whenever t h e subsequence C AB C o ccurs in σ ( I ), Dc mo ves a serv er f r om C tow ard s B and bac k again, while mo ving the other server from A to B . In con tr ast, Ldc lets the serv er on C sta y there, and has cost t wo l ess than Dc . One can sho w that the exp ected num b er of occurr ences of C AB C in σ ( I ) is at least n 16 (an y constan t fr action of n w ould illustrate the p oint) by considering an y of th e p ossible starting lo cations for this p attern, 1 ≤ i ≤ 4 n − 3, an d n oting that the probabilit y that the pattern C AB C b egins there is 1 2 · n 4 n − 1 · n 4 n − 2 · 2 n − 1 4 n − 3 . By the linearit y of exp ectations, the exp ected n umber of o ccurrences of C AB C is ( 1 2 · n 4 n − 1 · n 4 n − 2 · 2 n − 1 4 n − 3 ) · (4 n − 3) = 1 2 · 1 2 · n 2 4 n − 1 ≥ n 16 . The exp ected costs of b oth Opt and Ldc on σ ( I ) are also b ounded ab o ve and b elo w by some constants times n . Thus, Ldc ’s “mo d ifi ed random order ratio” will b e less t h an Dc ’s. It is easie r to co mp are Greed y and Ldc using th e (original) Random Order Ratio, getting a result ve r y similar to that of Comp etitiv e Analysis: Ldc is strictly b etter than Greedy . Theorem 3 Dc an d Ldc are b etter th an Greedy on the bab y serv er prob- lem with regards to the Random Or der Ratio. Pro of As noted in th e pro of of Theorem 2, since the Comp etitiv e Ratios of b oth Dc and Ldc are t w o, th eir Rand om Or der Ratios a re also at most t wo . Consider all p erm u tations of the sequence I n = ( B A ) n 2 . W e consider p o- sitions from 1 through n in these sequences. W e aga in refer to a maximal consecutiv e subsequence consisting e ntirely of either A s or B s as a maximal run . Giv en a sequence con taining h A s and t B s, one can see from wel l known results t h at the exp ected num b er of ma ximal runs is 1 + 2 ht h + t : In [1 2 , Pr ob- lem 28, Chapter 9, Pa ge 24 0], it is stated that the exp ected n u m b er of runs of A s is h ( t +1) h + t , s o th e exp ected num b er of ru ns of B s is t ( h +1) h + t . O ne can see that this holds for A s b y considering th e probabilit y that a run of A s starts at some index i in th e sequence. The probabilit y that it starts at the b eginning of the sequence, at index i = 1, is the probabilit y th at the firs t elemen t is an A , h h + t . The probability that it starts at some index i > 1 is the probabilit y that there is a B at index i − 1 and an A at index i , t h + t · h h + t − 1 . By the linearit y of exp ectatio n s, the exp ected num b er of run s 19 of A s is thus h h + t + P h + t i =2 th ( h + t )( h + t − 1) = h ( t +1) h + t . Ad ding the exp ectations for A s an d B s giv es the result 1 + 2 ht h + t . T h u s, with h = t = n 2 , we get that n 2 + 1 is the exp ected n umb er of ru ns. The c ost of Greed y is equal to the n u m b er of runs if the fi rst run is a run of B s. Otherw ise, the cost is one smaller. Thus, Greedy ’s exp ected cost on a p ermutatio n of I n is n 2 + 1 2 . The cost of Opt for any p ermutatio n of I n is d , since it simply mo v es the serv er fr om C to B on the fir st request to B and has no other cost after that. Th u s, the Random Or der Ratio is n 2 + 1 2 d , wh ich, as n tends to in finit y , is unboun ded. ✷ The same argument sho ws that Bal is b etter than Greedy with resp ect to the Random Ord er Ratio. 6 Bijectiv e Analysis Bijectiv e analysis correctly distinguish es b etw een Dc and Ld c , ind icating that the latter is the b etter algorithm. This follo ws from the follo wing general theorem ab out lazy algorithms, and the fact that there are some sequences where one of Dc ’s serv ers rep eatedly mov es fr om C to wa r ds B , but mo v es back to C b efore ev er reac h ing B , wh ile Ldc ’s serve r sta ys on C . Theorem 4 The lazy version of an y algorithm for th e b ab y serv er pr oblem is at least as go o d as th e original algorithm according to b oth Bijectiv e Analysis and Ave r age Analysis. Pro of By the laziness observ ation, the iden tity function, id , is a b ijection suc h that L A ( I ) ≤ A ( id ( I )) for all sequences I . I f an algorithm is b etter than another algorithm with regards to Bijectiv e Analysis, then it is also b etter with regards to Ave r age Analysis [1]. ✷ W e fir st show that Greed y is at least a s goo d a s an y other lazy algorithm; including Ldc and Bal . Theorem 5 Greedy is at least as go o d as any other lazy algorithm Lazy for th e bab y ser ver p roblem a ccording to B ijectiv e Analysis. 20 Pro of Sin ce Greedy h as cost zero for the sequences consisting of only the p oint A or only the p oin t C and cost one for the p oint B , it is easy to define a bijection f for sequences of length one, suc h that Gree dy ( I ) ≤ Lazy ( f ( I )). Supp ose that for all sequ ences of length k w e ha ve a bijection, f , from Greedy ’s sequences to Lazy ’s se qu ences, suc h that for eac h sequence I of length k , Greedy ( I ) ≤ Lazy ( f ( I )). T o extend this to length k + 1, consider the three sequences formed from a s equ ence I of length k by addin g one of the thr ee requests A , B , or C to the end of I , and th e thr ee sequences formed from f ( I ) by addin g e ach of th ese p oin ts to the end of f ( I ). A t the end of sequence I , Greed y has its t wo servers on differen t p oint s , so tw o of th ese new sequ ences h a ve the same cost for Greedy as on I and one h as cost exactly 1 m ore. Similarly , Lazy h as its t wo serve r s on different p oint s at the end of f ( I ), so tw o of these new sequ en ces ha v e the same cost for Lazy as o n f ( I ) and one has cost either 1 or d more. This immediatel y d efi nes a bijection f ′ for sequences of length k + 1 where Gre edy ( I ) ≤ Lazy ( f ′ ( I )) for all I of length k + 1. ✷ Corollary 1 Greedy is the unique optimal algo r ithm with reg ard s to Bi- jectiv e and Average Analysis. Pro of Note th at the pro of of Theorem 5 sh o ws that Gree dy is strictly b etter than any lazy algorithm wh ic h eve r mo ve s the server a wa y fr om C , so it is b etter than an y other lazy algorithm with regards to Bijectiv e Analysis. By Th eorem 4, it is b etter than any algorithm. Again, since separations with resp ect to Bijectiv e Analysis also h old for Av erage Analysis, the result a lso holds for Av erage Analysis. ✷ According to Bijecti ve Analysis, th er e is also a unique w orst algorithm among compliant serve r algorithms for the baby serv er problem: If p is in b et ween the t wo serv ers, the algorithm mo v es the serv er that is furthest a wa y to the request p oin t. If p is on the same side of b oth servers, th e near- est serv er mo ve s to p . Again, due to the problem form ulation, ties cannot o ccur (and the ser ver on A is nev er mo ve d ). T he p ro of that this algorithm is unique w orst is similar to the pro of of Theorem 5, bu t no w with cost d for every ac tu al mo ve . Lemma 4 If a ≤ b , then there exists a b ijection σ n : { A, B , C } n → { A, B , C } n suc h that a -Ldc ( I ) ≤ b -Ldc ( σ n ( I )) for all sequences I ∈ { A, B , C } n . 21 Pro of W e use the b ijection from th e p ro of of T heorem 5, sho win g that Greedy is the unique best algorithm, but specify the bijection complete ly , as opp osed to allo wing some freedom in d eciding the mappin g in the cases where w e are extending by a request wh er e the algorithms already ha ve a serve r . S u pp ose that the b ijection σ n is already defin ed . Consider a sequence I n of length n and the thr ee p ossib le wa y s , I n A , I n B and I n C , of extending it to length n + 1. Supp ose that a -Ldc has servers on p oints X a , Y a ∈ { A, B , C } after h andling the sequen ce I n , and b -Ldc has serve r s on p oints X b , Y b ∈ { A, B , C } a f ter handling σ n ( I n ). Let Z a b e the p oin t where a -Ldc do es not ha ve a s er ver and Z b the p oin t wher e b -Ldc do es not. T hen σ n +1 ( I n Z a ) is defin ed to b e σ n ( I n ) Z b . In addition, s ince the algorithms are lazy , b oth algorithms ha ve their serv er s on t wo different p oin ts o f the three p ossible, so there must b e at least one p oint P where b oth algorithms ha ve a serve r . Let U a b e the p oin t in { X a , Y a } \ { P } and U b b e the p oin t in { X b , Y b } \ { P } . Th en, σ n +1 ( I n P ) is defined to b e σ n ( I n ) P and σ n +1 ( I n U a ) to b e σ n ( I n ) U b . Consider runnin g a -Ldc on a se qu ence I n and b -Ldc o n σ n ( I n ) sim ultane- ously . T he sequences are clearly constru cted so th at, at any p oint du ring this sim u ltaneous execution, b oth algo r ithms h a v e serv ers m o ving or n either do es. The result follo ws if we can sho w th at b -Ldc mo ve s a wa y from and back to C at least as often as a -Ldc do es. By construction, the tw o sequences, I n and σ n ( I n ), will b e iden tical up to the point wh ere b -Ldc ( and p ossibly a -Ldc ) mo ves a wa y fr om C for th e first time. In the remaining part of the pro of, we argue th at if a -Ldc mo ves a wa y from and back to C , then b -Ldc will also do so b efore a -Ldc can do it again. Thus, the total cost o f b -Ldc will be at least that of a -Ldc . Consider a request causing the slo wer algo r ithm, a -Ldc , to mov e a serve r a wa y fr om C . If b -Ldc also mo ves a serv er a wa y from C at this p oin t, b oth algorithms ha ve their serv ers on A and B , and the tw o sequences con tin ue identic ally unt il the faster algorithm aga in mov es a serv er a w ay from C (b efore or at the same time as the slo wer algorithm do es). If b -Ldc d o es not mo v e a serv er a wa y from C at this p oint , since, b y con- struction, it d o es mak e a mo ve, it mov es a serv er from A to B . Thus, the next time b oth algorithms mo ve a serv er, a -Ldc mov es from B to C and b -Ldc mo ve s from B to A . Th en b oth algorithms ha ve serv ers on A and C . Since a -Ldc has ju st mo ved a serv er to C , w h ereas b -Ldc m u st h a v e made 22 at least one mo ve fr om A to B since it placed a serv er at C , b -Ldc m ust, as the faster algorithm, mak e its next mo v e a wa y from C strictly b efore a -Ldc do es so. In conclusion, the sequen ces will b e id en tical u n til the faster algorithm, b -Ldc , mov es a serv er a wa y from C . ✷ Theorem 6 According to Bijectiv e Analysis and Av erage Analysis, slo wer v ariants of Ldc are b etter than faster v arian ts for the bab y serv er problem. Pro of F ollo ws immediately from Lemma 4 and the d efi nition of the mea- sures. ✷ Th u s, the closer a v ariant of Ldc is to Gre edy , th e b etter Bijectiv e and Av erage Analysis predict that it is. 7 Relativ e W o rst Or der An alysis Similarly to the Random Order Ratio and Biject ive Analysis, Rel ative W orst Order Analysis co r rectly distinguishes betw een Dc and Ldc , indicating that the latter is the b etter algorithm. T his follo ws from the follo win g general theorem ab out lazy algorithms, and the fact that there are some sequences where one of Dc ’s servers rep eatedly mo ves from C tow ard s B , but mo v es bac k to C b efore ever reac hin g B , while Ldc ’s serve r sta ys on C . Let I A denote a w orst ordering of the s equence I for th e algorithm A . Theorem 7 The lazy version of an y algorithm for th e b ab y serv er pr oblem is at least as go o d as the original algorithm according to Relativ e W ors t Order Anal ys is. Pro of By th e laziness observ ation, f or an y request sequ ence I , L A ( I L A ) ≤ A ( I L A ) ≤ A ( I A ). ✷ Theorem 8 Dc ( Ldc ) and Greedy are (2 , ∞ )-related and are th u s wea kly comparable in Dc ’s ( Ldc ’s) fav or for the bab y serv er p roblem according t o Relativ e W orst Order Analysis. Pro of W e w r ite th is pro of for Dc , bu t exactly the same holds for Ldc . First we sho w that c u ( Greedy , Dc ) is unb ounded . Consid er the sequence 23 ( B A ) n 2 . As n tends to infin it y , Greedy ’s cost is unb ounded , wh ereas Dc ’s cost is at most 3 d for any p er mutation. Next w e turn to c u ( Dc , Greedy ). S in ce the Comp etitiv e Ratio of Dc is 2, for an y sequen ce I and some constant b , Dc ( I Dc ) ≤ 2 Opt ( I Dc ) + b ≤ 2 Greedy ( I Dc ) + b ≤ 2 Greedy ( I Greedy ) + b . Thus, c u ( Dc , Greedy ) ≤ 2. F or the lo wer b ound, consider a family of sequences I p = ( B AB A...B C ) p , where the length of the alternating A /B -sequence b efore the C is 2 d + 1. Dc ( I p ) = p (4 d ). A w orst ordering for Greedy alternates A s and B s. Since there is no cost for the C s and the A/B se qu ences start and end with B s, Gree dy ( σ ( I p )) ≤ p (2 d ) + 1 for any p er mutation σ . Then, c u ( Dc , Greedy ) ≥ p (4 d ) p (2 d )+1 . As p go es to infin it y , this app roac hes 2. Th u s, Dc and Gre edy are weakly c omp arable in Dc ’s f a v or. ✷ Recall in the follo wing that for clarit y in th e exp osition, we assume th at a divid es d . By the definition of a -Ldc , a request f or B is serv ed by the righ t-most s erv er if it is within a vir tu al distance of no more than a from B and th e o th er serve r is at A . Thus, wh en the left-most serv er mo ves a n d its virtual mo ve is ov er a distance of l , then the righ t-most server virtually mo ve s a distance al . When the right- most serv er mo v es and its virtual mov e is ov er a d istance of al , then the left-most serv er virtuall y mo v es a distance of l . In the results th at follo w, we fr equen tly lo ok at the worst order in g of an arbitrary sequence. Definition 5 The c anonic al worst or dering of a sequence, I , for an algo- rithm A is the sequ ence pro du ced by a llo w ing the cruel adv ersary (the one whic h alwa ys lets the next requ est b e the uniqu e p oint where A do es not currentl y ha ve a serv er) to choose requests from the multise t defined from I . This pro cess cont inues until th er e a r e no requests remainin g in the m ultiset for the p oint wh ere A do es not ha v e a ser ver. The remaining p oin ts from the multiset are co n catenated to the end of this n ew request sequence in an y order. ✷ The c anon ical w ors t ordering of a sequence for a -Ldc is as f ollo w s. 24 Prop osition 2 Consider an arbitrary sequence I con taining n A A s, n B B s, and n C C s . A canonical w orst ord ering of I f or a -Ldc is I a = ( B AB A...B C ) p a X, where the length of the alternating A/B -sequence b efore the C is 2 d a + 1 (recall that we assume that d a is in tegral). Here, X is a p ossibly empt y sequence. The first part of X is an alternating sequen ce of A s and B s, starting with a B , until there are not b oth A s a n d B s left. Th en w e con tin u e with a ll remaining A s or B s , follo wed b y a ll remaining C s. Finally , p a = min ($ n A d a % , $ n B d a + 1 % , n C ) . Lemma 5 Let I a b e the canonical w orst ordering of I for a -Ldc . I a is a w orst p ermutatio n of I for a -Ldc , and th e cost for a -Ldc on I a is c a , where p a (2 d a + 2 d ) ≤ c a ≤ p a (2 d a + 2 d ) + 2 d a + d . Pro of Consider a requ est sequence, I . Bet ween an y t wo mov es fr om B to C , th ere must hav e b een a mov e from C to B . C on s ider one su c h mo ve. Bet w een the last r equ est to C and this mov e, the other server must mo ve from A to B exactly d a times, whic h requires some fir st request to B in this sub sequence, follo w ed by at least d a o ccurrences of r equests to A , eac h follo w ed by a r equest to B , the last one causing the mo ve f rom C to B . (Clearly , ext r a requests to A o r B could also o ccur, e ither causing mo v es or not.) Thus, for ev ery mo v e from B to C , there m ust b e at least d a + 1 B s, d a A s and one C . Thus, the num b er of mo v es from B to C is b ounded from ab o ve b y p a . There can b e at most one m ore mo ve from C to B t h an from B to C . If such a mo ve occurs, there are no more C s after th at in the sequence. Therefore, the sequences defined ab o v e giv e the m aximal num b er of mo ves of distance d p ossible. More A s or B s in any alternating A/B -sequence would not cause ad d itional mov es (of either d istance one or d ), since eac h extra p oint requested w ould already ha v e a serv er. F ewer A s or B s b et w een t wo C s w ould eliminate the mo ve a wa y from C b efore it wa s requested again. Th u s, th e canonical w orst ordering is a worst ord ering of I . Within eac h of the p a rep etitions o f ( B AB A...B C ), e ach of the r equ ests for A and all but the last request for B cause a mo ve of distance one, and the last t w o r equests eac h cause a mo v e of distance d , giving the lo w er b ound on c a . Within X , eac h of the firs t 2 d a requests could p ossibly cause a mo ve 25 of distance one, and this could b e follo wed by a mo v e of d istance d . After that, no more mo ves o ccur. Thus, adding costs to the lo wer b ound giv es the upp er b oun d on c a . ✷ Theorem 9 If a ≤ b , then a -Ldc and b -Ldc are 1+ 1 a 1+ 1 b , b +1 a +1 -related for the bab y se r v er problem ac cordin g to Relativ e W orst Order Analysis. Pro of By Lemma 5, in considering a -Ldc ’s p erformance in comparison with b -Ldc ’s, th e asymptotic ratio dep end s only on the v alues p a and p b defined f or the canonical w ors t orderings I a and I b for a -Ldc and b -Ldc , resp ectiv ely . Sin ce a ≤ b , the largest v alue of p a p b o ccurs when p a = n C , since more C s w ould allo w more mo v es of distance d b y b -Ldc . Since the con tribution of X to a -Ldc ’s cost can b e considered to b e a constan t, w e ma y assume that n A = n C d a and n B = n C d a + 1 . When considering b -Ldc ’s canonica l w ors t ordering of this sequence, all the C s will b e u sed in the initial part. By Lemma 5 , w e obtain the f ollo w ing ratio, for some constan t c : (2 d a + 2 d ) n C (2 d b + 2 d ) n C + c = ( 1 a + 1) n C ( 1 b + 1) n C + c 2 d Similarly , a sequence giving the largest v alue o f p b p a will ha ve p b = n A d b , since more A s would allo w a -Ldc to ha v e a larger p a . Since the con tribution of X to b -Ldc ca n b e considered to b e a constan t, we ma y assume that n A = n C d b , n B = n C d b + 1 , and p b = n C . No w, when considerin g a -Ldc ’s w orst p erm utation of this sequence, th e n u m b er of p eriod s, p a , is restrict ed b y the n umb er of A s. S ince eac h p erio d has d a A s, p a = n A d a = n C d b d a . After this, there are a constant n umber of A s remaining, giving rise to a constant add itional cost c ′ . Th u s, th e ratio is th e fol lowing: (2 d b + 2 d ) n C (2 d a + 2 d ) n C a b + c ′ = ( 1 b + 1) n C ( 1 a + 1) n C a b + c ′ 2 d = (1 + b ) n C (1 + a ) n C + c ′′ , for some constan t c ′′ . Considering the tw o ratios relating b -Ldc ’s and a -Ldc ’s w orst p erm utations asymptotically as n C go es to infinit y , w e obtain that a - Ld c and b -Ldc are 1+ 1 a 1+ 1 b , b +1 a +1 -related. ✷ 26 Although with the original definition of relatedness in Relativ e W ors t Order Analysis, the v alues are not interpreted further, one could use the co n cept of b etter p erformanc e (see [11]) from Relativ e In terv al Analysis to co mp are t wo algorithms using Relativ e W orst Order Analysis. Using the previous result, w e sh o w th at Ldc has b etter p erf ormance than b -Ldc for b 6 = 1. Again, for clarit y , we consider in tegral ca s es in the follo wing result. Theorem 10 Consider the b ab y server p roblem ev aluated according to Rel- ativ e W orst Ord er Analysis. F or b > 1 s u c h that d b is integ ral, Ldc and b -Ldc are ( r , r b )-related for some r and r b where 1 < r < r b . F or a < 1 suc h that 1 a is int egral, a -Ldc and Ldc are ( r a , r )-related for some r a and r where 1 < r < r a . Pro of By Theorem 9, a -Ldc and b -Ldc are 1+ 1 a 1+ 1 b , b +1 a +1 -related. T o see th at 1+ 1 a 1+ 1 b < b +1 a +1 when 1 = a < b , note that this holds if and on ly if (1 + 1 a )( a + 1) = 4 < (1 + 1 b )( b + 1), whic h clea r ly holds f or b > 1. Hence, if Ldc a n d b -L d c are ( c 1 , c 2 )-related, then c 1 < c 2 . T o see th at 1+ 1 a 1+ 1 b > b +1 a +1 when a < b = 1, note that this h olds if and only if (1 + 1 a )( a + 1) > 4 = (1 + 1 b )( b + 1). Th is clearly holds for a < 1. T h u s, a -Ldc and Ldc a r e ( c 1 , c 2 )-related, where c 1 > c 2 . ✷ The a lgorithms a -Ldc and 1 a -Ldc are in some sense of equal qualit y : Corollary 2 If 1 a and d b are in tegral and b = 1 a , then a -Ldc and b -Ldc are ( b, b )-related Theorem 10 sho ws that Ldc is in some sense optimal among the a -Ldc algorithms. W e now set out to pro ve that Ldc is an optimal algorithm in the follo wing sense: there is n o other algorithm A such that Ldc and A are c omp arable and A is strictly b etter or suc h that Ldc and A are w eakly comparable in A ’s fa v or. Theorem 11 Ldc is optimal for the bab y serve r problem according to Rel- ativ e W orst Order Analysis. Pro of In ord er fo r Ldc and A to b e comparable in A ’s fav or, A has to b e comparable to Ldc and p erf orm more than an additive co n stan t b etter on some infinite family of sequences. 27 Assume that there e xists a family of sequences S 1 , S 2 , . . . such that for an y p ositiv e c there exists an i such that Ldc W ( S i ) ≥ A W ( S i ) + c . T h en we pro ve that there exists a n other family of sequences S ′ 1 , S ′ 2 , . . . such that f or an y p ositiv e c ′ there exists an i such that A W ( S ′ i ) ≥ Ldc W ( S ′ i ) + c ′ . This establishes that if A p erforms more than a constant b etter on its worst p ermutatio n s of some family of sequences than Ldc do es on its w orst p er- m utations, then there exists a family w here Ldc has a similar adv ant age o v er A , whic h implies th at the algorithms are not comparable. No w assume that w e are giv en a constan t c . Since w e must find a v alue greater than an y constant to establish the result, we may assume w ithout loss of generalit y that c is large enough that 3 dc ≥ 3 d +1 d − 1 (3 d ) + 3 d . Consider a sequence S from the family S 1 , S 2 , . . . such th at Ldc W ( S ) ≥ A W ( S ) + 3 dc . F rom S w e create a member S ′ of the fa m ily S ′ 1 , S ′ 2 , . . . suc h that A W ( S ′ ) ≥ Ldc W ( S ′ ) + c . The idea b ehind the construction is to ha ve th e cruel adv ersary against A c ho ose requests f r om the multise t defined fr om S as in the definition of canonical w orst orderin gs. This pro cess con tinues un til the cruel adv ers ary has used all of either the A s, B s, or C s in the multi s et, resulting in a sequence S ′ . If th e remaining requests f rom the m ultiset are concatenated to S ′ in an y ord er, this creates a p erm u tation of S . The p erf orm ance of A on this p erm utation must b e at least as go o d as its p erform ance on its w orst ordering o f S . W e no w consider the p erformance o f Ldc and A on S ′ and sho w that Ldc is strictly b etter. Let n ′ A , n ′ B , and n ′ C denote the n umber of A s, B s, and C s in S ′ , resp ectiv ely . Let p = min nj n ′ A d k , j n ′ B d +1 k , n ′ C o . By Lemma 5, the cost of Ldc on its canonical worst ord er in g of S ′ is at most p (4 d ) + 3 d . The cost of A is 2 dn ′ C + n ′ A + n ′ B − n ′ C , since ev ery time there is a request for C , this is b ecause a serv er in th e step b efore mo ved a wa y from C . These t wo mov es com bin ed ha v e a cost of 2 d . Every request to an A or a B h as cost one, except f or the request to B immediately follo wed b y a request to C , whic h h as already b een coun ted in the 2 dn ′ C term. A similar argumen t sho ws that Ldc ’s cost is boun ded from abov e by the same term. Assume first that n ′ A d = n ′ B d +1 = n ′ C . Then S ′ can b e p er muted so that it is a prefix of Ldc ’s canonical w orst ordering o n S (see Lemma 5 with a = 1). 28 Since, b y construction, we h a ve r un out of either A s, B s, or C s (that is, one type is missing from S minus S ′ as m u ltisets), Ldc ’s cost on its worst ordering of S is at most its cost on its w orst ordering on S ′ plus 3 d . Thus, Ldc W ( S ) ≥ A W ( S ) + c do es not h old in this case, so w e ma y assume that these v alues are not all equal. W e compare Ldc ’s canonical worst orderings of S and S ′ . F or b oth se- quences, the form is as in Lemma 5, with a = 1. Thus, for S ′ the form is (( B A ) d B C ) p X , and for S , it is (( B A ) d B C ) p + l Y f or some nonnegativ e in teger l . Th e sequence X m u st con tain all of the A s, all of the B s or all of the C s con tained in (( B A ) d B C ) l , since a fter this the cruel adversary has run out of something. Th us, it m us t contai n at least l d A s, l ( d + 1) B s or l C s. The extra cost that Ldc h as o ver A on S is at most its cost on (( B A ) d B C ) l Y minus cost ld for the A s, B s or C s con tained in X , so at most l (2 d + 2 d ) + 3 d − ld = 3 dl + 3 d . Thus, Ldc W ( S ) − A W ( S ) ≤ 3 dl + 3 d . Since we could assume that not all o f n ′ A d , n ′ B d +1 , and n ′ C w ere equal, we ha ve the follo wing cases: Case n ′ A > d p : Ldc ’s cost on S ′ is at most the cost of A min u s ( n ′ A − dp ) plus 3 d . Case n ′ B > ( d + 1) p : Ld c ’s cost on S ′ is at most th e cost of A minus ( n ′ B − ( d + 1) p ) plus 3 d . Case n ′ C > p : Ld c ’s cost on S ′ is at most the co st of A min u s (2 d − 1)( n ′ C − p ) plus 1. Th u s, A W ( S ′ ) − Ldc W ( S ′ ) ≥ dl − 3 d . F rom the c hoice of c , the definition of the S i family , and the b ound on the difference b etw een the t wo algorithms on S , w e find that 3 d + 1 d − 1 (3 d ) + 3 d ≤ 3 dc ≤ Ldc W ( S ) − A W ( S ) ≤ 3 dl + 3 d Th u s, l ≥ 3 d +1 d − 1 , wh ic h implies the follo wing: l ≥ 3 d + 1 d − 1 ⇔ l d − 3 d ≥ l + 1 ⇔ ld − 3 d ≥ 3 dl + 3 d 3 d No w, A W ( S ′ ) − Ldc W ( S ′ ) ≥ l d − 3 d ≥ 3 dl + 3 d 3 d ≥ 3 dc 3 d = c. Finally , to sho w that Ldc and A are not w eakly comparable in A ’s fa vo r, w e sho w th at c u ( Ldc , A ) is b ounded . Since th e Comp etitiv e Ratio of Ldc 29 is 2, for any algorithm A and an y sequence I , there is a constan t b s uc h that Ldc ( I Ldc ) ≤ 2 Opt ( I Ldc ) + b ≤ 2 A ( I Ldc ) + b ≤ 2 A ( I A ) + b . Th u s, c u ( Ldc , A ) ≤ 2. ✷ Considering the request sequ ence as constructed b y the cruel adv ersary against some algorithm A , it consists of a fir st part, where the cru el ad- v ersary kee p s requesting uno ccupied p oin ts, and a second part whic h are all remaining requ ests. Th e p ro of of optimalit y dep ends on Ldc p erforming as w ell as any alg orithm on the first part, and ha ving constant cost on the second part. Since the first part consists of sub s equences where A at some p oint has a serv er pulled aw ay from C and then right back again, it is ea sy to see that if the distribu tion of A s, B s, and C s in those sub sequences is differen t from th e distr ib ution in a canonical worst ordering for Ldc , Ldc will simply do b etter. On the second part, if ther e are only requests to t wo p oints, Ldc will hav e its t wo servers on those tw o p oints p ermanent ly afte r a cost of at most 3 d . Thus, similar pr o ofs will sh ow that a -Ldc and Bal are a lso optimal algo rith m s, whereas Greedy is not. In the definitions of Ldc and Bal giv en in Section 2, differen t decisions are made as to whic h server to use in ca ses of ties. In Ldc the server whic h is really closer is mo v ed in the case of a tie (with regard to virtual distances from the p oin t requested). T he rationale b ehind this is that the serv er whic h w ould ha ve the least cost is mo v ed . In Ba l the server which is further a wa y is mo v ed to the p oin t. Th e rati onale b ehind th is is that, since d > 1, when there is a tie, the total cost for the closer serv er is already significantly higher than the total cost for the other, so moving the serv er whic h is further a wa y ev ens out ho w m uch total cost they ha v e. With these tie-breaking d ecisions, the t wo a lgorithms b ehav e v ery similarly . Theorem 12 Ldc and Bal are equiv alen t for the b ab y serv er p roblem according to Relativ e W orst Order An alysis. Pro of Consider any request sequ en ce I . Ldc ’s canonical wo r s t orderin g has a prefix of the form (( B A ) d B C ) k , while Bal ’s canonical w orst orderin g has a prefix of the form ( B A ) ⌊ d 2 ⌋ B C (( B A ) d B C ) k ′ , suc h that the remainin g parts ha v e constan t costs. These prefixes of Ldc ’s and Bal ’s canonical wo rs t orderin gs of I are iden tical, except f or the con- stan t cost sequence that Bal starts with. This also le ads to a small constan t 30 cost difference at the end. Th u s, their p erf ormance on their resp ectiv e worst orderings will b e identi cal up to an additiv e co n stan t. ✷ 8 Concluding Remarks The pu rp ose of qualit y measures is to give information for use in p ractice, to c h o ose the b est algorithm for a particular application. What prop erties should suc h qualit y measures ha ve? First, it ma y b e desirable that if o n e algorithm do es at least as w ell as an- other on ev ery sequence, then the measure decides in fav or of the b etter algorithm. This is esp ecially desirable if the b etter algo r ithm do es signifi- can tly b etter on imp ortan t sequences. Bijectiv e Analysis and Relativ e W orst Order Analysis hav e this prop erty , but Comp etitiv e Analysis, the Max/Max Ratio, and the Random Order Ratio do not. This w as see n here in the lazy vs. non-lazy v ersion of Double Co v erage f or the b ab y server prob lem (and the more general metric k -server p roblem). Similar results ha ve b een p re- sen ted previously f or the paging problem—LRU vs. FWF and lo ok-ahead vs. no lo ok-ahead. See [7] for these results under Relativ e W orst Order Analysis and [1] for Bijectiv e Analysis. It app ears that analysis tec hniques that a v oid a c omp arison to Opt ha ve a n adv anta ge in this resp ect. Secondly , it ma y b e desirable that, if one algorithm do es unb ounded ly worse than another on some imp ortan t familie s of sequences, th e qualit y measure reflects this. F or the bab y serv er problem, Gree dy is u n b oundedly w orse than Ldc on all families of sequences whic h consist mainly of alternating requests to the closest tw o p oint s. This is reflected in C omp etitiv e Analysis, the Random Order Ratio , and Relativ e W ors t Order Analysis, bu t not by the Ma x/Max Ratio or Bijectiv e An alysis. Similarly , according to Bijectiv e Analysis, LIF O and LR U are equiv alent for paging, bu t L R U is often signif- ican tly b etter than LIF O, whic h ke eps the first k − 1 pages it sees in cac he forev er. In b oth of these cases, Relativ e W orst Ord er Analysis sa ys th at the algorithms are w eakly comparable in fa vor of the “better” algo r ithm. Another desirable pr op ert y w ould b e ease of computation for many differen t problems, as with Comp etitiv e Analysis and Rela tive W orst Or d er Analysis. It is not clea r that the Random O rder Ratio or B ijectiv e Analysis h a ve this prop erty . In this pap er, w e hav e initiated a systematic comparison of qualit y measur es for online algorithms. W e h op e this w ill ins p ire researc hers to sim ilarly 31 in vesti gate a range of online problems to enable the communit y to dr a w stronger co n clusions on the relat ive strengths of the different measur es. Ac kno wledgemen ts The authors would like to thank Christian Kud ahl for ca lling their atten tion to t wo ov ersights in a previous v ersion of this pap er, one in the definition of the lazy v ersion of an algorithm, and another in th e mo d ified definition of the Random Ord er Ratio. References [1] Spyros Angelopoulos, Reza Dorrigiv, and Alejand r o L´ op ez-Ortiz. On the separation and equiv alence of pagi n g strategies. In 18th A CM- SIAM Symp osium on Discr ete Algorithm s , pages 229– 237, 2007. [2] N. Balakrishnan and Markos V. Koutras. Runs and Sc ans with Appli- c ations . John W iley & S ons, Inc., 2002. [3] W olfgang W. Bein, Kazuo Iwa ma, and Jun Ka wahara. R an d omized comp etitiv e analysis for t wo-serv er p roblems. I n 16th Annual Eur op e an Symp osium on Al gorithms , v olume 5193 of L e ctur e Notes in Computer Scienc e , pages 161–172. Springer, 200 8. [4] Shai Ben-Da vid and Allan Boro din. A new measur e for th e study of on-line a lgorithms. Algorithmic a , 11(1):73 –91, 1994. [5] Allan Boro d in and Ran El-Y aniv. Online Computation and Comp e titive Ana lysis . Cam br idge Univ ersity Press, 1998 . [6] Joan Bo ya r and Lene M. F avrholdt. The relativ e wo r st order ratio for on-line algorithms. ACM T r ansactions on Algorithms , 3(2), 2007. Article No . 22. [7] Joan Bo yar, Lene M. F avrholdt, and Kim S. Larsen. T he relativ e worst order r atio applied to p aging. Journal of Computer and System Sci- enc es , 73(5):8 18–843, 200 7. [8] E. J. Burr and Gwenda Cane. Longest run of consecutiv e observ atons ha ving a specified attribute. B iometrika , 48 (3/4):461– 465, 1961. 32 [9] Marek C hrobak, Ho w ard J . K arloff, T. H. P a y n e, and S undar Vish- w anathan. New results o n serv er pr oblems. SIAM Journal on Discr ete Mathematics , 4( 2):172–181 , 1991. [10] Reza Dorrigiv and Alejandr o L´ op ez-Ortiz. A survey of p erformance measures fo r on-line al gorithms. SIGACT News , 36(3):67–8 1, 2005. [11] Reza Dorrigiv, Alejandro L´ op ez-Ortiz, and J. Ian Munro. On the rel- ativ e dominance of paging algo r ithms. The or etic al Computer Scienc e , 410(3 8–40):3694–3701, 200 9. [12] William F eller. An Intr o duction to Pr ob ability The ory and Its A ppli- c ations , v olume 1. John Wiley & S ons, Inc., New Y ork, 3rd edition, 1968. [13] R. L. Graham. Bound s for certain m u ltipro cessing anomalies. Bel l Systems T e chnic al Journal , 45:1 563–1581, 1966. [14] Edward G. Coffman Jr., J´ anos Csirik, L a jos R´ ony ai, and Am br us Zsb´ an. Rand om-order bin pac king. Discr ete Applie d Mathematics , 156(1 4):2810–2816, 200 8. [15] Anna R. Karlin, Mark S. Manasse, Larry Ru dolph, and Daniel D. Sleator. Comp etitiv e sno opy cac hing. Algorithm ic a , 3:79–1 19, 198 8. [16] Claire Ken yon. Best-fit bin-p ac king with random ord er. In 7th Annual ACM-SIAM Sy mp osium on Discr ete Algorithms , pages 359– 364, 1996. [17] Mark S. Manasse, Lyle A. McGeoc h, and Daniel Dominic S leator. Com- p etitiv e algorithms for on-line problems. In 20th Annual ACM Symp o- sium on the The ory of Computing , page s 322–333 , 198 8. [18] Mark S. Manasse, Lyle A. McGeo c h, and Daniel Dominic Sleator. Comp etitiv e algorithms for serve r problems. Journal of A lgorithms , 11(2): 208–230, 199 0. [19] Daniel D. S leator and Rob er t E . T arjan. Am ortized efficiency of list up d ate and paging rules. Communic ations of the A CM , 28(2 ):202–208, 1985. 33
Original Paper
Loading high-quality paper...
Comments & Academic Discussion
Loading comments...
Leave a Comment