Slaying Hydrae: Improved Bounds for Generalized k-Server in Uniform Metrics

10/01/2018 ∙ by Marcin Bienkowski, et al. ∙ Akademia Sztuk Pięknych we Wrocławiu 0

The generalized k-server problem is an extension of the weighted k-server problem, which in turn extends the classic k-server problem. In the generalized k-server problem, each of k servers s_1, ..., s_k remains in its own metric space M_i. A request is a tuple (r_1,...,r_k), where r_i ∈ M_i, and to service it, an algorithm needs to move at least one server s_i to the point r_i. The objective is to minimize the total distance traveled by all servers. In this paper, we focus on the generalized k-server problem for the case where all M_i are uniform metrics. We show an O(k^2 · k)-competitive randomized algorithm improving over a recent result by Bansal et al. [SODA 2018], who gave an O(k^3 · k)-competitive algorithm. To this end, we define an abstract online problem, called Hydra game, and we show that a randomized solution of low cost to this game implies a randomized algorithm to the generalized k-server problem with low competitive ratio. We also show that no randomized algorithm can achieve competitive ratio lower than Ω(k), thus improving the lower bound of Ω(k / ^2 k) by Bansal et al.



There are no comments yet.


page 1

page 2

page 3

page 4

This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

1 Introduction

The -server problem, introduced by Manasse et al. [17], is one of the most well-studied and influential cornerstones of online analysis. The problem definition is deceivingly simple: There are servers, starting at a fixed set of points of a metric space . An input is a sequence of requests (points of ) and to service a request, an algorithm needs to move servers, so that at least one server ends at the request position. As typical for online problems, the -server problem is sequential in nature: an online algorithm Alg learns a new request only after it services the current one. The cost of Alg, defined as the total distance traveled by all its servers, is then compared to the cost of an offline solution Opt; the ratio between them, called competitive ratio, is subject to minimization.

In a natural extension of the -server problem, called the generalized -server problem [15, 19], each server remains in its own metric space . The request is a -tuple , where , and to service it, an algorithm needs to move servers, so that at least one server ends at the request position . The original -server problem corresponds to the case where all metric spaces  are identical and each request is of the form . The generalized -server problem contains many known online problems, such as the weighted -server problem [1, 7, 11, 12] or the CNN problem [8, 15, 18, 19] as special cases.

So far, the existence of an -competitive algorithm for the generalized -server problem in arbitrary metric spaces remains open. Furthermore, even for specific spaces, such as the line [15] or uniform metrics [1, 2, 15], the generalized -server problem requires techniques substantially different from those used to tackle the classic -server problems. For these reasons, studying this problem could lead to new techniques for designing online algorithms.

1.1 Previous Work

After almost three decades of extensive research counted in dozens of publications (see, e.g., a slightly dated survey by Koutsoupias [13]), we are closer to understanding the nature of the classic -server problem. The competitive ratio achievable by deterministic algorithms is between  [17] and  [14] with -competitive algorithms known for special cases, such as uniform metrics [20], lines and trees [9, 10], or metrics of points [17]. Less is known about competitive ratios for randomized algorithms: the best known lower bound holding for an arbitrary metric space is  [4] and the currently best upper bound of  has been recently obtained in a breakthrough result [6, 16].

In comparison, little is known about the generalized -server problem. In particular, algorithms attaining competitive ratios that are functions of exist only in a few special cases. The case of has been solved by Sitters and Stougie [19, 18], who gave constant competitive algorithms for this setting. Results for are known only for simpler metric spaces, as described below.

A uniform metric case

describes a scenario where all metrics are uniform with pairwise distances between different points equal to . For this case, Bansal et al. [2] recently presented an -competitive deterministic algorithm and -competitive randomized one. The deterministic competitive ratio is at least already when metrics have two points [15]. Furthermore, using a straightforward reduction to the metrical task system (MTS) problem [5], they show that the randomized competitive ratio is at least  [2].111In fact, for the generalized -server problem in uniform metrics, the paper by Bansal et al. [2] claims only the randomized lower bound of . To obtain it, they reduce the problem to the -state metrical task system (MTS) problem and apply a lower bound of for MTS [3]. By using their reduction and a stronger lower bound of for -state MTS [4], one could immediately obtain a lower bound of for the generalized -server problem.

A weighted uniform metric case

describes a scenario where each metric is uniform, but they have different scales, i.e., the pairwise distances between points of are equal to some values . For this setting, Bansal et al. [2] gave an -competitive deterministic algorithm extending an -competitive algorithm for the weighted -server problem in uniform metrics [12]. (The latter problem corresponds to the case where all requests are of the form .) This matches a lower bound of  [1] (which also holds already for the weighted -server problem).

1.2 Our Results and Paper Organization

In this paper, we study the uniform metric case of the generalized -server problem. We give a randomized -competitive algorithm improving over the bound by Bansal et al. [2].

To this end, we first define an elegant abstract online problem: a Hydra game played by an online algorithm against an adversary on an unweighted tree. We present the problem along with a randomized, low-cost online algorithm Herc in Section 2. We defer a formal definition of the generalized -server problem to Section 3.1. Later, in Section 3.2 and Section 3.3, we briefly sketch the structural claims concerning the generalized -server problem given by Bansal et al. [2]. Using this structural information, in Section 3.4, we link the generalized -server problem to the Hydra game: we show that a (randomized) algorithm of total cost  for the Hydra game on a specific tree (called factorial tree) implies a (randomized) -competitive solution for the generalized -server problem. This, along with the performance guarantees of Herc given in Section 2, yields the desired competitiveness bound. We remark that while the explicit definition of the Hydra game is new, the algorithm of Bansal et al. [2] easily extends to its framework.

Finally, in Section 4, we give an explicit lower bound construction for the generalized -server problem, which does not use a reduction to the metrical task system problem, hereby improving the bound from to .

2 Hydra Game

The Hydra game222This is a work of science. Any resemblance of the process to the decapitation of a mythical many-headed serpent-shaped monster is purely coincidental. is played between an online algorithm and an adversary on a fixed unweighted tree , known to the algorithm in advance. The nodes of have states which change throughout the game: Each node can be either asleep, alive or dead. Initially, the root  is alive and all other nodes are asleep. At all times, the following invariant is preserved: all ancestors of alive nodes are dead and all their descendants are asleep. In a single step, the adversary picks a single alive node , kills it (changes its state to dead) and makes all its (asleep) children alive. Note that such adversarial move preserves the invariant above.

An algorithm must remain at some alive node (initially, it is at the root ). If an algorithm is at a node that has just been killed, it has to move to any still alive node of its choice. For such movement it pays , the length of the shortest path between and in the tree . The game ends when all nodes except one (due to the invariant, it has to be an alive leaf) are dead. Unlike many online problems, here our sole goal is to minimize the total (movement) cost of an online algorithm (i.e., without comparing it to the cost of the offline optimum).

This game is not particularly interesting in the deterministic setting: As an adversary can always kill the node where a deterministic algorithm resides, the algorithm has to visit all but one nodes of tree , thus paying . On the other hand, a trivial DFS traversal of tree has the cost of . Therefore, we focus on randomized algorithms and assume that the adversary is oblivious: it knows an online algorithm, but not the random choices made by it thus far.

2.1 Randomized Algorithm Definition

It is convenient to describe our randomized algorithm Herc

as maintaining probability distribution

over set of nodes, where for any node , denotes the probability that Herc is at . We require that for any non-alive node . Whenever Herc decreases the probability at a given node by and increases it at another node by the same amount, we charge cost to Herc. By a straightforward argument, one can convert such description into a more standard, “behavioral” one, which describes randomized actions conditioned on the current state of an algorithm, and show that the costs of both descriptions coincide. We present the argument in Appendix A for completeness.

At any time during the game, for any node from tree , denotes the number of non-dead (i.e., alive or asleep) leaves in the subtree rooted at . As Herc knows tree in advance, it knows node ranks as well. Algorithm Herc maintains that is distributed over all alive nodes proportionally to their ranks. As all ancestors of an alive node are dead and all its descendants are asleep, we have if is alive and otherwise. In particular, at the beginning is at the root and everywhere else.

While this already defines the algorithm, we still discuss its behavior when an alive node is killed by the adversary. By Herc definition, we can think of the new probability distribution as obtained from in the following way. First, Herc sets . Next, the probability distribution at other nodes is modified as follows.

Case 1.

Node is not a leaf. Herc distributes the probability of among all (now alive) children of  proportionally to their ranks, i.e., sets for each child of .

Case 2.

Node is a leaf. Note that there were some other non-dead leaves, as otherwise the game would have ended before this step, and therefore . Herc distributes  among all other nodes, scaling the probabilities of the remaining nodes up by a factor of . That is, it sets for any node .

Note that in either case, is a valid probability distribution, i.e., all probabilities are non-negative and sum to . Moreover, is distributed over alive nodes proportionally to their new ranks, and is equal to zero at non-alive nodes.

Observation .

At any time, the probability of an alive leaf is exactly .

2.2 Analysis

For the analysis, we need a few more definitions. We denote the height and the number of the leaves of tree by and , respectively. Let denote the height of the subtree rooted at , where leaves are at level . Note that .

To bound the cost of Herc, we define a potential , which is a function of the current state of all nodes of and the current probability distribution of Herc. We show that  is initially , is always non-negative, and the cost of each Herc’s action can be covered by the decrease of . This will show that the total cost of Herc is at most the initial value of , i.e., .

Recall that for any non-alive node and that is the number of non-dead leaves in the subtree rooted at . Specifically, is the total number of non-dead leaves in . The potential is defined as


where is the -th harmonic number.

At any time, .


Since at all times, the first summand of is . The second summand of is a convex combination of node levels, which range from to , and is thus is bounded by . ∎

Fix any step in which an adversary kills a node and in result Herc changes the probability distribution from to . Let be the cost incurred in this step by Herc and let be the resulting change in the potential . Then, .


We denote the ranks before and after the adversarial event by and , respectively. We consider two cases depending on the type of .

Case 1.

The killed node is an internal node. In this case, as Herc simply moves the total probability of along a distance of one (from to its children). As , the first summand of remains unchanged. Let be the set of children of . Then,

where the inequality holds as level of a node is smaller than the level of its parent and the penultimate equality follows as the whole probability mass at is distributed to its children.

Case 2.

The killed node is a leaf. It is not the last alive node, as in such case the game would have ended before, i.e., it holds that . Herc moves the probability of (cf. Observation 2.1) along a distance of at most , and thus .

Furthermore, for any , . Using , we infer that the probability at a node increases by


where the last inequality follows as .

Using (2) and the relation (the number of non-dead leaves decreases by ), we compute the change of the potential:

In the first inequality, we used that and for any .

Summing up, we showed that in both cases. ∎

For the Hydra game played on any tree of height and leaves, the total cost of Herc is at most .


Let denote the initial value of . By non-negativity of and Lemma 2.2, it holds that the total cost of Herc is at most . The latter amount is at most by Lemma 2.2. ∎

Although Herc and Theorem 2.2 may seem simple, when applied to appropriate trees, they yield improved bounds for the generalized -server problem in uniform metrics, as shown in the next section.

3 Improved Algorithm for Generalized k-Server Problem

In this part, we show how any solution for the Hydra game on a specific tree (defined later) implies a solution to the generalized -server problem in uniform metrics. This will yield an -competitive randomized algorithm for the generalized -server problem, improving the previous bound of  [2]. We note that this reduction is implicit in Bansal et al. [2], so our contribution is in formalizing the Hydra game and solving it more efficiently.

3.1 Preliminaries

The generalized -server problem in uniform metrics is formally defined as follows. The offline part of the input comprises uniform metric spaces . The metric has points, the distance between each pair of its points is . There are servers denoted , the server starts at some fixed point in and always remains at some point of .

The online part of the input is a sequence of requests, each request being a -tuple . To service a request, an algorithm needs to move its servers, so that at least one server ends at the request position . Only after the current request is serviced, an online algorithm is given the next one.

The cost of an algorithm Alg on input , denoted , is the total distance traveled by all its servers. We say that a randomized online algorithm Alg is -competitive if there exists a constant , such that for any input , it holds that , where the expected value is taken over all random choices of Alg, and where denotes the cost of an optimal offline solution for input . The constant may be a function of , but it cannot depend on an online part of the input.

3.2 Phase-Based Approach

We start by showing how to split the sequence of requests into phases. To this end, we need a few more definitions. A (server) configuration is a -tuple , denoting positions of respective servers. For a request , we define the set of compatible configurations , i.e., the set of all configurations that can service the request without moving a server. Other configurations we call incompatible with .

An input is split into phases, with the first phase starting with the beginning of an input. The phase division process described below is constructed to ensure that Opt pays at least  in any phase, perhaps except the last one. At the beginning of a phase, all configurations are phase-feasible. Within a phase, upon a request , all configurations incompatible with  become phase-infeasible. The phase ends once all configurations are phase-infeasible; if this is not the end of the input, the next phase starts immediately, i.e., all configurations are restored to the phase-feasible state before the next request. Note that the description above is merely a way of splitting an input into phases and marking configurations as phase-feasible and phase-infeasible. The actual description of an online algorithm will be given later.

Fix any finished phase and any configuration and consider an algorithm that starts the phase with its servers at configuration . When configuration becomes phase-infeasible, such algorithm is forced to move and pay at least . As each configuration eventually becomes phase-infeasible in a finished phase, any algorithm (even Opt) must pay at least in any finished phase. Hence, if the cost of a phase-based algorithm for servicing requests of a single phase can be bounded by , the competitive ratio of this algorithm is then at most .

3.3 Configuration Spaces

Phase-based algorithms that we construct will not only track the set of phase-feasible configurations, but they will also group these configurations in certain sets, called configuration spaces.

To this end, we introduce a special wildcard character . Following [2], for any -tuple , we define a (configuration) space . A coordinate with is called free for the configuration space . That is, contains all configurations that agree with on all non-free coordinates.

The number of free coordinates in defines the dimension of denoted . Observe that the -dimensional space contains all configurations. If tuple  has no at any position, then is -dimensional and contains only (configuration) . The following lemma, proven by Bansal et al. [2], follows immediately from the definition of configuration spaces.

[Lemma 3.1 of [2]] Let be a -dimensional configuration space (for some ) whose all configurations are phase-feasible. Fix a request . If there exists a configuration in that is not compatible with , then there exist (not necessarily disjoint) subspaces , each of dimension , such that . Furthermore, for all , the -tuples and differ exactly at one position.

Using the lemma above, we may describe a way for an online algorithm to keep track of all phase-feasible configurations. To this end, it maintains a set of (not necessarily disjoint) configuration spaces, such that their union is exactly the set of all phase-feasible configurations. We call spaces from alive.

At the beginning, . Assume now that a request makes some configurations from a -dimensional space phase-infeasible. (A request may affect many spaces from ; we apply the described operations to each of them sequentially in an arbitrary order.) In such case, stops to be alive, it is removed from and till the end of the phase it will be called dead. Next, we apply Lemma 3.3 to , obtaining  configuration spaces , such that their union is , i.e., contains all those configurations from that remain phase-feasible. We make all spaces alive and we insert them into . (Note that when , set is removed from , but no space is added to it.) This way we ensure that the union of spaces from remains equal to the set of all phase-feasible configurations. Note that when a phase ends, becomes empty. We emphasize that the evolution of set within a phase depends only on the sequence of requests and not on the particular behavior of an online algorithm.

3.4 Factorial Trees: From Hydra Game to Generalized k-Server

Given the framework above, an online algorithm may keep track of the set of alive spaces , and at all times try to be in a configuration from some alive space. If this space becomes dead, an algorithm changes its configuration to any configuration from some other alive space from .

The crux is to choose an appropriate next alive space. To this end, our algorithm for the generalized -server problem will internally run an instance of the Hydra game (a new instance for each phase) on a special tree, and maintain a mapping from alive and dead spaces to alive and dead nodes in the tree. Moreover, spaces that are created during the algorithm runtime, as described in Section 3.3, have to be dynamically mapped to tree nodes that were so far asleep.

In our reduction, we use a -factorial tree. It has height (the root is on level and leaves on level ). Any node on level has exactly children, i.e., the subtree rooted at a -level node has leaves, hence the tree name. On the -factorial tree, the total cost of Herc is . We now show that this implies an improved algorithm for the generalized -server problem.

If there exists a (randomized) online algorithm for the Hydra game on the -factorial tree of total (expected) cost , then there exists a (randomized) -competitive online algorithm for the generalized -server problem in uniform metrics.


Let be an input for the generalized -server problem in uniform metric spaces.  splits  into phases as described in Section 3.2 and, in each phase, it tracks the phase-feasible nodes using set of alive spaces as described in Section 3.3. For each phase,  runs a new instance of the Hydra game on a -factorial tree , translates requests from to adversarial actions in , and reads the answers of executed on . At all times,  maintains a (bijective) mapping from alive (respectively, dead) -dimensional configuration spaces to alive (respectively, dead) nodes on the -th level of the tree . In particular, at the beginning, the only alive space is the -dimensional space , which corresponds to the tree root (on level ). The configuration of will always be an element of the space corresponding to the tree node containing . More precisely, within each phase, a request is processed in the following way by .

  • Suppose that request does not make any configuration phase-infeasible. In this case,  services from its current configuration and no changes are made to . Also no adversarial actions are executed in the Hydra game.

  • Suppose that request makes some (but not all) configurations phase-infeasible. We assume that this kills only one -dimensional configuration space . (If causes multiple configuration spaces to become dead, processes each such killing event separately, in an arbitrary order.)

    By the description given in Section 3.3, is then removed from and  new -dimensional spaces are added to . executes appropriate adversarial actions in the Hydra game: a node corresponding to is killed and its children on level change state from asleep to alive. modifies the mapping to track the change of : (new and now alive) spaces become mapped to (formerly asleep and now alive) children of . Afterwards, observes the answer of algorithm on the factorial tree and replays it. Suppose moves from (now dead) node to an alive node , whose corresponding space is . In this case, changes its configuration to the closest configuration (requiring minimal number of server moves) from . It remains to relate its cost to the cost of . By Lemma 3.3 (applied to spaces corresponding to all nodes on the tree path from to ), the corresponding -tuples , differ on at most positions. Therefore, adjusting the configuration of , so that it becomes an element of , requires at most server moves, which is exactly the cost of .

    Finally, note that when processes all killing events, it ends in a configuration of an alive space, and hence it can service the request from its new configuration.

  • Suppose that request makes all remaining configurations phase-infeasible. In such case, moves an arbitrary server to service this request, which incurs a cost of . In this case, the current phase ends, a new one begins, and initializes a new instance of the Hydra game.

Let be the number of all phases for input (the last one may be not finished). The cost of Opt in a single finished phase is at least . By the reasoning above, the (expected) cost of in a single phase is at most . Therefore, , which completes the proof. ∎

Using our algorithm Herc for the Hydra game along with the reduction given by Theorem 3.4 immediately implies the following result.

There exists a randomized -competitive online algorithm for the generalized -server problem in uniform metrics.

4 Lower bound

We conclude the paper showing that that competitive ratio of any (even randomized) online algorithm for the generalized -server problem in uniform metrics is at least , as long as each metric space  contains at least two points. For each , we choose two distinct points, the initial position of the -th server, which we denote and any other point, which we denote . The adversary is going to issue only requests satisfying for all , hence without loss of generality any algorithm will restrict its server’s position in each to and . (To see this, assume without loss of generality that the algorithm is lazy, i.e., it is only allowed to move when a request is not covered by any of its server, and is then allowed only to move a single server to cover that request.) For this reason, from now on we assume that for all , ignoring superfluous points of the metrics.

The configuration of any algorithm can be then encoded using a binary word of length . It is convenient to view all these words (configurations) as nodes of the -dimensional hypercube: two words are connected by a hypercube edge if they differ at exactly one position. Observe that a cost of changing configuration to , denoted is exactly the distance between and  in the hypercube, equal to the number of positions on which the corresponding binary strings differ.

In our construction, we compare the cost of an online algorithm to the cost of an algorithm provided by the adversary. Since Opt’s cost can be only lower than the latter, such approach yields a lower bound on the performance of the online algorithm.

For each word , there is exactly one word at distance , which we call its antipode and denote . Clearly, for all . Whenever we say that an adversary penalizes configuration , it issues a request at . An algorithm that has servers at configuration  needs to move at least one of them. On the other hand, any algorithm with servers at configuration need not move its servers; this property will be heavily used by an adversary’s algorithm.

4.1 A Warm-Up: Deterministic Algorithms

To illustrate our general framework, we start with a description of lower bound that holds for any deterministic algorithm Det [2]. (A more refined analysis yields a better lower bound of  [15].) The adversarial strategy consists of a sequence of independent identical phases. Whenever Det is in some configuration, the adversary penalizes this configuration. The phase ends when different configurations have been penalized. This means that Det was forced to move at least times, at a total cost of at least . In the same phase, the adversary’s algorithm makes only a single move (of cost at most ) at the very beginning of the phase: it moves to the only configuration that is not going to be penalized in the current phase. This shows that the Det-to-Opt ratio in each phase is at least .

4.2 Extension to Randomized Algorithms

Adopting the idea above to a randomized algorithm Rand is not straightforward. Again, we focus on a single phase and the adversary wants to leave (at least) one configuration non-penalized in this phase. However, now the adversary only knows Rand’s probability distribution over configurations and not its actual configuration. (At any time, for any configuration , is the probability that Rand’s configuration is equal to .) We focus on a greedy adversarial strategy that always penalizes the configuration with maximum probability. However, arguing that Rand incurs a significant cost is not as easy as for Det.

First, the support of can also include configurations that have been already penalized by the adversary in the current phase. This is but a nuisance, easily overcome by penalizing such configurations repeatedly if Rand keeps using them, until their probability becomes negligible. Therefore, in this informal discussion, we assume that once a configuration is penalized in a given phase, remains equal to zero.

Second, a straightforward analysis of the greedy adversarial strategy fails to give a non-trivial lower bound. Assume that configurations have already been penalized in a given phase, and the support of contains the remaining configurations. The maximum probability assigned to one of these configurations is at least . When such configuration is penalized, Rand needs to move at least one server with probability at least . With such bounds, we would then prove that the algorithm’s expected cost is at least . Since we bounded the adversary’s cost per phase by , this gives only a constant lower bound.

What we failed to account is that the actual distance travelled by Rand in a single step is either larger than or Rand

would not be able to maintain a uniform distribution over non-penalized configurations. However, actually exploiting this property seems quite complex, and therefore we modify the adversarial strategy instead.

The crux of our actual construction is choosing a subset of the configurations, such that is sufficiently large (we still have ), but the minimum distance between any two points of is . Initially, the adversary forces the support of to be contained in . Afterwards, the adversarial strategy is almost as described above, but reduced to set only. This way, in each step the support of is a set , and the adversary forces Rand to move with probability at least over a distance at least , which is the extra factor. We begin by proving the existence of such a set for sufficiently large .

For any , there exists a set of binary words of length , satisfying the following two properties:

size property:


distance property:

for any .


Let . For any word , we define its -neighborhood .

We construct set greedily. We maintain set and set . We start with (and thus with ). In each step, we extend with an arbitrary word and update accordingly. We proceed until set contains all possible length- words. Clearly, the resulting set satisfies the distance property.

It remains to show that . For a word , the size of is

That is, in a single step, increases by at most elements. Therefore, the process continues for at least steps, and thus the size of is at least . ∎

The competitive ratio of every (randomized) online algorithm solving the generalized -server problem in uniform metrics is at least .


In the following we assume that , otherwise the theorem follows trivially. We fix any randomized online algorithm Rand. The lower bound strategy consists of a sequence of independent phases. Requests of each phase can be (optimally) serviced with cost at most  and we show that Rand’s expected cost for a single phase is , i.e., the ratio between these costs is . As the adversary may present an arbitrary number of phases to the algorithm, this shows that the competitive ratio of Rand is , i.e., by making the cost of Rand arbitrarily high, the additive constant in the definition of the competitive ratio (cf. Section 3.1) becomes negligible.

As in our informal introduction, denotes the probability that Rand has its servers in configuration (at time specified in the context). We extend the notion to sets, i.e., where is a set of configurations. We denote the complement of (to ) by . We use throughout the proof.

To make the description concise, we define an auxiliary routine for the adversary (for some configuration set ). In this routine, the adversary repeatedly checks whether there exists a configuration , such that . In such case, it penalizes ; if no such configuration exists, the routine terminates. We may assume that the procedure always terminates after finite number of steps, as otherwise Rand’s competitive ratio would be unbounded. (Rand pays at least in each step of the routine while an adversary’s algorithm may move its servers to any configuration from set , and from that time service all requests of with no cost.)

The adversarial strategy for a single phase is as follows. First, it constructs as the configuration set fulfilling the properties of Lemma 4.2; let denote its cardinality. The phase consists then of executions of Confine routine: . For , set is defined in the following way. The adversary observes Rand’s distribution right after routine terminates; at this point this distribution is denoted . Then, the adversary picks configuration to be the element of that maximizes the probability , and sets .

We begin by describing the way that the adversary services the requests. Observe that set contains a single configuration, henceforth denoted . The configuration is contained in all sets , and thus is never penalized in the current phase. Hence, by moving to at the beginning of the phase, which costs at most , and remaining there till the phase ends, the adversary’s algorithm services all phase requests at no further cost.

It remains to lower-bound the cost of Rand. We fix any

and estimate the cost incurred by

. (Note that we do not claim that incurs any cost, its sole goal is to confine the support of to .) Recall that the probability distribution right before starts (and right after terminates) is denoted and the distribution right after terminates is denoted .

During a probability mass , is moved from to nodes of set (recall that ). Some negligible amounts (at most ) of this probability may however remain outside of after terminates. That is, Rand moves at least the probability mass of from configuration to configurations from (i.e., along a distance of at least ), Therefore, its expected cost due to is at least .

First, using the properties of and the definition of , we obtain


Second, using the properties of yields


Using (3) and (4), we bound the expected cost of Rand due to routine as


The second inequality above follows as all configurations from are distinct elements of , and hence their mutual distance is at least by the distance property of  (cf. Lemma 4.2). By summing (5) over , we obtain that the total cost of Rand in a single phase is

The last equality holds as by the size property of (cf. Lemma 4.2). ∎


  • [1] Nikhil Bansal, Marek Eliás, and Grigorios Koumoutsos. Weighted k-server bounds via combinatorial dichotomies. In Proc. 58th IEEE Symp. on Foundations of Computer Science (FOCS), pages 493–504. IEEE Computer Society, 2017.
  • [2] Nikhil Bansal, Marek Eliás, Grigorios Koumoutsos, and Jesper Nederlof. Competitive algorithms for generalized k-server in uniform metrics. In Proc. 29th ACM-SIAM Symp. on Discrete Algorithms (SODA), pages 992–1001, 2018.
  • [3] Yair Bartal, Béla Bollobás, and Manor Mendel. Ramsey-type theorems for metric spaces with applications to online problems. Journal of Computer and System Sciences, 72(5):890–921, 2006.
  • [4] Yair Bartal, Nathan Linial, Manor Mendel, and Assaf Naor. On metric Ramsey-type phenomena. In Proc. 35th ACM Symp. on Theory of Computing (STOC), pages 463–472, 2003.
  • [5] Alan Borodin, Nati Linial, and Michael E. Saks. An optimal on-line algorithm for metrical task system. Journal of the ACM, 39(4):745–763, 1992.
  • [6] Sébastien Bubeck, Michael B. Cohen, Yin Tat Lee, James R. Lee, and Aleksander Madry. k-server via multiscale entropic regularization. In Proc. 50th ACM Symp. on Theory of Computing (STOC), pages 3–16. ACM, 2018.
  • [7] Ashish Chiplunkar and Sundar Vishwanathan. On randomized memoryless algorithms for the weighted k-server problem. In Proc. 54th IEEE Symp. on Foundations of Computer Science (FOCS), pages 11–19, 2013.
  • [8] Marek Chrobak. SIGACT news online algorithms column 1. SIGACT News, 34(4):68–77, 2003.
  • [9] Marek Chrobak, Howard J. Karloff, Thomas H. Payne, and Sundar Vishwanathan. New results on server problems. SIAM Journal on Discrete Mathematics, 4(2):172–181, 1991.
  • [10] Marek Chrobak and Lawrence L. Larmore. An optimal on-line algorithm for k-servers on trees. SIAM Journal on Computing, 20(1):144–148, 1991.
  • [11] Marek Chrobak and Jirí Sgall. The weighted 2-server problem. Theoretical Computer Science, 324(2-3):289–312, 2004.
  • [12] Amos Fiat and Moty Ricklin. Competitive algorithms for the weighted server problem. Theoretical Computer Science, 130(1):85–99, 1994.
  • [13] Elias Koutsoupias. The k-server problem. Computer Science Review, 3(2):105–118, 2009.
  • [14] Elias Koutsoupias and Christos H. Papadimitriou. On the k-server conjecture. Journal of the ACM, 42(5):971–983, 1995.
  • [15] Elias Koutsoupias and David Scot Taylor. The CNN problem and other k-server variants. Theoretical Computer Science, 324(2-3):347–359, 2004.
  • [16] James R. Lee. Fusible hsts and the randomized k-server conjecture. 2017. URL:
  • [17] Mark S. Manasse, Lyle A. McGeoch, and Daniel D. Sleator. Competitive algorithms for server problems. Journal of the ACM, 11(2):208–230, 1990.
  • [18] René Sitters. The generalized work function algorithm is competitive for the generalized 2-server problem. SIAM Journal on Computing, 43(1):96–125, 2014.
  • [19] René A. Sitters and Leen Stougie. The generalized two-server problem. Journal of the ACM, 53(3):437–458, 2006.
  • [20] Daniel D. Sleator and Robert E. Tarjan. Amortized efficiency of list update and paging rules. Communications of the ACM, 28(2):202–208, 1985.

Appendix A Omitted Proof: Probability Distribution and Algorithms

When we described our algorithm Herc for the Hydra game, we assumed that its current position in the tree is a random node with probability distribution given by . In a single step, Herc decreases probability at some node from to zero and increases the probabilities of some other nodes by a total amount of . Such change can be split into  elementary changes, each decreasing the probability at node by and increasing it at node by the same amount. Each elementary change can be executed and analyzed as shown in the following lemma.

Let be a probability distribution describing the position of Alg in the tree. Fix two tree nodes, and . Suppose is a probability distribution obtained from by decreasing by and increasing by . Then, Alg can change its random position, so that it will be described by , and the expected cost of such change is .


We define Alg’s action as follows: if Alg is at node , then with probability it moves to node . If Alg is at some other node it does not change its position.

We observe that the new distribution of Alg is exactly . Indeed, the probability of being at node decreases by , while the probability of being at node increases by the same amount. The probabilities for all nodes different than or remain unchanged.

Furthermore, the probability that Alg moves is and the traveled distance is . The expected cost of the move is then , as desired. ∎