Exact distributional analysis of online algorithms with lookahead
Abstract
EconStor is a publication server for scholarly economic literature, provided as a non-commercial public service by the ZBW.
Full text
Dunke, Fabian; Nickel, Stefan Article — Published Version Exact distributional analysis of online algorithms with lookahead 4OR Provided in Cooperation with: Springer Nature Suggested Citation: Dunke, Fabian; Nickel, Stefan (2020) : Exact distributional analysis of online algorithms with lookahead, 4OR, ISSN 1614-2411, Springer, Berlin, Heidelberg, Vol. 19, Iss. 2, pp. 199-233, https://doi.org/10.1007/s10288-020-00442-1 This Version is available at: https://hdl.handle.net/10419/288429 Standard-Nutzungsbedingungen: Die Dokumente auf EconStor dürfen zu eigenen wissenschaftlichen Zwecken und zum Privatgebrauch gespeichert und kopiert werden. Sie dürfen die Dokumente nicht für öffentliche oder kommerzielle Zwecke vervielfältigen, öffentlich ausstellen, öffentlich zugänglich machen, vertreiben oder anderweitig nutzen. Sofern die Verfasser die Dokumente unter Open-Content-Lizenzen (insbesondere CC-Lizenzen) zur Verfügung gestellt haben sollten, gelten abweichend von diesen Nutzungsbedingungen die in der dort genannten Lizenz gewährten Nutzungsrechte. Terms of use: Documents in EconStor may be saved and copied for your personal and scholarly purposes. You are not to copy documents for public or commercial purposes, to exhibit the documents publicly, to make them publicly available on the internet, or to distribute or otherwise use the documents in public. If the documents have been made available under an Open Content Licence (especially Creative Commons Licences), you may exercise further usage rights as specified in the indicated licence. https://creativecommons.org/licenses/by/4.0/
4OR https://doi.org/10.1007/s10288-020-00442-1 RESEARCH PAPER Exact distributional analysis of online algorithms with lookahead Fabian Dunke1·Stefan Nickel1 Received: 2 July 2019 / Revised: 20 April 2020 © The Author(s) 2020, corrected publication 2021 Abstract In online optimization, input data is revealed sequentially. Optimization problems in practice often exhibit this type of information disclosure as opposed to standard offline optimization where all information is known in advance. We analyze the performance of algorithms for online optimization with lookahead using a holistic distributional approach. To this end, we first introduce the performance measurement method of counting distribution functions. Then, we derive analytical expressions for the counting distribution functions of the objective value and the performance ratio in elementary cases of the online bin packing and the online traveling salesman problem. For bin packing, we also establish a relation between algorithm processing and the Catalan numbers. The paper shows that an exact analysis is strongly interconnected to the combinatorial structure of the problem and algorithm under consideration. Results further indicate that the value of lookahead heavily relies on the problem itself. The analysis also shows that exact distributional analysis could be used in order to discover key effects and identify related root causes in relatively simple problem settings. These insights can then be transferred to the analysis of more complex settings where the introduced performance measurement approach has to be used on an approximative basis (e.g., in a simulation-based optimization). Keywords Online optimization ·Lookahead ·Distributional analysis ·Algorithm analysis Mathematics Subject Classification 05 BFabian Dunke [email protected] Stefan Nickel [email protected] 1Institute of Operations Research, Discrete Optimization and Logistics, Karlsruhe Institute of Technology, Kaiserstr. 12, 76131 Karlsruhe, Germany 123
F. Dunke, S. Nickel 1 Introduction Online optimization with lookahead deals with sequential decision making under incomplete information where each decision must be made based on a limited, but certain preview (lookahead) of future input data. In many applications, this optimization paradigm provides a better view of a decision maker’s informational state than pure offline and online optimization since not all may be known about the future, but information concerning the near future may be available. The input of an online optimization problem – both with and without lookahead – consists of a sequence σ=(σ1,σ 2,...,σ n)of input elements σ1,σ 2,...,σ n. One of the most prominent lookahead types is request lookahead where a new input element is revealed only when an old one has just been served (Allulli et al. 2008; Tinkl 2011). Under request lookahead of size l∈N, an algorithm has access to a fixed number lof unserved input elements (or to all of the remaining unserved input elements if there are less than lof them). The first of these input elements would also be known in the pure online situation, but the remaining l−1 input elements are known only due to the lookahead capability. If an algorithm is allowed to process the known input elements in an arbitrary order, this type of lookahead corresponds to a buffer of size lwhere input elements can be reordered for subsequent processing. In stricter settings of online optimization with lookahead, buffers may be forbidden requiring to process input elements in the given order. In this paper, we will consider online optimization with lookahead where lookahead allows for buffering. An overview on various lookahead concepts throughout different applications can be found in Dunke (2014). Note that for l=1, we obtain the setting without lookahead. Request lookahead construes the lookahead set as dependent on the processing statuses of the input elements and not in an independent process of release. There are other types of lookahead, e.g., time or property lookahead (Dunke 2014). Basic online problems have been studied in the framework of competitive analysis (Borodin and El-Yaniv 1998; Fiat and Woeginger 1998): Algorithms for an online optimization problem have to compete with an optimal offline algorithm which knows the whole input in advance, and quality guarantees have to hold for all possible input sequences. Hence, competitive analysis is a worst-case analysis; results are overly pessimistic and do not reflect an algorithm’s practical abilities (Dorrigiv 2010;Fiat and Woeginger 1998). We conclude that more comprehensive analysis methods are required to display an algorithm’s overall behavior in a way supportive for decision makers in applications. Advances in information technologies such as RFID, GPS, or GIS enable decision makers nowadays to obtain certain information about the near future. This information could be used algorithmically as a lookahead. However, lookahead is often still only considered an add-on to online optimization. The intermediate setting of lookahead has been addressed sporadically for a competitive analysis in the following areas: Routing and transportation (Allulli et al. 2008; Jaillet and Wagner 2006; Tinkl 2011), scheduling (Li et al. 2009; Mandelbaum and Shabtay 2011; Zheng et al. 2013), organization of data structures (Albers 1997,1998; Breslauer 1998; Young 1991), data transfer (Imreh and Németh 2007), packing (Grove 1995), and metrical task systems (Ben-David and Borodin 1994; Koutsoupias and Papadimitriou 2000). 123
Exact distributional analysis of online algorithms with… In this paper, we theoretically investigate what can be achieved through lookahead relative to the pure online case without lookahead. Since the choice of the right algorithm is most crucial to overall system performance, we assess algorithm performance with respect to practical needs. The following results and contributions are obtained in the paper: An exact distributional analysis is carried out for basic settings in two important classes of online problems (packing and routing). The analysis provides a holistic view of the performance of online algorithms; in particular, it yields considerably more information than conventional competitive analysis. To the best of our knowledge, such a comprehensive analysis has not been accomplished before in online optimization. Through our derivations, concrete explanations for observable lookahead effects in the classes of packing and routing problems are found which relate to the combinatorial structure of the problem settings. We also recognize that the human limits of grasping the combinatorial structure are likely to be reached soon when more complex settings need to be analyzed. Nonetheless, the validity of the methodological approach shown in this paper provides motivation to pursue this type of performance analysis on a sampling basis in more complex settings. The remainder of the paper is organized as follows: In Sect. 2, we present a holistic distributional approach to performance measurement which allows comparing algorithms with different lookahead regimes to each other. Sections 3and 4validate the method in a theoretical analysis of the bin packing and traveling salesman problem. Exact analysis is possible because the implications of lookahead on the objective can be traced back to a combinatorial structure. We are aware that the considered problem settings are fairly simple. Yet, the performance analysis becomes quite involved. However, in the given problem settings we gain insight into why algorithms may substantially profit from additional information (in the case of the traveling salesman problem) or why not (in the case of bin packing). For more complex settings, the introduced approach of performance measurement is recommended to be used on an approximative basis (e.g., in a simulation-based optimization as carried out in Dunke 2014). The paper ends with a conclusion in Sect. 5. 2 Performance measurement in online optimization with lookahead There are many perspectives on assessing algorithm performance: Worst-case analysis gives strong guarantees, but lacks in displaying the overall behavior. Averagecase analysis addresses the overall behavior, but requires distributions on instances. Distributional analysis illustrates the whole performance spectrum and submits a finegrained quality image. We first give an overview of existing performance measures which are related to our approach in Sect. 2.2. We denote an optimal offline algorithm which knows σin advance by Opt and the set of all input sequences by ; the cost of an algorithm Alg on input sequence σis denoted by Alg[σ]. The discussion is restricted to minimization. 123
F. Dunke, S. Nickel 2.1 Literature review Competitive analysis (Borodin and El-Yaniv 1998; Johnson 1973; Karlin et al. 1988; Sleator and Tarjan 1985) has become the standard for measuring the performance of online algorithms. Alg is called c-competitive if there is a constant asuch that Alg[σ]≤c·Opt[σ]+afor all σ∈. The competitive ratio cr of Alg is the greatest lower bound over all csuch that Alg is c-competitive, i.e., cr=inf{c≥1|Alg is c-competitive}.ItstateshowmuchAlg deviates from Opt due to missing information in the worst case. However, there are notable disadvantages of the competitive ratio (Dorrigiv 2010; Fiat and Woeginger 1998): First, results are overly pessimistic because single worst-case instances, often pathologically construed, decide upon algorithm quality, and also competing with an omniscient offline algorithm may be irrelevant in practice. Second, competitive analysis is oblivious to overall algorithm behavior since performance is reduced to a single, worst-case-related figure; this makes discriminating algorithms with the same worst case, but different average case impossible. Third, a direct comparison between two algorithms is impossible. And fourth, the method often fails to reproduce the beneficial impact of lookahead. Comparative analysis (Koutsoupias and Papadimitriou 2000) differs from competitive analysis as it relates the best objective value of a class of algorithm candidates to that of another class of algorithm candidates which are weaker than Opt, but stronger than those in the first class. Let A,Bbe algorithm classes where Bis more powerful than A, e.g., due to lookahead, then the comparative ratio is ccomp r:= max B∈Bmin A∈Amax σ∈ A[σ] B[σ]. To maximize ccomp r,Bchooses candidate B, whereupon Aanswers with A, whereupon Bchooses the worst instance σ∈for A. Comparing algorithm classes with varying lookahead levels to each other (without reference to Opt) is also the foundation of our approach. In an average-case analysis, stochasticity refers to probabilities for input sequence occurrences. Let Dbe a probability distribution over all input sequences, then Alg is called c-competitive under Dif there is a constant asuch that ED(Alg[σ])≤ c·E(Opt[σ])+a. The expected competitive ratio of Alg under Dis cD r=inf{c≥ 1|Alg is c-competitive under D}. The expectation can also be taken over all ratios: The expected performance ratio of Alg under Dis cD r=infc≥1|EDAlg[σ] Opt[σ]≤ c. According to Souza (2006), the expected performance ratio should be favored because sequences with small (large) objective would be underrepresented (overrepresented) in the isolated expectations. The expected performance ratio indicates which algorithm performs better on most sequences, and by Markov’s inequality the probability for a sequence with ratio far from the expectation can be bounded. The main advantage of distributional performance analysis is that an algorithm is judged by a distribution instead of a single key figure. Relative interval analysis (Dorrigiv et al. 2009) is a preliminary stage of distributional analysis since it only considers the extreme values of a distribution for two algorithms. Define 123
Exact distributional analysis of online algorithms with… MinAlg1,Alg2(n):= min |σ|=n{Alg1[σ]−Alg2[σ]},MaxAlg1,Alg2(n) := max |σ|=n{Alg1[σ]−Alg2[σ]}, then the relative interval of Alg1and Alg2is IAlg1,Alg2=lim inf n→∞ MinAlg1,Alg2(n) n,lim sup n→∞ MaxAlg1,Alg2(n) n. The relative interval of an algorithm pair corresponds to its asymptotic range of amortized costs, and it allows for a direct comparison of two algorithms without reference to Opt. Stochastic dominance (Müller and Stoyan 2002) origins from statistics where it is used to establish an order between distributions of two random variables. By interpreting the objective value obtained by an algorithm as a random variable, this concept has been transferred to online optimization (Hiller 2009) where the objective value distributions of two algorithms Alg1and Alg2are related to each other. Let FAlg :R→[0,1]be the cumulative distribution function of the objective value of Alg:Alg1dominates Alg2stochastically at zeroth order if and only if Alg1[σ]≥Alg2[σ]for all σ∈;Alg1dominates Alg2stochastically at first order if and only if FAlg2(v) ≥FAlg1(v) for all v∈R.IfAlg1stochastically dominates Alg2at first order, then E(Alg1)≥E(Alg2). Unfortunately, stochastic dominance does not admit a total ordering among all distributions and we cannot expect a relation to hold for arbitrary algorithms. However, when comparing an algorithm without lookahead Alg1to one with lookahead Alg2(in minimization), Alg1≥st Alg2 would illustrate the benefit of lookahead because Alg2attains smaller objective values on more instances than Alg1. Bijective analysis (Angelopoulos and Schweitzer 2013) is a special case of stochastic dominance where input sequences are uniformly distributed. The idea is to find a bijection b:↔such that the objective value of Alg1on σis never worse than that of Alg2on the image b(σ ) of σ. Essentially, the approach consists in establishing an order of the elements in such that Alg1outperforms Alg2on every pair (σ, b(σ )). Alg1is called no worse than Alg2(Alg1Alg2)ifforalln≥n0≥1 with some n0∈Nthere exists b:↔with Alg1[σ]≤Alg2[b(σ )]for all σ∈.Alg1is called better than Alg2if Alg1Alg2and not Alg2Alg1. Hence, Alg1does not have to outperform Alg2on each sequence, but there has to be a relabeling of the sequences such that this relation holds between the original and relabeled sequences. We point out the advantages in Angelopoulos and Schweitzer (2013) for bijective analysis that can be transferred to any distributional approach: First, the idea is simple and intuitive, yet powerful. Second, algorithms can be compared directly without reference to an optimal offline algorithm. And third, typical algorithm properties are likely to be uncovered. 123
F. Dunke, S. Nickel 2.2 Counting distribution functions Inspired by the bijective analysis of Angelopoulos and Schweitzer (2013), our analysis of algorithm performance is based on a distributional approach facilitating a comprehensive performance evaluation. We choose a performance measurement approach which summarizes the global behavior of an algorithm over all instances, but also takes into account local quality of algorithms in terms of comparing their performance on the same problem instance. The approach has been introduced in Dunke and Nickel (2013) and is further discussed in Dunke (2014). In online optimization, nothing is known about the future. Likewise, in online optimization with lookahead, a limited amount of information about the future is available. Therefore, it is reasonable to impute this assumption also in the analysis method for algorithm performance. When no probabilities for instance occurrences are given, from the principle of insufficient reason the maximum entropy distribution is the best way to emulate the state of informational nescience as it minimizes the amount of a-priori information in the distribution (Jaynes 1957a,b). The uniform distribution over is the maximum entropy distribution among all distributions with support (which follows from Langrangian relaxation by the definition of the entropy together with the constraint that the sum over all probabilities equals 1). For finite , this leads to counting results saying how many instances yield a certain objective value. The counting distribution function1subsumes these frequency information of objective values over : Definition 2.1 (Counting distribution function of objective value). Let σ∈be an input sequence, let Alg be an algorithm, and let Alg[σ]be the objective value of Alg on σ.Ifis a discrete set, then the function FAlg :R→[0,1]with FAlg(v) := σ∈ 1[−∞,v](Alg[σ]) || is called the counting distribution function of the objective value of Alg over . For objective value v∈R, the counting distribution function of the objective value FAlg(v) relates the number of input sequences with objective value smaller than or equal to vto the number of all possible input sequences. As every instance is considered with equal weight, this yields a counting result in the sense that FAlg(v) can be understood as the proportion among all input sequences leading to an objective value smaller than or equal to v. A first step of comparing two algorithms Alg1and Alg2by their counting distribution functions of the objective value (see Fig. 1a) can be done by graphically examining the relative positions of their plots. For instance, when – in a minimization problem – the plot of FAlg1(v) lies below that of FAlg2(v) for a major proportion of objective values v, we can conclude as a first rule of thumb that FAlg1(v) outperforms FAlg2(v) on the majority of input sequences. 1The indicator function 1A(x)is 1 if x∈Aand 0 otherwise. 123
Exact distributional analysis of online algorithms with… 0 1 v FAlgi(v) Alg1 Alg2 (a) 0 1 1 r FAlg1,Alg2(r) Alg1/Alg2 (b) Fig. 1 aCounting distribution function of the objective value of Alg1and of the objective value of Alg2. bCounting distribution function of the performance ratio of Alg1relative to Alg2 The following definitions account for the relative performance of two algorithms to each other when both are restricted to operate on the same input sequence: Definition 2.2 (Performance ratio). Let σ∈be an input sequence, and let Alg1, Alg2be two algorithms for processing σ, respectively. rAlg1,Alg2(σ ) := Alg1[σ] Alg2[σ]is called the performance ratio of Alg1relative to Alg2with respect to σ. Definition 2.3 (Counting distribution function of performance ratio). Let σ∈be an input sequence, let Alg be an algorithm, and let rAlg1,Alg2(σ ) be the performance ratio of Alg1relative to Alg2on σ.Ifis a discrete set, then the function FAlg1,Alg2: R→[0,1]with FAlg1,Alg2(r):= σ∈1[−∞,r](rAlg1,Alg2(σ )) || is called the counting distribution function of the performance ratio of Alg1relative to Alg2over . In a first step, comparing Alg1and Alg2by their counting distribution function of the performance ratio (see Fig. 1b) can be done by partitioning all instances into subsets with ratio smaller than 1 (favoring Alg1), with ratio larger than 1 (favoring Alg2), and with ratio equal to 1 (displaying indifference between Alg1and Alg2). The cardinalities of these subsets then can be put into relation to each other to provide a first impression about instance-wise algorithm qualities. Note that the competitive ratio of Alg1is obtained as maxσ∈rAlg1,Alg2(σ ) if Alg2is Opt. The two-sided approach has the following advantages: First, the objective value distribution gives a global view on algorithm quality over all instances; the performance ratio distribution offers a local view on the quality of both algorithms relative to each other on the same instance. Second, distribution-based analysis also yields information about ranges and variability. And third, algorithms with arbitrary lookahead levels can be compared. In the sequel, we derive exact expressions for the counting distribution functions in two fundamental online optimization problems (bin packing in Sect. 3and traveling 123
F. Dunke, S. Nickel salesman problem in Sect. 4) to assess the influence of lookahead on algorithm performance. The study shows that already in fairly easy problem settings, an exact analysis becomes quite involved. On the other hand, the analysis allows us to gain insight why lookahead does not prove that much beneficial in packing problems as compared to routing problems. To the best of our knowledge, an explicit consideration of all input sequences as conveyed by the exact distributional analysis has never been conducted before. 3 Online bin packing with lookahead The bin packing problem is a fundamental combinatorial problem from the class of cutting and packing problems (Csirik and Woeginger 1998). It consists of packing the items (or more precisely their sizes) from input sequence σ=(σ1,...,σ n)into the least possible number of bins of capacity C. The online bin packing problem has been in the research focus of Computer Science ever since the 1970s (Johnson 1973, 1974) due to a series of appealing worst case analyses that could be established in this field. Surveys of the competitive analysis results on classical bin packing algorithms can be found in Borodin and El-Yaniv (1998), Csirik and Woeginger (1998) and Sgall (2014). In particular, it deserves mentioning that (in the limit) the well-known algorithms BestFit and FirstFit are 17 10 -competitive and their decreasing type (offline) variants where items are preordered by non-increasing size BestFitDecreasing and FirstFitDecreasing are 11 9-competitive. 3.1 Problem setting and notation In the online version, items are packed one after another without knowing any remaining item. In the online version with request lookahead of size l, items are packed sequentially with knowing lremaining items (or all remaining items if there are less than lof them); in particular, it is allowed to have a packing order different from the revelation order. Recall that the case l=1 coincides with the pure online setting without additional lookahead. We now compare the pure online setting with the setting enhanced by lookahead: Online algorithm BestFit puts the (only) known item into the fullest open bin that can accommodate it, if any; otherwise a new bin is opened and the item is put in it (Csirik and Woeginger 1998). Online algorithm BestFitl with request lookahead lfirst sorts the known items in order of non-increasing sizes and then puts the largest known item into the fullest open bin that can accommodate it, if any; otherwise a new bin is opened and the largest item is put in it (Csirik and Woeginger 1998). Observe that BestFit1conincides with BestFit. Under lookahead of one additional item (l=2), we derive exact expressions for the counting distribution functions of the objective value and the performance ratio for the case of two item sizes 0.5+and 0.5−with arbitrary ∈(0,1 6)and C=1. Under these conditions at most two items fit into a single bin. A similar situation has been considered by Kenyon (1996) as a motivation to introduce the random order performance ratio as an alternative to competitive analysis. 123
Exact distributional analysis of online algorithms with… itemized condition expresses that there are never two small items such that the number of large items minus the number of small items up to an arbitrary position in the item sequence would drop down to −2. Hence, the number of item sequences of length 2(i−1)fulfilling both conditions is equal to the number of recurring unit-sloped paths with sk≥−1 for all k. According to Lemma 3.3 b), this number is Ci. We now consider the second pair of parentheses: For fixed p, the number of item sequences of length 2(n−p)which fulfill conditions (iii) and (iv) from Theorem 3.2, i.e., •ns((σj+3,...,σ 2n+1)) =ns((σj+3,...,σ 2n+1)c)and •nl((σj+3,...,σ 2n+1)) ≥ns((σj+3,...,σ 2n+1)) +1 with j=2p−1 can be characterized as 22(n−p)−n1−n2where n1is the number of item sequences of length 2(n−p)with at least one condensation and n2is the number of item sequences of length 2(n−p)without condensation that has the same number of small and large items. For n1,leti∈{1,...,n−p}be fixed such that the first condensation consists of σ2(p+i)and σ2(p+i)+1, then we need to have nl(σj+3,...,σ 2(p+i)−1)= ns(σj+3,...,σ 2(p+i)−1)and no condensation is allowed in (σj+3,...,σ 2(p+i)−1). Structurally, we obtain the same two conditions as the two itemized conditions for the first pair of parentheses, i.e., •nl((σ2(p+1),...,σ 2(p+i)−1)) =ns((σ2(p+1),...,σ 2(p+i)−1)) and •ns((σ2(p+1),...,σ 2(p+i)−1)) =ns((σ2(p+1),...,σ 2(p+i)−1)c) regardless of σ2(p+i)+2,...,σ 2n+1because once a condensation occurs the rest is irrelevant. Since σ2(p+i)+2,...,σ 2n+1are free, the factor 22(n−p−i)follows, and from Lemma 3.3, the number of item sequences of length 2(i−1)fulfilling the two itemized conditions is Ci. Thus, we obtain n1=n−p i=1Ci·22(n−p−i).Also from Lemma 3.3,itfollowsthatn2=Cn−p+1gives the number of item sequences of length 2(n−p)where the number of large items equals the number of small items and no condensations occur. (b) The proof is analogous to part (a) with the only difference that the decomposition into σ=(σ1,...,σj−1,σj,σj+1,σj+2,σj+3,...,σ 2n+1)now has odd |(σj+3,...,σ 2n)|. Thus, for a given p∈{1,...,n−1}, the subsequence (σj+3,...,σ 2n)now only has 2(n−p)−1 elements, and the number of sequences of (longest possible even) length 2(n−p−1)without condensation and balanced number of small and large items is Cn−p. 3.3 Counting distribution functions We go on to establish exact expressions for the counting distribution functions of the objective value and performance ratio related to algorithms Bf and Bf2. The analysis illustrates how a comprehensive assessment of algorithm quality can be obtained for the online bin packing setting under consideration. While the previous results on the number of item sequences for which Bf2incurs a bin saving over Bf cannot be 123
F. Dunke, S. Nickel used directly for the counting distribution functions, many proof ideas are reused subsequently. The numbers an,k=k+1 n+12n+2 n−kwith k,n∈N0,n≥k(cf. Deutsch and Shapiro 2001) will be used in several of the following results leading to the counting distribution functions for the objective value in Corollary 3.11 and for the performance ratio in Corollary 3.13. Lemma 3.5 (a) The number of item sequences σof length 2n where Bf[σ]=mis given by Bf(2n,m)=⎧ ⎪ ⎨ ⎪ ⎩ n k=m−n an,k= n k=m−n k+1 n+12n+2 n−kif n ≤m≤2n, 0otherwise. (b) The number of item sequences σof length 2n+1where Bf[σ]=m is given by Bf(2n+1,m)= ⎧ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎨ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎩ 2 n k=m−n an,k+an,m−1−nif n +1<m≤2n+1, 3 n k=0 an,k−an,0if m =n+1, 0otherwise. Proof By reverse induction. See “Appendix A.2”. We now give another formula to compute the numbers Bf(2n,m)and Bf(2n+1,m). Theorem 3.6 (a) The number of item sequences σof length 2n where Bf[σ]=mis given by Bf(2n,m)=2n+1 m+1=2n m+2n m+1if n ≤m≤2n, 0otherwise. (b) The number of item sequences σof length 2n+1where Bf[σ]=m is given by Bf(2n+1,m)=⎧ ⎪ ⎨ ⎪ ⎩ 2n+2 m+1=2n+1 m+2n+1 m+1if n +1<m≤2n+1, 2n+3 n+2−2n+1 n+1if m =n+1, 0otherwise. Proof By two-dimensional induction. See “Appendix A.3”. Theorem 3.7 The number of item sequences σof length n where Bf[σ]=m and Bf2[σ]=m−1is given by n m+1for m =n 2+1,...,n−1. Proof From Regev (2012), we have for 1 ≤q≤p≤2q−1 the following expression for the binomial coefficient: p q=i≥0Cip−1−2i q−1−i. 123
Exact distributional analysis of online algorithms with… For item sequence σ, assume that |σ|=2nand that σfulfills the conditions stated in Theorem 3.2. We further decompose σinto three parts: For some i∈{1,...,n−1}, let (σ1,σ 2,...,σ 2(i−1))correspond to a recurring unit-sloped path with sk≥−1for all k=1,2,...,2(i−1),letσ2i−1,σ 2ibe the first two small items which would be condensed, and let (σ2i+1,σ 2(i+1),...,σ 2n)be the rest of σ. Note that σ2i−1,σ 2iare not necessarily responsible for the saving which can be accrued by Bf2over Bf. According to Lemma 3.3, the number of item sequences fulfilling the properties of the first subsequence is Ci. The number of item subsequences (σ2i+1,σ 2(i+1),...,σ 2n) leading to overall mbins for Bf and overall m−1binsforBf2is 2n−2i m−iwhich can be seen as follows: For (σ1,σ 2,...,σ 2(i−1)),i−1 bins were needed such that for (σ2i−1,σ 2i,...,σ 2n),m−i+1 and m−iadditional bins will be needed by Bf and Bf2, respectively. Since σ2i−1,σ 2iare small items, m−ibins will be needed by Bf for (σ2i+1,σ 2(i+1),...,σ 2n)and in addition, conditions (ii), (iii) and (iv) of Theorem 3.2 have to hold for some j≥2i−1 to realize the saving of Bf2. Because condition iv) of Theorem 3.2 has to hold, objective value mis attained by Bf when m−iout of the 2n−2iitems (σ2i+1,σ 2(i+1),...,σ 2n)are large. However, this choice does not necessarily fulfill conditions (ii) and (iii) of Theorem 3.2 because it may be that (σ2i+1,σ 2i+2)=(0.5−, 0.5+) or that condensations can be found in (σ2i+2,σ 2i+3,...,σ 2n). These two cases are resolved as follows: Whenever (σ2i+1,σ 2i+2)=(0.5−, 0.5+), we find a bijective mapping from σto some σwhere σis identical to σexcept for (σ2i+1,σ 2i+2)now being (σ2i+1,σ 2i+2)=(0.5−, 0.5−). Hereby, another condensation is established which erases responsibility of the first condensation for the saving of Bf2and claims responsibility itself (by setting j=2i+1). Whenever we have another condensation in (σ2i+2,σ 2i+3,...,σ 2n), we recognize that it erases responsibility for the saving of Bf2of a previous condensation and claims responsibility itself (by setting jaccordingly). Thus, for some isuch that (σ2i−1,σ 2i)is the first condensation, there are 2n−2i m−iitem subsequences (σ2i+1,σ 2(i+1),...,σ 2n)fulfilling conditions (ii), (iii) and (iv) of Theorem 3.2. The next lemma is needed to complete the proof for even length 2nof σ. Lemma 3.8 For n ≤m≤2n it holds that i≥1Ci2n−2i m−i=i≥1Ci−12n−2i+1 m−i+1. Proof See “Appendix A.4”. Using this result, the proof of Theorem 3.7 can be completed for even length 2nof σby i≥1 Ci2n−2i m−i= i≥1 Ci−12n−2i+1 m−i+1= i≥1 1 i2i−2 i−12n−2i+1 m−i+1 = i≥0 1 i+12i i2n−2i−1 m−i= i≥0 Ci2n−2i−1 m−i =2n m+1. 123
F. Dunke, S. Nickel where the last equality follows for n<m≤2n−1 from the proof of Lemma 9 in Regev (2012) and condition iv) from Theorem 3.2. For odd length 2n+1ofσ,the proof is analogous with 2n−2ireplaced by 2n−2i+1. Corollary 3.9 The number of item sequences σof length n with Bf[σ]=m and Bf2[σ]=m is given by n mfor m =n 2+1,...,n. Proof See “Appendix A.5”. We now state the central relation between the objective values attained by Bf2and Bf. Theorem 3.10 The number of item sequences σof length n where Bf2[σ]=mis given by Bf2(n,m)=⎧ ⎪ ⎪ ⎪ ⎨ ⎪ ⎪ ⎪ ⎩ 1if m =n, Bf(n,m)+Bf(n,m+1)−2n m+1if m =n 2+1,...,n−1, Bf(n,m)+Bf(n,m+1)−n m+1if m =n 2, 0if m ≤n 2−1. Proof Because of item sizes in {0.5−, 0.5+}, at most two items can be packed in a bin so that packing nitems in less than n 2bins is infeasible. Likewise, each item of σis packed separately if and only if each item is large, and there is only one such item sequence σ. The number of item sequences of length nfor which Bf2attains objective value mcan be computed as n1+n2−n3−n4where n1is the number of item sequences σof length nwith Bf[σ]=m,n2is the number of item sequences σof length nwith Bf[σ]=m+1, n3is the number of item sequences σof length nwith Bf[σ]=m,Bf2[σ]=m−1, and n4is the number of item sequences σof length n with Bf[σ]=m+1, Bf2[σ]=m+1. From Theorem 3.7, we have that the number of all item sequences σof length n with Bf[σ]=mand Bf2[σ]=m−1isn3=n m+1for m=n 2+1,...,n−1; from Corollary 3.9, we have that the number of all item sequences σof length nwith Bf[σ]=m+1 and Bf2[σ]=m+1isn4=n m+1for m=n 2,...,n−1, and the result follows. From the previous results, we obtain expressions for the counting distribution functions of the objective value FBf(v) and FBf2(v), respectively. We restrict ourselves to item sequences of even length since analogous conclusions can be drawn immediately in case of odd length. Corollary 3.11 The counting distribution functions of the objective value FBf(v) and FBf2(v) of Bf and Bf2for item sequences of length 2n are given by FBf(v) =⎧ ⎪ ⎪ ⎪ ⎪ ⎨ ⎪ ⎪ ⎪ ⎪ ⎩ 0if v<n, 2−2nv m=n2n+1 m+1if n ≤v<2n, 1if v≥2n, 123
Exact distributional analysis of online algorithms with… and FBf2(v) =⎧ ⎪ ⎪ ⎪ ⎪ ⎨ ⎪ ⎪ ⎪ ⎪ ⎩ 0if v<n, 2−2nv m=n2n+1 m+1+2n+1 m+2−22n m+1+2n m+1if n ≤v<2n, 1if v≥2n. Proof Direct consequence of Theorems 3.6 and 3.10. Figure 2a exemplarily plots FBf(v) and FBf2(v) for all item sequences of length n=100. We observe a rather small lookahead effect as a result of the (relatively restrictive) conditions in Theorem 3.2 which are collectively found only in a minor fraction of all item sequences. Part (a) of the following corollary expresses Bf2’s dominance over Bf. As seen from Theorem 3.1, stochastic dominance of all orders is established. As a consequence of part (b), knowing one additional item is worthless in the limit. Taking into account Theorem 3.1, this result was to be expected. The reason for this ineffectiveness lies in the total forfeiture of the power of the lookahead capability once a small item occurs and occupies the lookahead set. Corollary 3.12 (a) For item sequences of length 2n, we have FBf2(v) ≥FBf(v) for all v∈Rand FBf2(v) −FBf(v) > FBf2(v +1)−FBf(v +1)for all v<2n−1. (b) For item sequences of length 2n, we have supv∈R|FBf2(v) −FBf(v)|→0as n→∞. Proof See “Appendix A.6”. We next derive an expression for the counting distribution function of the performance ratio. Corollary 3.13 The counting distribution function of the performance ratio FBf,Bf2(r) of Bf relative to Bf2for item sequences of length 2n is given by FBf,Bf2(r)= ⎧ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎨ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎩ 0if r <1, 1 2+ 1 2(2n n)+(2n n+1) 22nif 1≤r<2n−1 2n−2=1+1 2n−2, 1 2+ 1 2(2n n)+(2n n+1)+ n−2−k i=0 (2n 2n−i) 22nif n+k+1 n+k=1+1 n+k≤r<n+k n+k−1=1+1 n+k−1 for k =1,...,n−1, 1else. Proof According to Theorem 3.7,wehave: •2n n+2is the number of sequences of length 2nwith Bf[σ]=n+1, Bf2[σ]=n •2n n+3is the number of sequences of length 2nwith Bf[σ]=n+2, Bf2[σ]=n+1 •... •2n 2nis the number of sequences of length 2nwith Bf[σ]=2n−1, Bf2[σ]=2n−2 123
F. Dunke, S. Nickel Apart from these item sequences, no other sequences change their objective due to application of Bf2instead of Bf. Thus, the performance ratio ranges in [1,n+1 n]and the number of item sequences of length 2nwhich leave the number of bins unchanged in both algorithms is 22n−2n n+2−2n n+3−···−2n 2n =2n 0+2n 1+···+2n n+1=22n−1+1 22n n+2n n+1. Exploiting this relation, we immediately get the given expression for the counting distribution function of the performance ratio as FBf,Bf2(r). In Fig. 2b, an exemplary plot of FBf,Bf2(r)is given for n=100 confirming that the lookahead effect is also relatively small with respect to an instance-wise comparison. 4 Online traveling salesman problem with lookahead The traveling salesman problem (TSP) lies at the core of nearly every transportation or routing problem as it seeks to find a round trip (also called tour) for a given set of locations (also called requests) to be visited such that some cost function depending on the total travel distance or travel time is minimized (Lenstra and Rinnooy Kan 1975). The online TSP has been considered in several flavors for competitive analyses: A typical objective is makespan minimization. For this problem, a 2-competitive algorithm PlanAtHome is known (Ausiello et al. 1995) where the problem also involves request release dates. In an online variant with lookahead, customer requests pop up some time ahead of the earliest possible visit times. It is shown in Allulli et al. (2008) that lookahead leaves the competitive factor at 2, i.e., no better algorithm with respect to the optimal offline solution is found in competitive analysis. Another paper on the online TSP with lookahead is due to Jaillet and Wagner (2006). Here, lookahead is given by disclosure dates which differ from release dates. It is shown that the advanced information leads to improved competitive ratios. 4.1 Problem setting and notation The setting considered in this paper refrains from request release dates and applies total distance as the objective criterion. We conduct an exact combinatorial analysis and explain the improvements that can be achieved through lookahead on typical input sequences. Hence, the TSP as considered in this paper is a pure sequencing problem. For input sequence σ=(σ1,...,σ n), let a request σiwith i∈Ncorrespond to a point xiin a space Mwith metric d:M×M→R, then the TSP consists of visiting the points of all requests – each one not before its release—with a server in a tour of minimum length starting and ending in some distinguished origin o∈M. A permutation π(σ) =(π1(σ ), π2(σ ), . . . , πn(σ )) of the set {σ1,σ 2,...,σ n}of requests represents a tour (o,xπ1(σ ),xπ2(σ ),...,xπn(σ ),o), i.e., a feasible solution to an instance of the TSP. The tour length of π(σ) is given by the value 123
Exact distributional analysis of online algorithms with… D(π(σ )) := do,xπ1(σ ))+ n−1 i=1 d(xπi(σ ),xπi+1(σ )+dxπn(σ ),o. The online version without lookahead is trivial: Requests are served in their order of appearance since no temporal aspects such as release dates are considered. In the online version with request lookahead of size l, requests are served sequentially with knowing lremaining requests (or all remaining requests if there are less than lof them); in particular, requests do not need to be served in their order of appearance. Recall that the case l=1 coincides with the pure online setting without additional lookahead. We now compare the pure online setting with the setting enhanced by lookahead: Online algorithm FirstComeFirstServed has no choices, i.e., the server has to visit the requests in their order of appearance in a first-come first-served manner. Online algorithm NearestNeighborlwith request lookahead lalways moves the server to the closest known point in terms of distance from its current location. Under lookahead of one additional request (l=2), we derive exact expressions for the counting distribution functions of the objective value and the performance ratio for the case of a metric space consisting of two points only, i.e., M={0,1}with d(0,1)=d(1,0)=1, d(0,0)=d(1,1)=0 and o=0. Thus, this version of the TSP can also be recast as a 1-server problem on two points. From now on, we refer to FirstComeFirstServed as Fcfs and NearestNeighbor2 as Nn. We use the following additional terminology: •A pass is the transition between two successive requests (σi,σ i+1); a pass pair is a request subsequence (σi,σ i+1,σ i+2). •A change (remain) pass is a pass (σi,σ i+1)with xi= xi+1(xi=xi+1). •A free point at a given time is a point which is not occupied by the server at that time. Note that because of the return to o, only even overall tour lengths are possible. In contrast to bin packing, the analysis in this section will show significant reductions in overall tour lengths through lookahead. This becomes possible due to the large and irrevocable effect on the objective function that the resequencing of requests brings along. The major positive effect of lookahead in the TSP is seen in the plots of the counting distribution functions in Fig. 4. As presented in a stringent analysis in Sect. 4.2, the root cause for the advantage of Nn over Fcfs lies in its ability to crack pass pairs (0,1,0)or (1,0,1)in order to build pass pairs (0,0,1)or (1,1,0). 4.2 Counting distribution functions In this section, we derive expressions for the counting distribution functions of the objective values attained by algorithms Fcfs and Nn, respectively, as well as an expression for the counting distribution function of the performance ratio of Fcfs and Nn. The counting distribution functions thoroughly reflect the advantage of Nn over Fcfs which lies in the ability of pooling requests on the same location. The analysis is rather direct, i.e., we first provide a theorem giving the number of request sequences leading 123
F. Dunke, S. Nickel 0 0.2 0.4 0.6 0.8 1 v F(v) Fcfs Nn (a) 0 20406080100 00.20.40.60.811.2 0 0.2 0.4 0.6 0.8 1 r FNn,Fcfs(r) Nn/Fcfs (b) Fig. 4 Counting distribution functions of acosts and bperformance ratio of costs in the TSP with 100 requests to a specific objective value or performance ratio, respectively, and then conclude with a corollary specifying the expression for the counting distribution function. Counting distribution functions of the objective value Theorem 4.1 (a) The number of request sequences σof length n where Fcfs[σ]=m and m is even is given by Fcfs(n,m)=n+1 m. (b) The number of request sequences σof length n where Nn[σ]=m and m is even is given by Nn(n,m)=n+1 2m−2+n+1 2mif m >0, 1if m =0. Proof A sequence of npoints starting and ending in ohas n+2 requests including the two dummy requests at oand encounters n+1 passes to either the current or the free point. (a) For Fcfs in order to result in objective value m, a request sequence has to exhibit exactly mchange passes out of the n+1 passes. (b) For m=0, the formula obviously holds. Denote by σthe original request sequence and by σthe visiting order under Nn.Form>0, first observe that each resulting sequence σafter being processed by Nn exhibits a last change from 0 to 1 and a last change from 1 to 0 in the visiting order of requests which together contribute a total of 2 to the objective value. We conclude that a contribution of max{0,m−2} is due to all previous passes that do not involve the 1 of the last change from 0 to 1. There are two cases how this 1 could be obtained: Either it was at the same position originally and remained there also under processing of Nn (case 1), or it had been shifted to that position as a result of the processing of Nn (case 2). For n=9 and m=4, we give an example of case 1 by •σ=(0, −→ 1,0,1, −→ 0,0,0,0,1,1,0), •σ=(0,0,1, ←− 1,0, ←− 0,0,0,1,1,0) 123
Exact distributional analysis of online algorithms with… and of case 2 by •σ=(0, −→ 1,0,1, −→ 0,0, −→ −→ 1,0,1,1,0), •σ=(0,0,1, ←− 1,0, ←− 0,0,1, ←− ←− 1,1,0). For each of the m−2 changes incurred by Nn, of course, there must also have been a corresponding change pass in the original sequence (right arrow). Additionally, through the processing of Nn, this change pass can only be responsible for a change if in the processing order of Nn the (potentially shifted) destination of the original change pass is succeeded by another pass which has to be a remain-pass (left arrow). In the first case, m−2 change passes along with their affirmative remain-passes in the transformed sequence and two additional change passes (underlined) incur changes, i.e., 2(m−2)+2=2m−2 out of the n+1 passes have to be chosen. In the second case, because of the last change from 0 to 1, which resulted from a shifted change pass (left double arrow), and its affirmative remain-pass (right double arrow), m−2+1=m−1 change passes along with their affirmative remain-passes in the transformed sequence and two additional passes (underlined), whereof the first one is a pass from 1 to 0 ensuring that the 1 will be shifted to the right (cf. definition of case 2), incur changes, i.e., 2(m−1)+2=2mout of the n+1 passes have to be chosen. From the previous result, we immediately obtain expressions for the counting distribution functions of the objective value FFcfs(v) and FNn(v), respectively. Note that Fcfs and Nn have possible tour lengths in {0,2,4,...,2n 2}and {0,2,4,...,2n 4}, respectively, for n+2 requests including the first and last request to o(cf. proof of Theorem 4.1). Corollary 4.2 The counting distribution functions of the objective value FFcfs(v) and FNn(v) of Fcfs and Nn for request sequences of length n +2(including the first and last request to o) are given by FFcfs(v) =⎧ ⎪ ⎪ ⎪ ⎪ ⎨ ⎪ ⎪ ⎪ ⎪ ⎩ 0if v<0, n i=0n+1 2i·2−nif 2n≤v<2n+2for n=0,1,...,n 2−1, 1if v≥2n 2, and FNn(v) =⎧ ⎪ ⎪ ⎪ ⎪ ⎨ ⎪ ⎪ ⎪ ⎪ ⎩ 0if v<0, n i=0n+1 4i+n+1 4i−2·2−nif 2n≤v<2n+2for n=0,1,...,n 4−1, 1if v≥2n 4. 123
F. Dunke, S. Nickel Figure 4a exemplarily plots FFcfs(v) and FNn(v) for all item sequences of length n=100. We observe a significant lookahead effect as a result of permuting request triples with two successive change passes such that these turn into one change pass and one remain pass. Counting distribution function of the performance ratio Theorem 4.3 Let mNn(σ ) and mFcfs(σ ) denote the objective values of algorithms Nn and Fcfs on request sequence σ, respectively, and let nNn,Fcfs(n,a,b)be the number of request sequences σof length n +2(including the first and last request to o) with mNn(σ ) =a and mFcfs(σ ) =bfora=0,2,4,...,2n 4and b =0,2,4,...,2n 2, then it holds that nNn,Fcfs(n,a,b)= ⎧ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎨ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎪ ⎩ 1if b =a=0 n+3−a aif b =a= 0 n+1−a 2aif b =3a n+2−a 2a−1+(a−1)n+1−a 2a−1if b =3a−2 a−2 b−a 2n+3−a a+b 2+a−2 b−a 2−1n+2−a a+b 2+a−1 b−a 2−1n+1−a a+b 2if b =a+2,a+4,..., 3a−4 0else. Proof Notice that Nn can never be worse than Fcfs because whenever Nn changes the order, a saving occurs without future drawbacks. Nn needs at least a third of the distance of Fcfs as seen by (0,1,0,1,0,1,0)which requires two units from Nn and six units from Fcfs. There are no sequences with a larger percentage of savings because at the end of this sequence only two requests on 0 are seen by Nn, i.e., there is no value of lookahead in this moment, and modifying the above sequence by additional requests cannot improve the advantage of Nn over Fcfs any further. Due to the return to o, both Fcfs and Nn lead to an even objective value. Therefore, it is sufficient to consider nNn,Fcfs(n,a,b)with a,bas even numbers and a b∈[ 1 3,1]. For a request sequence with npoints (apart from the dummy requests at the beginning and end), b can attain values up to 2n 2as seen by the worst-case sequences for Fcfs: Sequences of odd length consist only of change passes; sequences of even length consist only of change passes except for one remain pass. For a request sequence with npoints (apart from the dummy requests at the beginning and end), acan attain values up to 2n 4as seen by the worst-case sequences for Nn as follows: In any visiting order under Nn, defined as σ, an isolated 0 may only occur at the first and/or last request to o=0; likewise, the only possible isolated 1 is the last request to 1. Hence, apart from these three requests, σconsists of a series of subsequences with minimum length 2 with requests on 1 only or 0 only. The largest objective value is incurred when the largest number of such subsequences appears in σwhich is the case for subsequences in the form of pairs. Input sequences σof this form result from (0,(1,1,0,0)c,x,0)with x being a request subsequence of minimum length 1 and maximum length 4 containing at least one 1 representing the last visit to 1. 123
Exact distributional analysis of online algorithms with… = n k=0 an,k+ n k=0 an,k+ n k=1 an,k=3 n k=0 an,k−an,0. A.3: Proof of Theorem 3.6 (a) We show by two-dimensional induction on nand mthat n k=m−nan,k=2n+1 m+1. Recall that n=1,2,... and m=n,n+1,...,2n. The base case n=1 and m=n=1 is valid because it holds that 1 k=0a1,k=a1,0+a1,1=2+1= 3=2·1+1 1+1=3 2=3.In the first inductive step (on nwith fixed m=n), we show that n k=0an,k=2n+1 n+1holds. From Shapiro (1976), we know that 1 22(n+1) n+1=n k=0an,k. The result follows from 1 22(n+1) n+1=1 2 (2n+2)! (n+1)!(n+1)!=(2n+2)(2n+1)! 2(n+1)n!(n+1)!=2n+1 n+1. In the second inductive step (on mwith arbitrary n), we show that n k=m−nan,k= 2n+1 m+1implies n k=m+1−nan,k=2n+1 m+2. This can be seen by the following calculations: n k=m+1−n an,k= n k=m−n an,k−an,m−n=2n+1 m+1−m−n+1 n+12n+2 2n−m =(2n+1)!(n+1)(m+2)−(m−n+1)(2n+2)! (2n−m)!(m+2)!(n+1) =(2n+1)! (m+2)!(2n−m−1)! (n+1)(m+2)−(m−n+1)(2n+2) (2n−m)(n+1) =(2n+1)! (m+2)!(2n−m−1)!·1=2n+1 m+2. The result now immediately follows from the formula given in part (a) of Lemma 3.5. (b) For m=n+1, we have 3 n k=0 an,k−an,0 a) =32n+1 n+1−1 n+12n+2 n =(2n+1)! (n+2)!(n+1)!(3n2+7n+4) and 2n+3 n+2−2n+1 n+1=(2n+1)! (n+2)!(n+1)!(3n2+7n+4). 123
F. Dunke, S. Nickel which together yields the desired relation for m=n+1. For n+1<m≤2n+1, we have 2 n k=m−n an,k+an,m−n−1 a) =22n+1 m+1+m−n n+12n+2 2n−m+1 =(2n+2)! (m+1)!(2n−m+1)!2(2n−m+1) 2n+2+m−n n+1 =(2n+2)! (m+1)!(2n−m+1)!2n+2 2n+2=2n+2 m+1. The result now immediately follows from the formula given in part (b) of Lemma 3.5. A.4: Proof of Lemma 3.8 We show that i≥1Ci2n−2i m−i−i≥1Ci−12n−2i+1 m−i+1=0.Notice that from the definition of the binomial coefficient, iranges in {1,2,...,2n−m}in both terms. Hence, i≥1 Ci2n−2i m−i− i≥1 Ci−12n−2i+1 m−i+1 =C12n−2 m−1+C22n−4 m−2+C32n−6 m−3+···+C2n−m2m−n 2m−n −C02n−1 m+C12n−3 m−1+C22n−5 m−2+···+C2n−m−12m−n+1 2m−n+1 =C12n−3 m−2+C22n−5 m−3+···+C2n−m−12m−n+1 2m−2n+C2n−m−2n−1 m = 2n−m−1 i=1 Ci2n−2i−1 m−i−1+C2n−m−2n−1 m = 2n−m−1 i=0 Ci2n−2i−1 m−i−1−2n−1 m−1+C2n−m−2n−1 m = 2n−m i=0 Ci2n−2i−1 m−i−1−C2n−m2m−2n−1 2m−2n−1−2n−1 m−1 +C2n−m−2n−1 m = i≥0 Ci2n−2i−1 m−i−1−C2n−m−2n−1 m−1+C2n−m−2n−1 m =2n m−2n−1 m−1−2n−1 m=2n m−2n m=0. 123
Exact distributional analysis of online algorithms with… A.5: Proof of Corollary 3.9 From Theorem 3.1, we know that Bf2[σ]∈{m,m−1}whenever Bf[σ]=m;from the previous Theorem 3.7, we know that |{σ||σ|=n,Bf2[σ]=m−1,Bf[σ]= m}| = n m+1for m=n 2+1,...,n−1. Hence, from Theorem 3.6 it immediately follows for these mthat |{σ||σ|=n,Bf2[σ]=m}| = n+1 m+1−n m+1=n m.Clearly, |{σ||σ|=n,Bf[σ]=n}| = |{σ||σ|=n,Bf2[σ]=n}| = 1. A.6: Proof of Corollary 3.12 (a) For v<nand v≥2n−1, FBf(v) =FBf2(v).Forn≤v<2n−1 FBf2(v) −FBf(v) =v m=n2n+1 m+2−22n m+1+2n n+1·(2−2n) =v m=n2n m+2−2n m+1+2n n+1·(2−2n) =2n v+2·(2−2n)>0. The second part follows immediately from Pascal’s triangle as a result of 2n v+2> 2n v+3for v=n,n+1,...,2n−3. (b) Using the formula of Stirling (n!≈√2πn(n e)n, Königsberger (2001)), we get for n→∞that FBf2(n)−FBf(n)=2n n+2·2−2n ≈√4πn(2n e)2n √2π(n+2)(n+2 e)n+2√2π(n−2)(n−2 e)n−2·2−2n =√n22nn2n π(n2−4)(n+2)n+2(n−2)n−2·2−2n∈( 1 √n). In addition, 2n v>2n v+1for v∈Nwith v≥n, i.e., FBf2(v) −FBf(v) monotonously decreases for v≥n. Since also FBf2(v) =FBf(v) for v<n and v≥2n−1, the result follows. References Albers S (1997) On the influence of lookahead in competitive paging algorithms. Algorithmica 18(3):283– 305 Albers S (1998) A competitive analysis of the list update problem with lookahead. Theor Comput Sci 197(1–2):95–109 123
F. Dunke, S. Nickel Allulli L, Ausiello G, Bonifaci V, Laura L (2008) On the power of lookahead in on-line server routing problems. Theor Comput Sci 408(2–3):116–128 Angelopoulos S, Schweitzer P (2013) Paging and list update under bijective analysis. J ACM 60(2):Article no. 7 Ausiello G, Feuerstein E, Leonardi S, Stougie L, Talamo M (1995) Competitive algorithms for the online traveling salesman. In: Akl S, Dehne F, Sack J, Santoro N (eds) Algorithms and data structures. Springer, Berlin, pp 206–217 Ben-David S, Borodin A (1994) A new measure for the study of on-line algorithms. Algorithmica 11(1):73– 91 Borodin A, El-Yaniv R (1998) Online computation and competitive analysis. Cambridge University Press, Cambridge Breslauer D (1998) On competitive on-line paging with lookahead. Theor Comput Sci 209(1–2):365–375 Csirik J, Woeginger G (1998) On-line packing and covering problems. In: Fiat A, Woeginger G (eds) Online algorithms: the state of the art. Springer, Berlin, pp 147–177 Deutsch E (1999) Dyck path enumeration. Discrete Math 204(1–3):167–202 Deutsch E, Shapiro L (2001) A survey of the fine numbers. Discrete Math 241(1–3):241–265 Dorrigiv R (2010) Alternative measures for the analysis of online algorithms. Ph.D. Thesis, University of Waterloo Dorrigiv R, López-Ortiz A, Munro J (2009) On the relative dominance of paging algorithms. Theor Comput Sci 410(38–40):3694–3701 Dunke F (2014) Online optimization with lookahead. Ph.D. Thesis, Karlsruhe Institute of Technology Dunke F, Nickel S (2013) Simulative algorithm analysis in online optimization with lookahead. In: Dangelmaier W, Laroque C, Klaas A (eds) Simulation in produktion und logistik: entscheidungsunterstützung von der planung bis zur steuerung. HNI-Verlagsschriftenreihe, Paderborn, pp 405–416 Fiat A, Woeginger G (eds) (1998) Online algorithms: the state of the art. Springer, Berlin Grove E (1995) Online bin packing with lookahead. In: Proceedings of the 6th annual ACM-SIAM symposium on discrete algorithms, pp 430–436 Hiller B (2009) Online Optimization: probabilistic analysis and algorithm engineering. Ph.D. Thesis, Technische Universität Berlin Imreh C, Németh T (2007) On time lookahead algorithms for the online data acknowledgement problem. In: Kucera L, Kucera A (eds) Mathematical foundations of computer science 2007. Springer, Berlin, pp 288–297 Jaillet P, Wagner M (2006) Online routing problems: value of advanced information as improved competitive ratios. Transp Sci 40(2):200–210 Jaynes E (1957a) Information theory and statistical mechanics. Phys Rev 106(4):620–630 Jaynes E (1957b) Information theory and statistical mechanics II. Phys Rev 108(2):171–190 Johnson D (1973) Near-optimal bin packing algorithms. Ph.D. Thesis, Massachusetts Institute of Technology Johnson D (1974) Fast algorithms for bin packing. J Comput Syst Sci 8(3):272–314 Karlin A, Manasse M, Rudolph L, Sleator D (1988) Competitive snoopy caching. Algorithmica 3(1–4):79– 119 Kenyon C (1996) Best-fit bin-packing with random order. In: Proceedings of the 7th annual ACM-SIAM symposium on discrete algorithms, pp 359–364 Koutsoupias E, Papadimitriou C (2000) Beyond competitive analysis. SIAM J Comput 30(1):300–317 Königsberger K (2001) Analysis 1, 5th edn. Springer, Berlin Lenstra J, Rinnooy Kan A (1975) Some simple applications of the travelling salesman problem. Oper Res Q 26(4):717–733 Li W, Yuan J, Cao J, Bu H (2009) Online scheduling of unit length jobs on a batching machine to maximize the number of early jobs with lookahead. Theor Comput Sci 410(47–49):5182–5187 Mandelbaum M, Shabtay D (2011) Scheduling unit length jobs on parallel machines with lookahead information. J Sched 14(4):335–350 Michaels J, Rosen K (1991) Applications of discrete mathematics. McGraw-Hill, New York Müller A, Stoyan D (2002) Comparison methods for stochastic models and risks. Wiley, New York Regev A (2012) A proof of Catalan’s convolution formula. Integers 12(5):929–934 Sgall J (2014) Online bin packing: old algorithms and new results. In: Beckmann A, Csuhaj-Varjú E, Meer K (eds), Proceedings of the 10th conference on computability in Europe, CiE 2014 (Lecture Notes in Computer Science 8493). Springer, pp 362–372 123
Exact distributional analysis of online algorithms with… Shapiro L (1976) A Catalan triangle. Discrete Math 14(1):83–90 Sleator D, Tarjan R (1985) Amortized efficiency of list update and paging rules. Commun ACM 28(2):202– 208 Souza A (2006) Average performance analysis. Ph.D. Thesis, Eidgenössische Technische Hochschule Zürich Tinkl M (2011) Online-optimierung der rundreise auf der Kreislinie mit informationsvorlauf. Ph.D. Thesis, Universität Augsburg Young N (1991) Competitive paging and dual-guided on-line weighted caching and matching algorithms. Ph.D. Thesis, Princeton University Zheng F, Cheng Y, Liu M, Xu Y (2013) Online interval scheduling on a single machine with finite lookahead. Comput Oper Res 40(1):180–191 Publisher’s Note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations. 123