18
Research Collection Report On the Power of Advice and Randomization for the Disjoint Path Allocation Problem Author(s): Barhum, Kfir; Böckenhauer, Hans-Joachim; Forišek, Michal; Gebauer, Heidi; Hromkovič, Juraj; Krug, Sacha; Smula, Jasmin; Steffen, Björn Publication Date: 2013 Permanent Link: https://doi.org/10.3929/ethz-a-009900746 Rights / License: In Copyright - Non-Commercial Use Permitted This page was generated automatically upon download from the ETH Zurich Research Collection . For more information please consult the Terms of use . ETH Library

dspace cover page - research-collection.ethz.ch7082/eth-7082-01.pdfOnthePowerofAdviceandRandomization fortheDisjointPathAllocationProblem? KfirBarhum 1,Hans-JoachimBöckenhauer ,MichalForišek2,HeidiGebauer

  • Upload
    others

  • View
    10

  • Download
    0

Embed Size (px)

Citation preview

Page 1: dspace cover page - research-collection.ethz.ch7082/eth-7082-01.pdfOnthePowerofAdviceandRandomization fortheDisjointPathAllocationProblem? KfirBarhum 1,Hans-JoachimBöckenhauer ,MichalForišek2,HeidiGebauer

Research Collection

Report

On the Power of Advice and Randomization for the Disjoint PathAllocation Problem

Author(s): Barhum, Kfir; Böckenhauer, Hans-Joachim; Forišek, Michal; Gebauer, Heidi; Hromkovič, Juraj; Krug,Sacha; Smula, Jasmin; Steffen, Björn

Publication Date: 2013

Permanent Link: https://doi.org/10.3929/ethz-a-009900746

Rights / License: In Copyright - Non-Commercial Use Permitted

This page was generated automatically upon download from the ETH Zurich Research Collection. For moreinformation please consult the Terms of use.

ETH Library

Page 2: dspace cover page - research-collection.ethz.ch7082/eth-7082-01.pdfOnthePowerofAdviceandRandomization fortheDisjointPathAllocationProblem? KfirBarhum 1,Hans-JoachimBöckenhauer ,MichalForišek2,HeidiGebauer

On the Power of Advice and Randomizationfor the Disjoint Path Allocation Problem?

Kfir Barhum1, Hans-Joachim Böckenhauer1, Michal Forišek2, Heidi Gebauer1,Juraj Hromkovič1, Sacha Krug1, Jasmin Smula1, and Björn Steffen1

1 Department of Computer Science, ETH Zurich, Switzerland{kfir.barhum,hjb,gebauerh,juraj.hromkovic,

sacha.krug,jasmin.smula,bjoern.steffen}@inf.ethz.ch2 Faculty of Mathematics, Physics and Informatics, Comenius University, Bratislava

[email protected]

Abstract In the disjoint path allocation problem, we consider a path of L + 1 vertices,representing the nodes in a communication network. Requests for an unbounded-time com-munication between pairs of vertices arrive in an online fashion and some central authorityhas to decide which of these calls to admit. The constraint is that each edge in the path canserve only one call and the goal is to admit as many calls as possible.Advice complexity is a recently introduced method for a fine-grained analysis of the hardnessof online problems. We consider the advice complexity of disjoint path allocation, measuredin the length L of the path. We show that asking for a bit of advice for every edge is necessaryto be optimal and give online algorithms with advice achieving a constant competitive ratiousing much less advice. Furthermore, we consider the case of using less than log log L advicebits, where we prove almost matching lower and upper bounds on the competitive ratio.In the latter case, we moreover show that randomness is as powerful as advice by designinga barely random online algorithm achieving almost the same competitive ratio.

1 Introduction

Many important practical computational problems are best formulated in an online scenario, wherethe input arrives piecewise over time and an online algorithm has to irrevocably compute a partof the output for any given part of the input. One prominent example for such an online problemis call admission in communication networks, where a central authority has to admit or rejectrequests for communication between certain pairs of nodes in the network.

We consider a special case of the call admission problem in this paper, called the disjoint pathallocation problem. Here, the communication network is simply modeled by a path of length L,where the L+1 vertices correspond to the nodes of the network which might want to communicatewith each other using the links modeled by the edges of the path. We assume that a communicationrequest between two vertices is issued at some point in time, but is of unbounded duration.Moreover, we assume that any link of the path is only capable of serving one communicationrequest. Thus, admitting a request between two vertices on the path prevents any vertex in betweenfrom participating in any communication. The goal is to admit as many requests as possible. Thisproblem is well-studied, for an overview of known results, see, e. g., Section 13.5 in the textbookby Borodin and El-Yaniv [3].

Classically, the hardness of online problems is measured using the so-called competitive analysisintroduced by Sleator and Tarjan [21] where the cost of the solution computed by an onlinealgorithm is compared to the cost of an optimal (offline) algorithm that knows the completeinput beforehand. Obviously, the offline algorithm has a big advantage by knowing the completeinput. Thus, this way of measuring the hardness of online problems can be considered quite rough.Recently, advice complexity has been introduced as a means for a more fine-grained complexityanalysis of online problems [7,11,13,16]. The idea here is to measure how much information about? This work was partially supported by SNF grant 200021-141089.

Page 3: dspace cover page - research-collection.ethz.ch7082/eth-7082-01.pdfOnthePowerofAdviceandRandomization fortheDisjointPathAllocationProblem? KfirBarhum 1,Hans-JoachimBöckenhauer ,MichalForišek2,HeidiGebauer

2 K. Barhum et al.

the not yet revealed parts of the input is necessary and sufficient to compute an optimal solutionor to reach a specific competitive ratio.

In the model of advice complexity, an online algorithm gets advice about the upcoming in-stance on an advice tape that has been prepared in advance by a clairvoyant and computationallyunlimited oracle. The advice complexity is then the number of bits the algorithm reads from thisadvice tape. A number of online problems have already been analyzed within this model, such aspaging [7], buffer management [12], job shop scheduling [7, 18], the k-server problem [6], onlineset cover [17], string guessing [4], metrical tasks systems [13], graph exploration [10], independentset [9], knapsack [5], bin packing [8], and graph coloring problems [1, 2, 14,20].

For a detailed introduction to the advice complexity of online problems, see [7, 16]. There isalso an interesting relationship between advice complexity and randomized algorithms as discussedin [6, 13,18].

The disjoint path allocation problem was among the first problems that were investigated usingthe model of advice complexity, but most upper and lower bounds were measured depending on thenumber of communication requests [7]. In contrast, most classical results in the competitive analysisof the disjoint path allocation problem were derived with respect to the size of the communicationnetwork, i. e., the length of the path. In this paper, we adopt this convention and analyze theadvice complexity of the disjoint path allocation problem with respect to the path length. Ourresults can be summarized as follows. First, we prove that L − 1 advice bits are both necessaryand sufficient to compute an optimal solution. While the upper bound is rather straightforward,we introduce a new technique to prove the lower bound which might be of independent interest.Second, we analyze the competitive ratio achievable by using a constant number of advice bits,or any advice of size b ≤ log logL, respectively. Here, we are able to prove an upper boundof((

2b + 1)·(L

12b+1 + 2

)− 4)

and an almost matching lower bound. Then, we design severalonline algorithms with advice to achieve a constant competitive ratio. These upper bounds arecomplemented by a result of Gebauer et al. [15], who show that for every (not necessarily integer)constant c there is a δ = δ(c) such that any c-competitive algorithm needs at least δL advice bits.We note that their result can also be generalized for slowly growing functions c = c(L).

In the last part of the paper, we prove that any number b ≤ log logL of advice bits can bereplaced by the same number of random bits while achieving (almost) the same competitive ratioin expectation. Thus, in some sense, a small number of random bits is as powerful as a smallnumber of advice bits for this problem.

2 Preliminaries

Let us first formally define the framework we are using. Consider an input sequence I = (x1, . . . , xn)of some maximization problem U with cost function cost(·). Let us denote by Opt an (offline) al-gorithm that outputs an optimal solution on every input I. We emphasize that Opt has access tothe entire input sequence in advance and is computationally unbounded. Let c ≥ 1.

Definition 1 (Online Algorithm). An online algorithm A computes the output sequence A(I) =(y1, . . . , yn), where yi = f(x1, . . . , xi), for some function f and 1 ≤ i ≤ n. An algorithm A is c-competitive if there is a constant α such that cost(A(I)) ≥ cost(Opt(I))/c−α holds. We call c thecompetitive ratio of A. If α = 0, then A is strictly c-competitive. We call A optimal if it is strictly1-competitive.

Definition 2 (Online Algorithm with Advice). An online algorithm A with advice computesthe output sequence Aφ(I) = (y1, . . . , yn), where φ is an infinite bit string called the advice andyi = f(φ, x1, . . . , xi), for 1 ≤ i ≤ n. The algorithm A is c-competitive with advice complexity s(n)if there is a constant α such that, for every n and every input sequence I of length at most n, thereis an advice φ such that cost(Aφ(I)) ≥ cost(Opt(I))/c−α holds and at most the first s(n) bits of φare accessed during the computation of Aφ on I. The definitions of a c-competitive algorithm andan optimal algorithm are analogous to those in Definition 1.

Page 4: dspace cover page - research-collection.ethz.ch7082/eth-7082-01.pdfOnthePowerofAdviceandRandomization fortheDisjointPathAllocationProblem? KfirBarhum 1,Hans-JoachimBöckenhauer ,MichalForišek2,HeidiGebauer

Advice and Randomization for the Disjoint Path Allocation Problem 3

At times, when the input sequence I is clear from the context, we omit the explicit dependenceon it and write Opt and cost(Opt) instead of Opt(I) and cost(Opt(I)), respectively. For a givensequence σ, we denote by [σ]k the prefix of σ of length k. Throughout this paper, log x denotesthe binary logarithm of x.

3 Problem Definition and Related Work

The disjoint path allocation problem is the following maximization problem. Given is a path and asequence of requests, each of them being a subpath (given by two vertices of the path). The goal isto admit as many requests as possible, such that no two admitted requests share a common edge.We consider the online version of the problem, where the requests arrive sequentially, and thedecision whether to admit a given request or not must be made before the next request arrives.Once the decision is made, it cannot be revoked later.

More formally, we define the disjoint path allocation problem as follows:Definition 3. The disjoint path allocation problem (DPA), is the following maximization problemon a path P = (v0, . . . , vL). In the first time step, the number L is revealed. In every successivetime step t, for 2 ≤ t ≤ n + 1, a request is asked, represented by a subpath of P . The goal isto admit as many pairwise edge-disjoint requests as possible. An online algorithm has to decideimmediately whether to admit a request.We write [i, j] to denote the request for the subpath from vi to vj and we call i the start pointand j the end point of the request. The length of [i, j] is j − i.

We do not want to restrict ourselves to strict competitiveness for this problem. To see why,consider the following instance. An adversary Adv may first request the path P itself. If an al-gorithm A admits this request, then Adv requests all subpaths of P of length 1 and A achieves acompetitive ratio of L. If A does not admit the first request, then Adv sends no more requests and Ais not competitive at all. Thus, no deterministic algorithm can achieve a better strict competitiveratio than L. We avoid such pathological instances by setting α := 1, as the algorithm is then freeto reject the first request and still be competitive [19]. Note that, when computing the competitiveratio, this allows us to assume, without loss of generality, that any algorithm admits at least onerequest.

Also note that L is not a parameter of the problem, but is communicated as the first re-quest instead. This avoids another pitfall: If an online algorithm A was designed for some specificconstant L, it would always be 1-competitive when admitting at least one request, because forα :=

(L+1

2), we get

cost(A(I)) ≥ cost(Opt(I))1 −

(L+ 1

2

),

as every subpath is, without loss of generality, requested at most once and therefore, there can beat most

(L+1

2)many requests in total.

The disjoint path allocation problem can be analyzed with respect to two different parameters:the number n of requested subpaths and the length L of the path. For the parameter n, therandomized setting was analyzed in [3] and the advice complexity in [7].

Theorem 1 (Böckenhauer et al. [7]). Every strictly c-competitive algorithm for DPA needs toread at least (n+ 2)/(2c)− 2 advice bits. ut

Corollary 1. Every optimal algorithm for DPA needs to read at least n/2− 1 advice bits. ut

Theorem 2 (Böckenhauer et al. [7]). For every c > 1, there is a c-competitive algorithm forDPA that reads at most

min{n log

(c

(c− 1)(c−1)/c

),n lognc

}+ 3 logn+O(1)

advice bits. ut

Page 5: dspace cover page - research-collection.ethz.ch7082/eth-7082-01.pdfOnthePowerofAdviceandRandomization fortheDisjointPathAllocationProblem? KfirBarhum 1,Hans-JoachimBöckenhauer ,MichalForišek2,HeidiGebauer

4 K. Barhum et al.

For L, only a lower bound on the advice complexity for optimality has previously been shown.

Theorem 3 (Komm [19]). Every optimal online algorithm for DPA needs to read at least L/2advice bits. ut

We analyze DPA with respect to the parameter L. We establish upper and lower bounds foroptimality and c-competitiveness.

4 A Technique to Prove Lower Bounds

We start by introducing a generic technique to prove lower bounds on the advice complexity ofonline problems when solving them optimally. The technique is based on a set of special instancessuch that no online algorithm can distinguish their prefixes of a certain length. Yet, an optimalonline algorithm would need to behave differently on these instances, even before there is a dis-tinction between them. Thus, the online algorithm is required to read advice in order to solvethese instances optimally, as there is no other way to distinguish them.

The idea is to partition a set of instances into subsets, such that all input sequences of a givensubset start with the same prefix of a given length for various prefix lengths. These partitions canbe structured in a hierarchy of partitions, depending on the respective prefix length. Thus, we candescribe the relationship between these instance sets with a partition tree.Definition 4 (partition tree). Consider some online problem U and a set I of input sequencesof U . We define a partition tree of I, denoted by T (I), as a labeled rooted tree that satisfies thefollowing properties:

1. Each vertex v of T (I) is labeled by an instance set Iv ⊆ I and by a natural number kv, suchthat any two input sequences I1, I2 ∈ Iv have a common prefix of length at least kv, i. e.,[I1]kv

= [I2]kv.

2. For every internal vertex v, the instance sets of its children form a partition of Iv. Furthermore,for each child w, it holds that kw ≥ kv.

3. For the root v of T (I), we have Iv = I.

Next we want to use a constructed partition tree to prove that an optimal online algorithmis required to read a certain number of advice bits. Here, the first property of a partition tree iscrucial. This implies that no online algorithm can distinguish two given input sequences if it onlysees their common prefix. Thus, an optimal online algorithm with advice has to use a differentadvice string for each set of the partition tree, as the following lemma shows.Lemma 1. Let I be a set of input sequences of some online problem U and let T (I) be a partitiontree of I. Consider any two vertices v1 and v2 of T (I) with lowest common ancestor v and anytwo input sequences I1 ∈ Iv1 and I2 ∈ Iv2 .

If every optimal online algorithm A with advice needs to behave differently on the common prefixof these input sequences, more specifically, if[

A(I1)]kv6=[A(I2)

]kv,

then A needs a different advice string for each of the two input sequences I1 and I2.

Proof. We have I1, I2 ∈ Iv. According to the definition of T (I), the prefixes of length kv of I1and I2 are equal, but [A(I1)]kv

6= [A(I2)]kvby the prerequisite of the lemma. Because the prefixes

of length kv of the two input sequences are the same, there is no way to distinguish them exceptby using a different advice string for each. Thus, A needs a different advice string for each of thetwo input sequences in order to answer both of them optimally. ut

This lemma leads to the following corollary that we can use to prove lower bounds.Corollary 2. Let I be a set of input sequences of some online problem U and let T (I) be apartition tree of I that satisfies the prerequisite of Lemma 1. Then, every optimal online algorithmfor U requires at least dlogme advice bits, where m is the number of leaves of T (I). ut

Page 6: dspace cover page - research-collection.ethz.ch7082/eth-7082-01.pdfOnthePowerofAdviceandRandomization fortheDisjointPathAllocationProblem? KfirBarhum 1,Hans-JoachimBöckenhauer ,MichalForišek2,HeidiGebauer

Advice and Randomization for the Disjoint Path Allocation Problem 5

phase 1

phase 2

phase 3

phase 4

phase 5

phase 6

1 0 0 1 1 0 1

Figure 1: Example of an input sequence represented by the bit string 1001101. The unique optimalsolution is highlighted in gray.

5 Bounds for Achieving Optimality

Using the techniques from Section 4, we improve the lower bound from Theorem 3 by a factor of2. This new bound is tight.

Theorem 4. To solve DPA optimally, L− 1 advice bits are necessary and sufficient.

Proof. For the upper bound, consider an online algorithm A that reads L− 1 advice bits to learnwhether a request that starts at the corresponding vertex should be admitted. More precisely,let b1 . . . bL−1 denote the advice bits, and let b0 := 1. Then, A admits a request [i, j] if and onlyif bi = 1 and bk = 0, for i < k < j.

For the lower bound, we construct a set I of input sequences for which there is a partitiontree T (I) that satisfies the prerequisite of Lemma 1. Then, we only need to show that T (I) hasthe desired number of leaves in order to prove the theorem.

The requests of a particular input sequence are asked over a series of L phases, from phase Ldown to 1. In each phase p, all requests of length p are asked from the leftmost request to therightmost one, except for some requests, such that each input instance is different. More specifically,for each input sequence, an associated bit string b0 . . . bL with b0 = 1, bL = 1 and b1 . . . bL−1 ∈{0, 1}L−1 represents the optimal solution for this input sequence as described for the upper bound.If a request [i, j] in phase (j − i) is designated to be admitted in the optimal solution, that is,bi = 1, bj = 1 and bk = 0, for i < k < j, then, in subsequent phases, no requests that overlap [i, j]are requested. An example of such an input sequence is shown in Figure 1.

Now we prove that T(I) satisfies the prerequisite Lemma 1, i. e., that no online algorithm candistinguish between these instances without advice.

Let I and I ′ be two input sequences from different vertices of T (I) and let p be the phase inwhich I and I ′ first differ. Let Opt(I) be an optimal output sequence for I. Because the requestsin phase p of the two input sequences are different, there must be a request in the previous phasethat should be admitted in one input sequence, but not in the other. (Otherwise, the two inputsequences would be the same, as the requests in phase p are dependent on whether some requestsshould be admitted in the previous phase.) Hence, an optimal output sequence Opt(I) for I cannotalso be optimal for I ′.

Page 7: dspace cover page - research-collection.ethz.ch7082/eth-7082-01.pdfOnthePowerofAdviceandRandomization fortheDisjointPathAllocationProblem? KfirBarhum 1,Hans-JoachimBöckenhauer ,MichalForišek2,HeidiGebauer

6 K. Barhum et al.

s

t

t

t

Figure 2: The worst case for the greedy algorithm.

This also shows that, in order for an online algorithm A to be optimal for both request sequences,it needs to behave differently already in phase (p + 1), and thus the prerequisite of Lemma 1 issatisfied.

The L − 1 bit strings define 2L−1 different request sequences, each belonging to a differentleaf of T (I). We have 2L−1 leaves and thus, from Lemma 1 and Corollary 2, it follows that anoptimal online algorithm needs at least log(2L−1) = L − 1 advice bits to be optimal for a giveninput sequence. ut

6 Bounds for Small Advice

Our first approach for an upper bound is to divide incoming requests into classes according totheir lengths and accept only requests from one class, based on the advice.

For this, we need the following simple fact about the greedy algorithm that admits everypossible request.

Lemma 2. If the length of all requests is at least t and at most s, where t ≤ s, then the greedyalgorithm is (b(s− 2)/tc+ 2)-competitive.

Proof. Consider any request r of length s that the greedy algorithm admits. The worst case isthat the optimal solution on this subpath consists of as many paths of length t as possible that areinternal to r as well as two paths that contain the endpoints of r as inner vertices (see Figure 2).Then, the optimal solution on this subpath has cost b(s− 2)/tc+ 2. ut

Theorem 5. There is a((

2b + 1)·(L

12b+1 + 2

)− 4)-competitive algorithm that uses at most b

advice bits.

Proof. We divide the set of all possible requests into 2b + 1 classes. Class C1 contains all requestsof length at most L

12b+1 , and class Ci, for 2 ≤ i ≤ 2b + 1, contains all requests of length at least

Li−1

2b+1 + 1 and at most Li

2b+1 .The oracle writes on the advice tape the index j ∈ {1, . . . , 2b} of the class Cj that contains the

most requests that can be accepted by a greedy algorithm, ignoring the class C2b+1. The algorithmreads the number j and greedily admits the requests in Cj , say a many in total. We know fromLemma 2 that some fixed optimal solution Opt contains at most

a ·

(⌊L

i

2b+1 − 2

Li−1

2b+1 + 1

⌋+ 2)≤ a ·

(L

12b+1 + 2

)requests in class Ci, for 2 ≤ i ≤ 2b. Moreover, Opt contains at most

a ·

(⌊L

12b+1 − 2

1

⌋+ 2)≤ a · L

12b+1

requests in class C1, again due to Lemma 2. For class C2b+1, the maximum number of requests

in Opt is L1

2b+1 , because all requests in this class have length greater than L2b

2b+1 . Because a ≥ 1,

Page 8: dspace cover page - research-collection.ethz.ch7082/eth-7082-01.pdfOnthePowerofAdviceandRandomization fortheDisjointPathAllocationProblem? KfirBarhum 1,Hans-JoachimBöckenhauer ,MichalForišek2,HeidiGebauer

Advice and Randomization for the Disjoint Path Allocation Problem 7

without loss of generality, we have

cost(Opt) ≤(2b − 1

)· a ·

(L

12b+1 + 2

)+ a · L

12b+1 + L

12b+1

=(2b − 1

)· a ·

(L

12b+1 + 2

)+ (a+ 1) · L

12b+1 + 4a− 4a

≤(2b − 1

)· a ·

(L

12b+1 + 2

)+ 2a ·

(L

12b+1 + 2

)− 4a

≤(2b + 1

)· a ·

(L

12b+1 + 2

)− 4a.

Hence, we obtain a competitive ratio of

cost(Opt)a

≤ (2b + 1) · a · (L1

2b+1 + 2)− 4aa

=(2b + 1

)·(L

12b+1 + 2

)− 4. ut

We immediately obtain the following results for the special cases b = 0, b = 1 and b =dlog log (L/2)e.

Corollary 3. 2√L-competitiveness can be achieved without advice. ut

Corollary 4. One advice bit is sufficient to be(

3 3√L+ 2

)-competitive. ut

Corollary 5. To be (4 logL− 4)-competitive, dlog log (L/2)e advice bits are sufficient. ut

We complement Theorem 5 with an almost matching lower bound. To this end, we use thefollowing technical result.

Lemma 3. Let m,L ∈ N+. We have

min1≤x≤L+1

L

x+mx1/m = (m+ 1)L1/(m+1). ut

Proof. It suffices to prove that, in the interval 1 ≤ x ≤ L+ 1, the function f(x) = Lx +mx1/m is

minimized for x0 = Lm/(m+1).Note that, in the considered interval, f is continuous. Moreover, f ′(x) = − L

x2 +x1/m−1. So theonly root of f ′ is x0 := Lm/(m+1). (Note that x0 lies in the considered range.) We have

f ′′(x) = 2 Lx3 +

(1m− 1)x1/m−2 = x−3

(2L+

(1m− 1)x1/m+1

).

Hence,f ′′(x0) > x0

−3(

2L− x0(1+m)/m

)= L−3m/(m+1) · L > 0.

So x0 is a local minimum of f . Since f ′ has no other root than x0, f has no other extremum.Thus, x0 is also a global minimum of f in the considered interval. In particular, f(1), f(L+ 1) ≥f(x0). (Indeed, if f(y) < f(x0) for some y ∈ {1, L + 1}, then we could find a local maximumbetween y and x0.) ut

Theorem 6. Any algorithm that uses at most b advice bits cannot achieve a competitive ratiobetter than (

2b + 1)L1/(2b+1) − 2b−1 (2b + 1

)− 3 · 2b.

We note that an online algorithm A using b advice bits can be considered as a set of 2b deter-ministic algorithms A1, . . . , A2b : For a given input sequence I, cost(A(I)) := maxi=1...2b cost(Ai(I))(cf. [17]). Thus, Theorem 6 is a direct consequence of the following lemma, which we will prove inthe sequel.

Page 9: dspace cover page - research-collection.ethz.ch7082/eth-7082-01.pdfOnthePowerofAdviceandRandomization fortheDisjointPathAllocationProblem? KfirBarhum 1,Hans-JoachimBöckenhauer ,MichalForišek2,HeidiGebauer

8 K. Barhum et al.

Lemma 4. For any set A = {A1, . . . , Am} of deterministic algorithms, there is an input sequenceI = I(L,A) such that

cost(Opt(I)) ≥ (m+ 1)L1/(m+1) − m(m+ 1)2 − 3m,

and cost(Aj(I)) ≤ 1, for every j ∈ {1, . . . ,m}.

Proof. We consider the sequence s = s(L) of requests consisting of

[0, i], [i, 2i], [2i, 3i], . . . , [(bL/ic − 1)i, bL/ic i],

for i = L,L− 1, . . . , 1 (in this order). Note that, for i = L, the corresponding request is just [0, L],and hence, s starts with [0, L] followed by [0, L− 1].

To prove Lemma 4, we apply induction onm. Note that we can assume without loss of generalitythat every algorithm admits each request of length 1.

Base case m = 1. For every given deterministic online algorithm A, we consider an adversary Advthat sends requests according to s until A admits some request, say [ri, (r + 1)i]. (Note that thishappens eventually, since by our assumption requests of length 1 are always admitted.) Then, Advpresents [ri, ri+ 1], [ri+ 1, ri+ 2], . . . , [(r+ 1)i− 1, (r+ 1)i]. We denote this input sequence by I.

Clearly, cost(A(I)) = 1, and there is a solution containing the requests

[ri, ri+ 1], [ri+ 1, ri+ 2], . . . , [(r + 1)i− 1, (r + 1)i]

and all but at most two of the presented requests of length i+ 1. Hence,

cost(Opt(I)) ≥ i+⌊

L

i+ 1

⌋− 2 ≥ i+ L

i+ 1 − 3.

By elementary calculus, the expression i + L/(i + 1) is minimized for i =√L − 1. Thus,

cost(Opt(I)) ≥ 2√L− 4.

Induction step. Let A = {A1, . . . , Am} be a set of deterministic algorithms. We first describe theinput sequence I = I(L,A). To this end, we consider an adversary Adv that, in the first phase,sends requests according to s, until some Aj admits some request, say [ry, (r + 1)y]. (Note thatthis happens eventually, since requests of length 1 are never refused.) In the second phase, Advpresents the input sequence I ′ = I(y,A\{Aj}) on the subpath P ′ = (ry, ry + 1, . . . , (r + 1)y).

Note that cost(Aj(I)) = 1 by construction. By induction, cost(A(I)) ≤ 1 for every A ∈ A\{Aj}.To bound cost(Opt(I)) from below, we consider the solution that contains all presented requestsof length y + 1 outside P ′ plus the number of requests contained in P ′ chosen by the optimalsolution for the second phase. In the first phase, at most two of the presented requests of lengthy + 1 intersect P ′. Hence,

cost(Opt(I)) ≥⌊

L

y + 1

⌋− 2 + cost(Opt(I ′)) ≥ L

y + 1 − 3 + cost(Opt(I ′)).

By induction, cost(Opt(I ′)) ≥ my1/m − (m−1)m2 − 3(m− 1). Let x := y + 1. Hence,

cost(Opt(I)) ≥ L

x− 3 +m(x− 1)1/m − (m− 1)m

2 − 3(m− 1)

= L

x+m(x− 1)1/m − (m− 1)m

2 − 3m. (1)

By the binomial theorem, (a+1)m ≥ am+1, for every natural number m ≥ 1 and every a ≥ 0.Setting a := (x− 1)1/m yields ((x− 1)1/m + 1)m ≥ x, and thus (x− 1)1/m ≥ x1/m − 1. Togetherwith (1), this implies

cost(Opt(I)) ≥ L

x+m(x1/m − 1)− (m− 1)m

2 − 3m = L

x+mx1/m − m(m+ 1)

2 − 3m.

Page 10: dspace cover page - research-collection.ethz.ch7082/eth-7082-01.pdfOnthePowerofAdviceandRandomization fortheDisjointPathAllocationProblem? KfirBarhum 1,Hans-JoachimBöckenhauer ,MichalForišek2,HeidiGebauer

Advice and Randomization for the Disjoint Path Allocation Problem 9

By Lemma 3, we obtain

cost(Opt(I)) = (m+ 1)L1/(m+1) − m(m+ 1)2 − 3m. ut

7 Upper Bounds for c-Competitiveness

In this section, we present several complementary upper bounds on the advice complexity toachieve c-competitiveness. The first algorithm that we present divides the path into segments andtreats those segments separately. For this, we need the following simple observation.

Lemma 5. For every k ∈ R>1, we have b√kc+ k/b

√kc < 2

√k + 1.

Proof. Let b√kc =

√k − δ for δ ∈ [0, 1), hence

√k − δ ∈ N≥1. Then we have

b√kc+ k

b√kc

=√k − δ + k√

k − δ

=√k − δ +

√k + δ

√k√

k − δ

= 2√k + δ ·

√k − (

√k − δ)√

k − δ

= 2√k + δ2√k − δ

< 2√k + 1,

where the last inequality holds because δ < 1 and√k − δ ≥ 1. ut

Theorem 7. There is a c-competitive online algorithm A, for c = 2√k with k ∈ N+, that uses at

most⌈⌈

4L/c2⌉ log 3⌉advice bits.

Proof. We divide the path into N := d(L+ 1)/ke consecutive vertex-disjoint subpaths (or seg-ments) of length k− 1, i. e., every segment contains k vertices and k− 1 edges (except maybe thelast one), and there is a separating edge between any two consecutive segments.

Let Opt be an arbitrary, but fixed optimal solution. For every segment Si, 1 ≤ i ≤ N , A reads anumber xi ∈ {0, 1, 2} from the advice tape with the following meaning. If xi = 0, then no requestin Opt starts in Si. (We then call Si empty.) If xi = 1, then at least one and at most b

√kc requests

in Opt start in Si. If xi = 2, then more than b√kc requests in Opt start in Si. This needs at

most dN log 3e advice bits, and A reads the entire advice after the first request.3Let r be an incoming request starting in segment Si that can still be admitted, and let Sj be

the first non-empty segment to the right of Si, i. e., xi+1 = xi+2 = · · · = xj−1 = 0 and xj 6= 0.Furthermore, let Sl be the segment in which r ends. A inspects xi and xj and behaves as follows.

1. If xi = 1 and xj = 1, then A admits r if l ≤ j.2. If xi = 1 and xj = 2, then A admits r if l < j.3. If xi = 2, then A admits r if l < j and r contains at most b

√kc edges in segment Si.

If there is no segment Sj , i. e., if Si+1 = Si+2 = · · · = SN = 0, then A admits r if xi = 1, or ifr has length of at most d

√ke and xi = 2.

Now we investigate the competitive ratio of these three cases separately. Without loss of gen-erality, we assume j = i+ 1.

1. The worst case is when Opt contains b√kc requests starting in Si and equally many requests

starting in Si+1, but A admits one long request covering all these short ones (see Figure 3a).This results in a competitive ratio of 2b

√kc for these two segments.

3 A then knows L and k and thus also how many advice bits to read.

Page 11: dspace cover page - research-collection.ethz.ch7082/eth-7082-01.pdfOnthePowerofAdviceandRandomization fortheDisjointPathAllocationProblem? KfirBarhum 1,Hans-JoachimBöckenhauer ,MichalForišek2,HeidiGebauer

10 K. Barhum et al.

. . .v1

. . .

vk−b√kc+1. . .

vk−1 vk w1 w2. . .

wb√kc+1. . .

wk. . .

Si Sj

Opt: . . . . . . 2b√

kc requestsA: 1 request

(a) Case 1 (xi = 1, xj = 1).

. . .v1

. . .

vk−b√kc. . .

vk−2 vk−1 vk w1. . .

Si

Opt: . . . b√

kc requestsA: 1 request

(b) Case 2 (xi = 1, xj = 2).

Figure 3: Cases 1 and 2 in the proof of Theorem 7.

2. Similar as above, the worst case here is when Opt contains b√kc requests starting and ending

in Si, but A admits one long request covering all these short ones (see Figure 3b). This resultsin a competitive ratio of b

√kc for segment Si.

3. We only consider Si. Let aA be the number of requests of length at most b√kc admitted by

A. We know that aA ≥ 1 because no request is ever admitted that starts in some segment Sl,l < i, and ends in Si. This in turn immediately follows from the fact that xi = 2 and the rulesabout when to admit a request.By setting t := 1 and s := b

√kc, we know from Lemma 2 that Opt contains aOpt ≤ aA · b

√kc

requests of length at most b√kc (plus possibly one more that starts in Si and ends in Si+1, but

let us assume, without loss of generality, that this is not the case). Additionally, Opt containsat most b(k − aOpt)/b

√kcc requests of length greater than b

√kc (or one less if Opt contains a

short request that starts in Si and ends in Si+1). Then, we get a competitive ratio of

aOpt +⌊k−aOpt

b√kc

⌋aA

≤aOpt · b

√kc+ k − aOpt

aAb√kc

=aOpt ·

(b√kc − 1

)+ k

aAb√kc

≤(b√kc − 1

)+ k

aAb√kc

≤ b√kc − 1 + k

b√kc

< 2√k,

where the last inequality follows from Lemma 5.

Note that dL/ke 6= d(L+ 1)/ke if and only if L is a multiple of k. But in this case, the rightmostsegment contains only one vertex and thus, no advice is necessary for it. Therefore, we have shownthat ddL/ke log 3e advice bits are sufficient to be 2

√k-competitive. Setting c = 2

√k, the theorem

follows. ut

The following result provides a better upper bound than Theorem 7 for sufficiently large c.

Theorem 8. There is a c-competitive algorithm A, for c ∈ N+, that uses at most d2(L− 1)/ceadvice bits.

Page 12: dspace cover page - research-collection.ethz.ch7082/eth-7082-01.pdfOnthePowerofAdviceandRandomization fortheDisjointPathAllocationProblem? KfirBarhum 1,Hans-JoachimBöckenhauer ,MichalForišek2,HeidiGebauer

Advice and Randomization for the Disjoint Path Allocation Problem 11

Proof. Consider the encoding of some fixed optimal solution Opt as used in the proof of Theorem 4,i. e., a bitstring B of length L − 1 with a 1 at every position where a request starts that isadmitted in Opt. The oracle divides the subpath (v1, . . . , vL−1) into consecutive vertex-disjointsegments Si. The number of vertices and edges in Si is bc/2c if i is odd and dc/2e if i is even(except for the last segment, which may be shorter). The edge starting in segment Si and endingin Si+1 is numbered among the edges of Si. Then, the oracle writes a shorter bitstring d1 . . . db oflength b := d(L− 1)/(c/2)e on the tape, where di is the bitwise OR of all bits of B correspondingto vertices in segment Si.

A segment with corresponding advice bit 1 is called 1-segment. Then, A admits any satisfiablerequest in a 1-segment that has its end point in either this segment or the next 1-segment to theright. Let Si be an arbitrary 1-segment and Sj be the next 1-segment to the right of Si.

Assume that A admits at least one request that starts in either Si or Sj . Opt may admit up toc requests in these two segments, so the competitive ratio of A on these two segments is c.

Now assume that A does not accept any requests starting in Si or Sj . Because both are 1-segments, there must be a request ri starting in Si and ending in Si or Sj , and also a requestrj starting in Sj . Because A does not accept ri, it must already have accepted a request r thatis overlapping with ri. We know that r starts in the first 1-segment to the left of Si, because Adoes not admit requests that cover a complete 1-segment. Moreover, A must already have accepteda request starting in the next 1-segment to the right of Sj that overlaps with rj . Hence, on theconsidered four 1-segments A admits at least two requests, whereas Opt may satisfy at most 2crequests. Thus, the competitive ratio of A is c. ut

Now we generalize the approach from Theorem 5 by applying it to edge-disjoint segments ofthe path. The following result improves on the previous one, again for sufficiently large c.

Theorem 9. There is a c-competitive algorithm, for c = 4 log k with k ∈ N≥2, that uses at most⌈L

2c/4 ·( c

2 + dlog ce+ 0.33)⌉

advice bits.

Proof. Without loss of generality, let the length L of the path be a multiple of k, and let k be apower of 2. We divide the path of length L into L/k segments consisting of a subpath of lengthk each. We say that a request r belongs to segment S if r starts in S. In the following, we willconsider a fixed optimal solution Opt for some instance and, for each segment Si, the rightmostrequest ri of the optimal solution belonging to Si, for 1 ≤ i ≤ L/k. We say that a segment Siis empty if no requests in Opt belong to Si. (Note that therefore, when we say that Si is empty,some requests might still start in Si, but no requests that are part of Opt.)

After the first request, A knows L and reads all⌈L/(2c/4) · (c/2 + dlog ce+ 0.33)

⌉advice bits

at once, the first dL/k · (2 log k + log 5)e of which serve to specify the start and end points of allrequests ri, for i = 1, . . . , L/k. The first dL/k · log 5e advice bits d1, . . . , ddL/k·log 5e indicate howmany requests start and end in each segment. Either 0 or 1 requests start in segment Si and either0, 1 or 2 requests end in Si. (Note that one combination is not possible, namely 0 requests startingand 2 ending in Si.) The algorithm A interprets the next 2L/k · log k bits as 2L/k natural numberss1, . . . , sL/k, t1, . . . , tL/k between 1 and k, where si represents the starting point and ti the endingpoint of ri within a certain segment, where the segment in which ri starts respectively ends isunambiguously defined by the indicator bits d1, . . . , ddL/k·log 5e.

The algorithm A accepts all requests ri specified by the advice (let us call these type 1 requests)and does not accept any requests starting in empty segments. Now we will describe how A interpretsthe remaining advice bits. In each segment Si, some edges might be left that are not blockedby type 1 requests. Let this be ki ≤ k many edges. We will call requests that occur on theseremaining subpaths type 2 requests. For i = 1, . . . , L/k, the requests on the subpath in segment Siare partitioned into 2l+ 1 classes as in the proof of Theorem 5 for an appropriate value of l, whichwe will give later. To specify the class that contains the most requests that can be accepted by a

Page 13: dspace cover page - research-collection.ethz.ch7082/eth-7082-01.pdfOnthePowerofAdviceandRandomization fortheDisjointPathAllocationProblem? KfirBarhum 1,Hans-JoachimBöckenhauer ,MichalForišek2,HeidiGebauer

12 K. Barhum et al.

greedy algorithm for each segment (again analogously to Theorem 5), l · L/k bits are necessary.The algorithm A then greedily accepts the requests of the specified class in each segment.

We now calculate the overall competitive ratio as the maximum over the competitive ratios ofall segments. The competitive ratio of an empty segment is always 1, and a decision concerninga request r starting in an empty segment cannot impair the competitive ratio of other segments.This is because r is not contained in the optimal solution and is not accepted by the algorithmeither. Now let us consider a non-empty segment Si. We define oi as the number of type 2 requestsof segment Si that are contained in Opt. At least one request in each segment Si is accepted, thetype 1 request. The number of accepted type 2 requests on the ki edges that are not blocked bytype 1 requests is at least

oi

(2l + 1) ·(k

12l+1i + 2

)− 4≥ oi

(2l + 1) ·(k

12l+1 + 2

)− 4

due to Theorem 5 and because ki ≤ k. Hence, as the competitive ratio of each segment Si, andtherefore also as the overall competitive ratio for the presented algorithm, we obtain

c = ci ≤oi + 1oi

(2l+1)·(k

12l+1 +2

)−4

+ 1 <(2l + 1

)·(k

12l+1 + 2

)− 4.

Choosing l = dlog log ke, the algorithm A uses

L/k · d2 log k + log 5e+ l · L/k = dL/k · (2 log k + dlog log ke+ log 5)e

many advice bits and has a competitive ratio of

c <(2l + 1

)·(k

12l+1 + 2

)− 4 = (log k + 1) ·

(k

1log k+1 + 2

)− 4 < 4 log k.

The theorem follows. ut

We already know how to construct a bit string of length L−1 that serves as advice to be optimal.Below, we show that approximate knowledge of this bit string can still be used to guarantee agood competitive ratio. More precisely, we prove that we can get arbitrarily close to optimalityusing less than L− 1 advice bits.

Theorem 10. For any c = k/(k − 1) with k ∈ N≥2, there is a c-competitive algorithm that usesdlog(c/(c− 1))e+ L− 1− bb(c− 1)(L− 2)/cc · (2− log 3)c advice bits.

Proof. Let B = b1 . . . bL−1 be the bit string corresponding to some fixed optimal solution computedby an optimal online algorithm Opt as described in the proof of Theorem 4. Instead of using B,our advice string is a shorter sequence created from B by taking some pairs of consecutive bitsand adding them (producing a number between 0 and 2). For instance, instead of the sequence(0, 1, 0, 0, 1, 0, 1, 1) we might use the sequence (0, 1, 0 + 0, 1, 0, 1 + 1) = (0, 1, 0, 1, 0, 2). If there arep > 0 pairs of bits and the online algorithm knows their offsets, we need L−1−2p+dp log 3e ≤ L−1bits to store the resulting sequence.

Given such an advice sequence, an online algorithm A may behave as follows. First, it recon-structs the sequence B. This is only ambiguous if the sum of some two consecutive bits is 1. Inthat case we assume that the bits are 0 + 1 (and not 1 + 0). Given the reconstructed sequence, wesimulate Opt.

Let q be the number of pairs of bits we reconstructed incorrectly. We can easily see that Aconstructs a solution with at least cost(Opt)− q accepted requests: The worst that can happen isthat we lose one accepted request per such pair.

We will now consider k different strategies of creating the pairs of bits. For each i, 1 ≤ i ≤ k,we consider the strategy where the added pairs of bits are bi+ak + bi+ak+1, for all a ∈ N≥0,0 ≤ a ≤

⌈L−2k − 1

⌉. Hence, in each strategy, the number of such added pairs is p ≥

⌊L−2k

⌋.

Page 14: dspace cover page - research-collection.ethz.ch7082/eth-7082-01.pdfOnthePowerofAdviceandRandomization fortheDisjointPathAllocationProblem? KfirBarhum 1,Hans-JoachimBöckenhauer ,MichalForišek2,HeidiGebauer

Advice and Randomization for the Disjoint Path Allocation Problem 13

The advice string for A is produced as follows: It consists of dlog ke bits to announce thestrategy used, and then at most L−1−bb(L−2)/kc · (2− log 3)c bits to encode the correspondingcompressed sequence.

Clearly, each pair of consecutive bits is selected by exactly one of the k given strategies. Letz be the number of occurrences of consecutive bits 1, 0 in B. As these are non-overlapping, thereare at least z ones in B, hence cost(Opt) ≥ z. The strategy that we encode in the advice stringis chosen to be the strategy where the number of occurences of consecutive bits 1, 0 within theselected pairs is as small as possible. By the pigeonhole principle, in some strategy, the selectedpairs include at most z/k occurrences of consecutive bits 1, 0. Hence, the competitive ratio of ouralgorithm is at most cost(Opt)/(cost(Opt) − z/k), and as z ≤ cost(Opt), the competitive ratio isat most cost(Opt)/(cost(Opt)− cost(Opt)/k) = k/(k − 1). ut

Corollary 6. Fewer than 0.8L bits are sufficient to be 2-competitive. Fewer than 0.87L bits aresufficient to be 3/2-competitive. ut

It is important to observe that indeed all four of the upper bounds established above arenecessary, as they complement each other. In other words, each of them covers a particular rangeof c. More precisely, for 1 ≤ c ≤ 3, Theorem 10 provides the best upper bound. (Note that thetheorem actually only applies to competitive ratios in the range 1 ≤ c ≤ 2, but the upper boundfor 2 trivially propagates to all larger values.) In the range 3 ≤ c ≤ 2

√3, Theorem 8 is the best

choice, and for c ≥ 2√

3, Theorem 7 is even better. For c ≥ 64, however, they are all outperformedby the algorithm from Theorem 9.

8 On the Power of Random Bits

We continue the study of the exact power of randomness in online algorithms (focusing on DPA)and show a trade-off between the number of random bits available to the online algorithm and itscompetitive ratio.

Recall that an O(log(L))-competitive algorithm for DPA can be implemented using dlog log(L)erandom bits, and this matches the lower bound on the competitive ratio that can be obtained byany randomized online algorithm (Theorems 13.7 and 13.8 in [3]).

In this section, we obtain an online algorithm that uses only b random bits and enjoys acompetitive ratio of (L

12b · 2b+1) for any b ∈ {0, . . . , dlog log(L)e}. Indeed, for b = 0, we obtain the

greedy algorithm, and for b = dlog log(L)e, we obtain the randomized algorithm from [3].

8.1 Partitioning Edges and Intervals

In this section, we identify the edge (vt, vt+1) with its right vertex and call it edge t+ 1. That is,a request [i, j] contains the edges {i+ 1, . . . , j}. Requests intersect if they contain a mutual edge.A set of requests covers a request if every edge in the request is contained by some request fromthe set.

It will be useful to think of an edge t as the bit-string of length log(L+1) that denotes its binaryexpansion. For simplicity of presentation, for the rest of this section, we assume that L = 2` − 1for some integer `, but our results here hold for any L (just think of the natural embedding of thepath to the first L vertices in a path of length L′ − 1, where L′ is the smallest power of 2 largerthan L).

We partition the edges into ` levels, where an edge e belongs to level λ(e), where λ : E → N

is given by λ(e) := max { t : 2t divides e }. Alternatively, λ(e) is the largest t such that, in thebinary representation of e, the t right-most bits of e are zero. That is, the edge 10`−1 is the onlyedge of level ` − 1, the edges 10`−2 and 110`−2 are the only edges of level ` − 2, and in general,there are exactly 2`−j−1 edges of level j.

It will be useful to consider a coarser partition to blocks of B levels. To this end, for everyB ∈ N+, we define the B-block of an edge λB : E → N by λB(e) :=

⌊λ(e)B

⌋. It is immediate that

Page 15: dspace cover page - research-collection.ethz.ch7082/eth-7082-01.pdfOnthePowerofAdviceandRandomization fortheDisjointPathAllocationProblem? KfirBarhum 1,Hans-JoachimBöckenhauer ,MichalForišek2,HeidiGebauer

14 K. Barhum et al.

λB(e) = i if and only if λ(e) ∈ {iB, iB + 1, . . . , (i + 1)B − 1}. We extend λ (resp., λB) to anyrequest r by setting λ(r) = maxe∈r λ(e) (resp., λB(r) = maxe∈r λB(e)). We call a request a level-t(resp., B-block i) request if λ(r) = t (resp., λB(r) = i).

8.2 The B-Block-Greedy Algorithm

Let Opt be an optimal solution for a DPA instance with value cost(Opt). We denote by ot thenumber of requests in Opt for which λ(r) = t. Similarly, we set o′i :=

∑B−1j=0 oiB+j , the number of

requests in Opt for which λB(r) = i. It holds that cost(Opt) =∑d`/Be−1i=0 o′i =

∑`−1t=0 ot. We shall

make use of the following proposition and the corollary that follows it.

Proposition 1. If a request contains two different edges of level t, then it contains an edge oflevel at least t+ 1.

Proof. Let e < e′ be two edges of level t in r. It holds that e = x10t and e′ = y10t for somex, y ∈ {0, 1}`−t. Now, observe that the edge e + 10t is of level at least t + 1, and is contained inthe request since e < e+ 10t ≤ e′. ut

Corollary 7. Every request r has exactly one edge of level λ(r).

Proof. Towards contradiction, let e, e′ ∈ r be two edges of maximal level λ(r). By Proposition 1,r contains an edge of level at least λ(r) + 1, which contradicts the maximality of the levels of eand e′. ut

Corollary 7 asserts that every request has exactly one edge of maximal level. We call this edgethe level-edge of the request. Additionally, for any edge e, any solution to a DPA instance containsat most one request with e as its level edge (this is true for any edge, and in particular for thelevel edges).

Proposition 2. Let r be a level-t request. Then, for any solution of a DPA instance and anyt′ ≥ t, the solution contains at most one level-t′ request that intersects with r.

Proof. Suppose that some solution contains two level-t′ requests, r′ and r′′, that intersect with r.Let e′ and e′′ be their level-edges of level t′, respectively. It must hold that e′ 6= e′′, as otherwise r′and r′′ overlap and cannot both be contained in the solution, and, without loss of generality, weassume that e′ < e′′. Observe that, by Proposition 1, the request [e′ − 1, e′′] contains an edge f oflevel at least t′+1. Now, since r intersects with both requests, the request [e′−1, e′′] is covered bythe union of the three requests, and therefore f is contained in at least one of r, r′ and r′′, whichis a contradiction to the fact that all three requests are of level at most t′. ut

We are now ready to present and analyze the i-th B-block greedy algorithm for DPA. Thealgorithm B-Block-Greedyi takes all the requests offered from B-block i as long as they do notintersect with requests already chosen to the current solution.

Proposition 3. For any instance of DPA, B-Block-Greedyi chooses at least 2−B · o′i requests.

Proof. We show that, for every edge that the algorithm chooses, at most 2B requests chosenby Opt from block i intersect with it. Let r be a request of level λ(r) = t = iB + j for somej ∈ {0, . . . , B−1} chosen by B-Block-Greedyi and let e, an edge of level t, be its level-edge. Thatis, the binary representation of e is of the form e = x10j0iB for some x ∈ {0, 1}`−1−j−iB .

Applying Proposition 2 to Opt yields the following.

Claim. for any level t′ ≥ t, Opt contains at most one level-t′ request that intersects with r.

Moreover we need the following claim.

Claim. For any level t′ < t, Opt contains at most 2(t−t′) level-t′ requests that intersect with r.

Page 16: dspace cover page - research-collection.ethz.ch7082/eth-7082-01.pdfOnthePowerofAdviceandRandomization fortheDisjointPathAllocationProblem? KfirBarhum 1,Hans-JoachimBöckenhauer ,MichalForišek2,HeidiGebauer

Advice and Randomization for the Disjoint Path Allocation Problem 15

The second claim can be shown as follows. Let r′ be a level-t′ request that intersects with r, andlet e′ be its level-edge. We argue that e′ is of the form xy10t′ for some y ∈ {0, 1}t−t′ and x as before.Assuming otherwise, without loss of generality that e′ < x0t−t′10t′ (the case where e′ > x1t−t′10t′

is handled similarly), it holds that e′ is of the form x′10t′ as it is a level-t′ edge, and thereforex′ < x0t−t′ . Now, consider the request (e′, e). It is covered by the requests r′ and r (as they intersectand contain both edges), and additionally, contains the edge x0t+1, since e′ < x0t+1 < e. Therefore,one of the requests (without loss of generality r′) contains the edge x0t+1. This immediately leadsto a contradiction, since it now holds that λ(r′) ≥ λ(x0t+1) ≥ t+1 > t′ = λ(r′). The claim followsusing Corollary 7 and the fact that there are 2(t−t′) edges of the form xy10t′ , where y ∈ {0, 1}t−t′ .

Combining both claims, we observe that the bound on the total number of requests in B-blocki that intersect with r and are contained in Opt is (B − j + 1) +

∑j−1k=1 2(j−k), and is maximized

when the request is chosen from the uppermost level of the block, in which case it holds that atmost 1 +

∑B−1j=1 2j ≤ 2B requests in Opt intersect with r. It follows that the algorithm chooses at

least 2−B · o′i requests. ut

8.3 A Competitive Algorithm using Blocks of Size B

Let B ∈ {1, . . . , `}. We define the (randomized) B-Block-Greedy algorithm as the algorithmthat chooses uniformly at random a block i ← {0, . . . , d`/Be − 1}, and behaves according toB-Block-Greedyi. The worst-case expected value of this algorithm is

Ei←{0,...,d`/Be−1}

[cost(B-Block-Greedyi)

]≥d`/Be−1∑i=0

2−B

d`/Be· o′i

= 2−B

d`/Be

`−1∑t=0

ot

= 2−B

d`/Be· cost(Opt).

Put differently, we obtain a (d`/Be · 2B)-competitive algorithm. Note that choosing a randomB-block out of the d`/Be possible blocks is the only random choice of the algorithm and can bedone using dlog(d`/Be)e random bits.4

8.4 A Competitive Algorithm Using b Random Bits

So far our analysis was made in terms of the block size B. Next, we present our main theorem forthis section, which delineates explicitly the competitive ratio obtained as a function of the numberof available random bits b.

Theorem 11. The randomized B-Block-Greedy algorithm that uses b random bits is (L1

2b ·2b+1)-competitive.

Proof. Observe that the smaller the block size B is, the better is the competitive ratio of thealgorithm. Using b bits it is possible to randomly choose of one of 2b blocks. Therefore, we can useany B ∈ N such that 2b ·B ≥ ` holds. Setting a block size of B = d`/2be levels in (d`/Be · 2B), weobtain a competitive ratio of 2d`/2be · d`/d `2b ee ≤ L1/2b · 2b+1 using b random bits. ut

4 In fact, in general, an implementation that uses only dlog(d`/Be)e bits obtains a (⌈`/B) · 2B+1⌉-

competitive ratio (that is, it incurs an additional factor of 2). However, whenever d`/Be is a powerof two (as is the case in the next subsection) we can save this factor while still using dlog(d`/Be)erandom bits.

Page 17: dspace cover page - research-collection.ethz.ch7082/eth-7082-01.pdfOnthePowerofAdviceandRandomization fortheDisjointPathAllocationProblem? KfirBarhum 1,Hans-JoachimBöckenhauer ,MichalForišek2,HeidiGebauer

16 K. Barhum et al.

Acknowledgments

The authors would like to thank Maria Paola Bianchi, Daniel Graf, and Dennis Komm for valuablediscussions.

References

1. M. P. Bianchi, H.-J. Böckenhauer, J. Hromkovič, L. Keller. Online coloring of bipartite graphs with andwithout advice. Proc. of the 18th Annual International Conference on Computing and Combinatorics(COCOON 2012), LNCS 7434, Springer-Verlag, 2012, pp. 519–530.

2. M. P. Bianchi, H.-J. Böckenhauer, J. Hromkovič, S. Krug, B. Steffen. On the advice complexity of theonline L(2,1)-coloring problem on paths and cycles. Proc. of the 19th Annual International Computingand Combinatorics Conference (COCOON 2013), LNCS 7936, Springer-Verlag, 2013, pp. 53–64.

3. A. Borodin, R. El-Yaniv. Online Computation and Competitive Analysis. Cambridge University Press,1998.

4. H.-J. Böckenhauer, J. Hromkovič, D. Komm, S. Krug, J. Smula, A. Sprock. The string guessingproblem as a method to prove lower bounds on the advice complexity. Electronic Colloquium onComputational Complexity (ECCC), TR12-162, 2012.

5. H.-J. Böckenhauer, D. Komm, R. Královič, P. Rossmanith. On the advice complexity of the knapsackproblem. Proc. of the 10th Latin American Symposium on Theoretical Informatics (LATIN 2012),LNCS 7256, Springer-Verlag, 2012, pp. 61–72.

6. H.-J. Böckenhauer, D. Komm, R. Královič, R. Královič. On the advice complexity of the k-serverproblem. Proc. of the 38th International Colloquium on Automata, Languages and Programming(ICALP 2011), LNCS 6755, Springer-Verlag, 2011, pp. 207–218.

7. H.-J. Böckenhauer, D. Komm, R. Královic, R. Královic, T. Mömke. On the advice complexity of onlineproblems. Proc. of the 20th International Symposium on Algorithms and Computation (ISAAC 2009),LNCS 5878, Springer-Verlag, 2009, pp. 331–340.

8. J. Boyar, S. Kamali, K. S. Larsen, A. López-Ortiz. Online bin packing with advice. Technical report,arXiv:1212.4016.

9. S. Dobrev, R. Královič, R. Královič. Independent set with advice: the impact of graph knowledge (ex-tended abstract). Proc. of the 10th Workshop on Approximation and Online Algorithms (WAOA 2012),LNCS 7846, Springer-Verlag, 2012, pp. 2–15.

10. S. Dobrev, R. Královič, E. Markou. Online graph exploration with advice. Proc. of the 19th Inter-national Colloquium on Structural Information and Communication Complexity (SIROCCO 2012),LNCS 7355, Springer-Verlag, 2012, pp. 267–278.

11. S. Dobrev, R. Královič, D. Pardubská. Measuring the problem-relevant information in input. Theo-retical Informatics and Applications (RAIRO), 43(3), 2009, pp. 585–613.

12. R. Dorrigiv, M. He, N. Zeh. On the advice complexity of buffer management. Proc. of the 23rd In-ternational Symposium on Algorithms and Computation (ISAAC 2012), LNCS 7676, Springer-Verlag,2012, pp. 136–145.

13. Y. Emek, P. Fraigniaud, A. Korman, A. Rosén. Online computation with advice. Proc. of the 36thInternational Colloquium on Automata, Languages and Programming (ICALP 2009), LNCS 5555,Springer-Verlag, 2009, pp. 427–438.

14. M. Forišek, L. Keller, M. Steinová. Advice complexity of online coloring for paths. Proc. of the6th International Conference on Language and Automata Theory and Applications (LATA 2012),LNCS 7183, Springer-Verlag, 2012, pp. 228–239.

15. H. Gebauer, R. Královič, R. Královič. On lower bounds for the advice complexity of the disjoint pathallocation problem. Technical report, in preparation.

16. J. Hromkovič, R. Královič, R. Královič. Information complexity of online problems. Proc. of the35th International Symposium on Mathematical Foundations of Computer Science (MFCS 2010),LNCS 6281, Springer-Verlag, 2010, pp. 24–36.

17. D. Komm, R. Královič, T. Mömke. On the advice complexity of the set cover problem. Proc. of the7th International Computer Science Symposium in Russia (CSR 2012), LNCS 7353, Springer-Verlag,2012, pp. 241–252.

18. D. Komm, R. Královič. Advice complexity and barely random algorithms. Theoretical Informaticsand Applications (RAIRO), 45(2), 2011, pp. 249–267.

19. D. Komm. Advice and Randomization in Online Computation. PhD Thesis, ETH Zurich, 2012.

Page 18: dspace cover page - research-collection.ethz.ch7082/eth-7082-01.pdfOnthePowerofAdviceandRandomization fortheDisjointPathAllocationProblem? KfirBarhum 1,Hans-JoachimBöckenhauer ,MichalForišek2,HeidiGebauer

Advice and Randomization for the Disjoint Path Allocation Problem 17

20. S. Seibert, A. Sprock, W. Unger. Advice complexity of the online vertex coloring problem. Proc. of theInternational Conference on Algorithms and Complexity (CIAC 2013), LNCS 7878, Springer-Verlag,2013, pp. 345–357.

21. D. D. Sleator, R. E. Tarjan. Amortized efficiency of list update and paging rules. Communications ofthe ACM, 28(2), 1985, pp. 202–208.