The k-Server Problem with Parallel Requests and the Compound Work Function Algorithm

. In this paper the compound work function algorithm for solving the generalized k-server problem is proposed. This problem is an online k-server problem with parallel requests where several servers can also be located on one point. In 1995 Koutsoupias and Papadimitriou have proved that the well-known work function algorithm is competitive for the (usual) k-server problem. A proof, where a potential-like function argument is included, was given by Borodin and El-Yaniv in 1998. Unfortunately, certain techniques of these proofs cannot be applied to show that a natural generalization of the work function algorithm is competitive for the problem with parallel requests. Values of work functions, which are used by the compound work function algo-rithm are derived from a surrogate problem, where at most one server must be moved in servicing the request in each step. We can show that the compound work function algorithm is competitive with the same bound of the ratio as in the case of the usual problem.


Introduction
This paper deals with a generalized online k-server problem.We want to present a new algorithm, the "compound work function algorithm", and show its qualities for solving this problem.
In Hildenbrandt (2014) we have introduced a generalized k-server problem with parallel requests where several servers can also be located on one point.The investigation of the generalized k-server problem was initiated by an operations research problem which consists of optimal conversions of machines or moulds (see Hildenbrandt (1993)).We are given initial locations of k servers in a metric space.Requests R t for service at several points come in over time.It is sensible in the case of such requests to distinguish the surplus-situation where the request can be completely fulfilled by means of the k servers and the scarcity-situation where the request cannot be completely met.Immediately after the t-th request is received, a sufficient number of servers must be moved from theirs current locations to the request points.The choice of which servers are moved, in the case of the surplus-situation or the choice of requests which should be fulfilled, in case of the scarcity-situation, respectively, must be made based only on the current servers configuration and on the requests seen so far; that is, the requests R u for u ≤ t.Moving servers costs the distances the servers are moved, and the goal is to minimize the total cost.Firstly, we have proposed the (compound) Harmonic k-server algorithm in the cases of unit and general distances, respectively (see Hildenbrandt (2014 and2016)) and proved the competitiveness of these algorithms.The main subject of this paper are work function algorithms.
In online computation, an algorithm must decide how to act on incoming requests without any knowledge of future inputs.In contrast, an offline procedure would be allowed to know the entire sequence of requests in advance, before it makes any decisions.We want online algorithms whose cost compares favorably to the cost of an optimal offline algorithm.A deterministic online algorithm is c-competitive if there exists a function α of the initial configuration so that for every finite input sequence the cost incurred by the algorithm is bounded by α plus c times the minimum cost of processing the input sequence (see Sleator and Tarjan (1985)).c is called the competitive ratio of the algorithm.The competitive ratio is a measure of how much better we could do if we knew the future.
The (usual) k-server problem (where at most one server must be moved in servicing the request in each step) was introduced by Manasse, McGeoch andSleator (1988, 1990).Meanwhile it is the most studied problem in the area of competitive online problems.Historical notes on k-server problems can be found in the book by A. Borodin and R. El-Yaniv (1998) (Sections 10.9 and 11.7) or also in the paper by Y. Bartal and E. Grove (2000).There two important results are "competitiveness" of the deterministic work-function algorithm (see E. Koutsoupias and C. Papadimitriou (1995)) and of the randomized Harmonic k-server algorithm against an adaptive online adversary (see Y. Bartal and E. Grove (2000)).The idea for an online work function algorithm was implicitly introduced by Borodin, Linial and Saks (1992) in connection to "metrical task systems".A work function algorithm for the (usual) k-server problem has been proposed by several researchers (for more detail, see E. Koutsoupias and C. Papadimitriou (1995), p. 974).The competitiveness of the work function algorithm in any metric space was proved by Koutsoupias and Papadimitriou (1995).In the present paper we use the proof by Borodin and El-Yaniv (1998) (see Theorem 10.9 and its proof).This proof is based on Koutsoupias's dissertation (1994) and on a presentation of this proof due to Bartal that offers a simpler potential-like function argument (see A. Borodin and R. El-Yaniv (1998), pp. 178, 179).There are also existing k-server problems which, on the one hand, are generalizations of the usual problem and otherwise include specific properties.Such problems and corresponding work function algorithms was described by R. Sitters (2013) (for example).
Unfortunately, certain techniques of the above-mentioned proofs from literature cannot be applied to show that a natural generalization of the (usual) work function algorithm (see Section 4.) is competitive for the problem with parallel requests.Therefore we will develop the "compound work function algorithm" for the generalized k-server problem (in the case of the surplus-situation) in Section 5. Values of work functions, which are used by the compound work function algorithm are derived from a surrogate problem, where at most one server must be moved in servicing the request in each step.We will prove that the compound work function algorithm is competitive with the same bound of the ratio as in the case of the usual problem.In order to prove the competitiveness we also need the optimal solution of the corresponding offline problem.For this we introduce generalized work functions in Section 3.

The formulation of the model
Now, we want to describe the usual k-server problem (a)) and the generalized problem with parallel requests (b)). 1 We are given initial locations of k servers in a metric space (M, d).Several servers can be located on one point (b)).Requests a) r t b) R t for service a) at points {p t } b) at finite multisets of points {P t } ("parallel requests") come in over time.Let a a sequence of requests.Immediately after the t-th request is received, a) one of the servers must be moved from its current location to p t .b) a sufficient number of servers must be moved from theirs current locations to the points of the multiset P t .The choice of which a) server is moved b) servers are moved, in the case of the surplus-situation or the choice of requests which should be fulfilled (by means of the k servers), in case of the scarcity-situation, respectively (in more detail see below) must be made based only on the current servers configuration and on the requests seen so far; that is, the requests a) r t for u ≤ t. b) R u for u ≤ t.Moving servers costs the distances the servers are moved.Our goal is to find a deterministic online algorithm for solving the generalized k-server problem (b)) with the same bound of the ratio as the well-known work function algo-rithm (for solving the usual problem (a)), where the bound is 2k − 1.
A server configuration of the algorithm is viewed in this paper as a multiset of k (not necessarily distinct) points representing the locations of the servers.A request can also be viewed as a multiset, but with a arbitrary number of (not necessarily distinct) points.
We denote multisets by capital letters and points of M by small letters.
For any (finite) multiset C with points from M we use the notation C = {p 1 , p 2 , ..., p m } where p j , j = 1, 2, For any request sequence σ and any k-server algorithm ALG, ALG(σ) is defined as the total distance moved by the ALG's servers in servicing σ.
Analogous to A. Borodin, R. El-Yaniv (1998), p. 152 working with lazy algorithms ALG is sufficient.This means, servers are not moved in a step if they are not needed to fulfil requests in this step.For that reason we define the set of feasible servers' configurations with respect to the previous servers configuration S and the request R in the following way where in the case of the surplus-situation and in the case of the scarcity-situation.
3 Generalized work functions and the solution of the offline problem Next we want to generalize the definition of the work functions, which are used in the work function algorithm applied to the usual k-sever problem (see A. Borodin and R. El-Yaniv (1998), p. 164, 165 or S. O. Krumke and J. Rambau (2005), p. 74, 75 for example).We will use this generalization to solve the problem with parallel request.
Fix a request sequence, Use ∅ to denote the empty request sequence.Work functions are defined in terms of an initial configuration S 0 and a request sequence.Specifically, for each configuration S 0 , configuration S, the k-server work function w t (S) = w σt (S) = w σt (S 0 , S) is defined as the optimal offline cost (sequentially) servicing all requests in σ t , starting from the initial configuration S 0 and ending at configuration S. Notice that the configuration S does not necessarily contain the last request R t of σ t (or any requested points in σ t ).(Thus, w t : S (k) → R + for given S 0 and σ t .) Work functions can be computed recursively as follows.For each configuration S, the initial work function w ∅ (S) is simply the configuration distance between S 0 and S.
Assume that the value w t (S) is known for any configuration S. Given the next request R t+1 and a configuration S, the value of w t+1 (S)(= w σt,R t+1 (S)) is computed as follows.If R t+1 ⊆ S (surplus-situation) or S ⊆ R t+1 (scarcity-situation), respectively, then clearly w t+1 (S) = w t (S).Otherwise, the optimal offline algorithm that must first serve the request R t+1 (as much as possible in the case of the scarcity-situation) before ending up in configuration S can first process the sequence σ t , R t+1 ending up in some configuration S ⊇ R t+1 (surplus-situation) or S ⊆ R t+1 (scarcity-situation), respectively and then move to configuration S. Thus, it follows The second equality in the above equations is due to the fact that S ⊇ R t+1 (surplus-situation) or S ⊆ R t+1 (scarcity-situation), respectively.(3) and (4) provides the means for computing the work functions.
From the definition of the work functions follows the property for any server configurations A and B.
The proof of ( 5) is simple.If w t (B) = w t ( B * )+D( B * , B), where B * is an optimal solution of (4), then also w t Using ( 5) and the triangle-inequality, (4) can be simplified a little: In case of the surplus-situation it is sufficient to consider S = S − X + R t+1 which differs from S by at most |R t+1 − S| points.Then, we can compute the work functions as w t+1 (S) = min or as where If X is a solution of ( 6) then there exists a solution X of (7), and vice versa, so that If we set S = X then (4) has the representation: in the case of the scarcity-situation.However, it is sufficient to consider S = X + (S ∩ R t+1 ) which differs from S by at most |S − R t+1 | points.Then it follows: with Rt+1 and Ŝ as above.
If X is a solution of (10) then there exists a solution X of (11), and vice versa, so that Given any initial configuration and any request sequence σ, we can use work functions to compute the optimal offline cost to serve σ, which is Obviously, each different point of an optimal configuration S is an element of M ⊆ M , where Remark 1 Let S be any configuration.
Work functions can be computed by means of dynamic programming, which proceeds backward in time.This leads to a sequence of configurations On the other hand, it is simple to show that a sequence of configurations t ⊆ R t in case of the scarcity-situation, respectively, for t = 1, 2, • • • , t and where w t (S) = w t (U t ) + D(U t , S). 3Clearly, that U t and S t, t ∈ {1, 2, • • • , t} can be different and that The generalized work functions are quasi-convex.We say that a work function w(= w σt ) is quasi-convex if for any configurations X and Y and any subset X ⊆ X, Lemma 1. (Quasi-convexity lemma) All generalized work functions are quasi-convex.
This Lemma is shown in analogue to the proof of Lemma 10.4 in A. Borodin, R. El-Yaniv (1998).The case of the scarcity-situation must be considered in addition.The complete proof can be found in Appendix B.

Considerations concerning the natural generalization of the work function algorithm
The work function algorithm (WFA) applied to the usual k-server problem can be found in A. Borodin, R. El-Yaniv (1998), p. 166 for example.A natural generalization of this algorithm, adapted to the k-server problem with parallel requests, is the following: Let σ t be the request sequence thus far and let S t be the configuration of the WFA algorithm after servicing σ t .Then, given the next request R t+1 .
In the case of the surplus-situation algorithm WFA serves R t+1 with servers X * W ⊆ S t satisfying is then the configuration at the end of step t + 1.According to (7), we can also use the equivalent formulas In the case of the scarcity-situation algorithm WFA chooses servers (An equivalent representation according to (11) would also be possible.)Clearly, the cost of algorithm WFA to serve the request R t+1 is D(R t+1 , X) (= D( Rt+1 , X)) in both cases.
Next we want to give an example that the WFA algorithm is not competitive in general (where the case |R| > k is allowed).
Example 1 Let ∈ (0, 1) and let h = 1, 3, • • • be a sequence of positive integers with h 1 = 1 and The minimum costs of the corresponding offline problems are cost(offline) = min S w σ (S) = w nj ({−n j − }) = n j + for j = 2, 3, • • • , where S nj = {−n j − } are the optimal solutions.Now, we show by mathematical induction that algorithm WFA yields Induction step.Assume that S t = {h t }.
According to (17), Since the definition of h implies Then the cost of algorithm WFA to serve all requests is for any example E j .
From this we get the following equation . Algorithm WFA applied to the k-server problem with parallel request is not competitive (if the case |R| > k is allowed), since lim From now on, we will focus on the surplus-situation.
Remark 2 The definitions of the minimizer, the maximizer and the potential-like function are used to prove that the WFA algorithm applied to the usual k-server problem is competitive (see A. Borodin, R. El-Yaniv (1998), Section 10.7).These definitions can be adapted to the k-server problem with parallel request and the natural generalization of the WFA.However, it is not possible to complete a proof for competitiveness of the natural generalization of the WFA (where only the surplus-situation is allowed) with success in a similar way as in A. Borodin, R. El-Yaniv (1998).The reason for that is certain partial results are not valid (in general), for example, an inequality which corresponds to (10.22) in A. Borodin, R. El-Yaniv (1998), p. 170.
So far, the answer to the question, whether the natural generalization of the WFA is competitive or not in the case of the surplus-situation is a difficult open problem.Thats why, we will suggest the new "compound work function algorithm" in the following section and prove that this algorithm is also (2k − 1)-competitive.

The compound work function algorithm
As a basis for further considerations we introduce the following more specific k-server problem.The term "k-server problem with a simple extension" describes a k-server problem with the following properties: (i) More than one server can be located on a point.
(ii) Requests R t with R t (r) = ∅ for one r ∈ M and where in addition, |R t (r)| ≤ min{|R t−1 (r)| + 1, k} must be fulfilled, are allowed.Then at most one server must be moved in servicing the request in each step.
Lemma 2. Algorithm WFA applied to the k-server problem with a simple extension is (2 k − 1)-competitive for any k and any metric space.
This lemma can be shown in analogue to the proof of Theorem 10.9 in A. Borodin, R. El-Yaniv (1998).Therefore, we do not show the complete proof, but make the following comments (see also Remark 2).We define the minimizer configuration A of p with respect to w t similarly as in A. Borodin, R. El-Yaniv (1998): where R is a request with R(r) = ∅, R(i) = ∅ for i = r and X is a multiset with The compound work function algorithm is based on a surrogate problem, which is a k-server problem with a simple extension.
In order to construct a surrogate problem we replace the steps of the original problem (k-server problem with parallel request, where only the surplus-situation is allowed) by a number of steps in the surrogate problem.In more detail, let .., p m , ..., p m } with p i = p j for i = j be the request in the t-th step.
Then we set and (Note that m and ρ, • • • depend on t.) Furthermore, let j be an integer with j = 1 if m = 1 and with ( M as defined in ( 14)).(( 20) is a sufficient condition for the validity of the following Lemma 3 and Lemma 4.) We replace a step t of the generalized k-server problem by steps Since Rj,f are independent of j we set For example, R t = {p 1 , p 1 , p 2 , p 2 , p 2 } implies that m = 2, ρ = 5 and Work functions for the surrogate problem are indexed in correspondence to the steps and the requirements: w t j,f .In addition, we set In the following we characterize the solutions of the surrogate problem considered first as offline problem, where the entire sequence of requests is known in advance, and second as online problem.
Lemma 3. (offline).Let (SP) be the surrogate problem for a given k-server problem with parallel requests.Furthermore, let S be any configuration and PROOF.Clearly, if m = 1 then ( 24) is fulfilled.Now, we want to consider the case that m > 1: are computed according to (6).The minimum weight matchings between Y * j,z and Rz , • • • , Y * 1,1 and R1 yield the optimal movements of the servers in the steps t 1,1 , • • • , tj ,z .Let ς be the number of real movements (with distances greater than 0) from S − R t in R t which occur in these steps.Then the definition of the work functions together with the triangle-inequality imply that ς ≤ |R t − S| and that these movements must be executed in the first ρ steps backwards.If ς = |R t − S| then the total cost is not greater than If ς < |R t − S| then at least one real movement of a server from R t in R t in all subsequences of steps (t j,z , • • • , t j−1,z+1 ), 2 ≤ j ≤ j is necessary.The total cost would in this case be greater or equal to δ * • ( j − 1).Thus, from condition (20) it follows that ς = |R t − S|.
The above properties of optimal movements imply that . Let (SP) be the surrogate problem for a given k-server problem with parallel requests (OP) and let the entire sequence of requests be known in advance.
(i) If S is the configuration of the offline servers at the beginning of a step t 1,1 corresponding to an optimal solution of (SP), then such a optimal solution of (SP) ( * ) includes exactly |R t − S| real movements in the steps t 1,1 , • • • , tj , ρ.All these movements are movements from S − R t in R t , and are executed in the first (ii) The optimal offline costs of (SP) and (OP) are equal.

PROOF.
(i) can be proved in a similar way as Lemma 3 (see also Remark 1).
(ii) follows from (i) and the facts that a feasible solution of (OP) implies a feasible solution of (SP) which fulfilled properties (*) and vice versa.
Theorem 1. (online).Let (SP) be the surrogate problem for a given k-server problem with parallel requests.Then a sequence of online servers' configurations exists which can be constructed by the WFA algorithm so that R t ⊆ S j, ρ for any t, where S j, ρ denotes the online servers configuration at the end of step tj , ρ.

For this we prove by mathematical induction that
Rρi respectively.There S j,f denotes the online servers' positions at the end of step tj ,f .In addition, we notice that | Rf (il)| = f − ρil −1 according to (21).
At first, we consider the case that f < ρil .
We will show that If already Rf+1 ⊆ S j,f then S j,f = S j,f +1 follows and ( 25) is true.Now, let Rf+1 S j,f .Then a S j,f +1 = S j,f − X * W + il, which satisfies (25), can be determined by the WFA algorithm, where X * W ⊆ Ŝ j,f with X * W = {il} and X * W = 1 is computed as an element from the argminset of: over X, according to (16a).
Case I: In this case (25) follows immediately.
Case II: In this case we will show that then also a X * 1 ( = il) exists which satisfies Case I and implies the same value of (26) as X * W .
(26) leads to for X * W = {i λ }.In addition, since Ru ⊆ S j,f − i λ + il for u = ϕ + 1, ϕ + 2, • • • , f according to the induction hypothesis and Case II.Using formula (6) for the recursive computation of work functions yields where {ρ i λ } denotes the multiset which only include a number of ρ i λ elements i λ .Lemma 3 (with S = S j,f − i λ + il and z = ϕ) implies that for optimal solutions Y * of (29).In Case II this means Furthermore, Ŷ * = {il} (32) also follows from (30).Hence ( 29) can be written as This equation (see also ( 28)) is equivalent to since Ru ⊆ S j,f − i λ + il for u = ϕ + 1, ϕ + 2, • • • , f according to the induction hypothesis and ( 31) and ( 32).Now, we want to determine the argminset of ( 26) where in addition only X with S j,f (see Case I) are allowed.Let X * 1 denote an element of such an argminset.
X * W = {i λ } is an element of the argminset in Case II.However, the last inequality shows that in every case an element X * 1 of the argminset exists which satisfies Case I.
In the case that f = ρil can be shown in analogue to the above proof (in the case that f < ρil ), where all il are to be replaced by il +1 and all sets of indices 1, 2, Now we want to suggest the compound work function algorithm (compound WFA): (0) Let (OP) be a k-server problem with parallel requests, where only the surplussituation is allowed.(1) Construct a corresponding surrogate problem (SP) according to (18), ..., (23) (which is a k-server problem with a simple extension).( 2) Solve (SP) by means of the usual WFA.
(3) Skip the movements of servers, which are unnecessary for the original problem (OP).
In more detail, let σ t−1 be the request sequence thus far and let S t−1 be the configuration of WFA after servicing σ t−1 .Then, given the next request R t .
Compound WFA, (step t): Apply the (usual) WFA algorithm to the surrogate problem in the steps t which replace step t of the original problem, and construct a sequence of online servers' configurations Skip movements of servers, which are unnecessary for the original problem, in the following way: The set of all (real) movements of the servers in the surrogate steps can be partitioned that if servers exist for each of them as follows.Such a server is located on a point n 0 with |S t (n 0 )| < |S t−1 (n 0 )| at the beginning of step t.In the steps: t jn 0 ,fn 0 , t jn 1 ,fn 1 , • • • , t jn ī ,fn ī (where j n0 ≤ j n1 ≤ • • • ≤ j nī , nī = n and ρni−1 < f ni ≤ ρni ) the server is moved from point n 0 to point n 1 and so on, finally to point nī.Replace these movements by one.Move the corresponding server directly from point n 0 to point n.
We want to point out that the condition R t ⊆ S t for any t can be fulfilled according to Theorem 1.This condition implies that the compound WFA algorithm solves the original problem (OP) (the k-server problem with parallel requests).
Theorem 2. The compound WFA algorithm is (2 k − 1)-competitive for any k and any metric space.
PROOF.According to Lemma 2, WFA is (2 k − 1)-competitive for the k-server problem with a simple extension, thus also for (SP).If the number of movements is reduced by the compound WFA then the online cost is lower because of the triangleinequality.The optimal offline costs of (SP) and (OP) are equal (Lemma 4, (ii)).Hence, the compound WFA algorithm is also (2 k − 1)-competitive.
Finally, let us remark that more values of work functions are used by compound WFA than by WFA from Section 4. Values of work functions are important for the competitiveness of corresponding algorithms.In Appendix C, at least an example can be found, where compound WFA yield a better result than WFA.

Conclusion
In this paper we have considered a generalized k-server problem with parallel requests.We have defined corresponding work functions.The work functions are quasiconvex as well in the case of the surplus-situation as in the case of the scarcity-situation.A corresponding algorithm WFA is not competitive in the case that the scarcity-situation is allowed.The question, whether this algorithm is competitive or not in the case of the surplus-situation is a difficult open problem.We have constructed the compound WFA algorithm which uses more values of work functions than algorithm WFA from Section 4. We were able to prove the same bound of the competitive ratio as for the WFA algorithm applied to the (usual) k-server problem.
x j ∈ X and by M Y to some point y j ∈ Y .It is easy to see that the bijection g(x j ) = y j satisfies equation (A.1).
Induction step.Assume that w satisfies the property GQ and let R be the new request.We show that w (= w σt,R t+1 ) satisfies the property GQ.
In the case of the surplus-situation there exists some X ⊆ X with X = |R| , so that w (X) = w(X − X + R) + D( X, R), according to equation ( 6).Similarly, According to the induction hypothesis, for X − X + R and Y − Ỹ + R, there exists a bijection g : (X − X + R) → (Y − Ỹ + R) that satisfies the property GQ.We can further assume, from the preceding claim, that g(r) = r for all r ∈ R.
Define the bijection g : X → Y : , where ỹ is determined in the following way.
Let M X and M Ỹ be the two minimum weight matchings whose values are D( X, R) and D( Ỹ , R), respectively.Each point r ∈ R is mapped by M X to some point x ∈ X and by M Ỹ to some point ỹ ∈ Ỹ .
In case of the scarcity-situation there exists some X ⊆ R with X = k, so that w (X) = w( X) + D( X, X), according to equation (10).
According to the induction hypothesis, for X and Ỹ , there exists a bijection g : X → Ỹ that satisfies the property GQ.We can further assume, from the preceding claim, that g(r) = r for all r ∈ X ∩ Ỹ .
Define the bijection g : X → Y in the following way: Let M X,X and M Ỹ ,Y be two minimum weight matchings whose values are D( X, X) and D( Ỹ , Y ), respectively.
Set g (x) = y (x ∈ X, y ∈ Y ), if x is mapped by M X,X to x ∈ X, y is mapped by M Ỹ ,Y to ỹ ∈ Ỹ and g(x) = ỹ.
To prove that w satisfies the property GQ, consider any partition (X 1 , X 2 ) of X.This partition leads to a partition ( X1 , X2 ) of X by means of the matching M X,X , where, in more detail, X 1 is mapped to X1 by M X,X .5), where Y 1 = g (X 1 ), Y 2 = g (X 2 ).

C Example
Let k = 5 and let the metric space consist of 8 points: M = {p 1 , p .
The initial configuration is given by S 0 = {p 1 , p 2 , p 3 , p 4 , p 5 } and the request sequence (A) ≤ w t ( B * ) + D( B * , A). Subtracting the equation from the inequality, together with the triangle-inequality D( B * , A) − D( B * , B) ≤ D(A; B) we get (5).
where w t is the current work function and p ∈ M .The correctness of an inequality which corresponds to (10.22) in A. Borodin, R. El-Yaniv (1998), p. 170.can be proved, since D 2 , • • • , p 8 }.The distances between the points are listed in the following matrix 