Abstract 1 Introduction 2 Preliminaries 3 Online Service with Delay 4 Conclusions References Appendix A Proof of Lemma 15 Appendix B Omitted Proofs

Nearly-Optimal Algorithm for Non-Clairvoyant Service with Delay

Noam Touitou ORCID Unaffiliated, Tel Aviv, Israel
Abstract

We consider the online service with delay problem, in which a server traverses a metric space to serve requests that arrive over time. Requests gather individual delay cost while awaiting service, penalizing service latency; an algorithm seeks to minimize both its movement cost and the total delay cost. Algorithms for the problem (on general metric spaces) are only known for the clairvoyant model, where the algorithm knows future delay cost in advance (e.g., Azar et al., STOC’17; Azar and Touitou, FOCS’19; Touitou, STOC’23). However, in the non-clairvoyant setting, only negative results are known: where n is the size of the metric space and m is the number of requests, there are lower bounds of Ω⁢(n) and Ω⁢(m) on competitiveness (Azar et al., STOC’17), that hold even for randomized algorithms (Le et al., SODA’23).

In this paper, we present the first algorithm for non-clairvoyant online service with delay. Our algorithm is deterministic and O⁢(min⁡{n⁢log⁡n,m⁢log⁡m})-competitive; combined with the lower bounds of Azar et al., this settles the correct competitive ratio for the problem up to logarithmic factors, in terms of both n and m.

Keywords and phrases:
Online, Delay, Deadlines, k-server, Non-clairvoyant
Copyright and License:
[Uncaptioned image] © Noam Touitou; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Theory of computation → K-server algorithms
; Theory of computation → Online algorithms
Editors:
Olaf Beyersdorff, Michał Pilipczuk, Elaine Pimentel, and Nguyễn Kim Thắng

1 Introduction

In online service with delay, or OSD, a server exists on a metric space of n points. Requests arrive over time, where every request is associated with a point in the metric space which the server must visit to satisfy the request. The algorithm may move the server at any moment in time, at a cost which is the distance traveled by the server in the metric space (the movement is instantaneous). In addition, requests accumulate delay cost while pending, motivating the algorithm to serve requests promptly. The goal of the algorithm is to minimize the sum of total movement cost and total delay cost over the given input.

In this model, a crucial choice is whether the online algorithm becomes aware of a request’s future delay cost upon its release (clairvoyant model) or only knows delay cost accumulated in the past (non-clairvoyant model). Azar et al. [4], who introduced the problem of online service with delay, presented an algorithm for the clairvoyant model of polylogarithmic competitiveness in the size of the metric space n; specifically, O⁢(log4⁡n)-competitiveness. This was later improved to O⁢(log2⁡n)-competitiveness [6], and then to O⁢(log⁡(min⁡{n,m}))-competitiveness [35], where m is the number of requests in the online input.

In the non-clairvoyant model, however, there are no known positive results. Azar et al. [4] presented Ω⁢(n) and Ω⁢(m) lower bounds on the competitiveness of any deterministic algorithm; this bound also holds for randomized algorithms [31]. (Note that the lower bound in [31] is stated for the joint replenishment problem, a special case of online service with delay.)

1.1 Our Results

In this paper, we present the first non-clairvoyant algorithm for online service with delay. Define k to be the number of locations on which requests are released in the input; we prove the following theorem.

Theorem 1.

There exists a polynomial-time, deterministic, non-clairvoyant algorithm for online service with delay which is O⁢(k⁢log⁡k)-competitive.

In particular, note that k≤min⁡(n,m); thus, Theorem 1 also yields an O⁢(min⁡{n⁢log⁡n,m⁢log⁡m}) competitiveness bound. Recalling the Ω⁢(n),Ω⁢(m) lower bounds on competitiveness of [4] for non-clairvoyant algorithms for OSD, we conclude that our competitive ratio is tight up to a logarithmic factor.

Another problem of interest is online service with deadlines. In this problem, instead of accumulating delay cost, every request has an associated deadline by which it must be served. Online service with deadlines is a special case of online service with delay; intuitively, a request with a deadline corresponds to a request with delay that goes from zero to infinity at the time of the deadline. Yet, online service with deadlines has been studied explicitly in the past (e.g., [24, 25, 35]). Theorem 1 for online service with delay also yields Theorem 2 for online service with deadlines as a corollary, providing the first non-clairvoyant algorithm for online service with deadlines.

Theorem 2.

There exists a polynomial-time, deterministic, non-clairvoyant algorithm for online service with deadlines which is O⁢(k⁢log⁡k)-competitive.

1.2 Related Work

A class of problems related to online service with delay is online network design with delay, where connectivity requests are handled by transmitting items. Such problems include TCP Acknowledgement [21, 29, 17, 28], joint replenishment [18, 15, 11, 19], multilevel aggregation [9, 16, 31, 6, 8], facility location [6, 7, 10], and set cover with delay [2, 33, 31]. In [7], a general framework for such problems in the clairvoyant model was introduced, yielding logarithmic competitiveness.

While some problems, such as set cover with delay, retain polylogarithmic competitiveness in the non-clairvoyant setting [2], others become much harder. This is the case for joint replenishment, facility location and multilevel aggregation with delay, which have Ω⁢(n) and Ω⁢(m) lower bounds on the competitiveness of any randomized algorithm [4, 31]. As online service with delay is a generalization of the joint replenishment and multilevel aggregation problems, these lower bounds extend also to non-clairvoyant service with delay. An O⁢(min⁡(n⁢log⁡n,m⁢log⁡m))-competitive framework for non-clairvoyant network design was introduced in [34], nearly matching these lower bounds.

Online service with delay in the clairvoyant setting has also been considered with k servers (rather than a single server). Azar et al. [4] presented a O⁢(k⋅polylog⁢(n))-competitive randomized algorithm for the problem. The algorithm involved randomly embedding the metric space into a tree, then solving deterministically on that tree; as the algorithm did not use randomization in server allocation, its dependence on k is linear. Subsequently, for the special case of a metric space that is a weighted star, Gupta et al. [26] presented an O⁢(log⁡n⁢log⁡k)-competitive randomized algorithm. For a general metric space, Gupta et al. [25] presented a O⁢(polylog⁢(Δ,n))-competitive algorithm, where Δ is the aspect ratio of the metric space (largest-to-smallest pairwise-distance ratio). For the special case of a uniform metric space, Krnetic et al. [30] settled the exact competitive ratio admitted by the problem; interestingly, the upper bound was achieved by a non-clairvoyant algorithm, showing that clairvoyance is not needed on a uniform space.

Another noteworthy line of work in online algorithms with delay has been on online matching, where matching requests arrive over time and accumulate delay cost while unmatched; see, e.g.,  [1, 22, 3, 12, 13, 5, 32, 27, 20]. In most of these works, a main assumption is that delay accumulation is identical for all requests, which nullifies the need for clairvoyance. (A notable exception is [20], that considers more general delay models.)

1.3 Our Techniques

Consider the algorithm for clairvoyant online service with delay in [35]. This algorithm performs services; a service is a sequence of server movements that occurs instantaneously at a given time. Each service is triggered by a set of requests gathering sufficient delay cost. In each service, the server moves within a ball of a certain radius around its location, serving some pending requests subject to a given budget; the radius of the ball and the service budget are determined by a property called the service’s level.

The prioritization of requests within the ball is according to the future delay accumulation of requests. Intuitively, this prioritization ensures that if a request “survived” a service λ at time t, but then gathers delay cost that triggers another service λ′ at time t′, then the requests that were served by λ would have gathered large delay during [t,t′] had they been left pending; this is used to justify a doubling argument, e.g. allowing λ′ to have twice the budget as λ. Services that use this doubling mechanism are called “secondary”, while other services are called “primary”.

However, in the non-clairvoyant setting considered in this paper, we cannot predict future delay, and thus cannot prioritize requests. Instead, we are relegated to spending budget “blindly”. In our algorithm, this is expressed by solving a prize-collecting Steiner tree problem in which we aim to visit some locations within a certain ball, where the penalty function is uniform; i.e., visiting every location is equally important. This results in our algorithm visiting the most locations subject to a certain budget per location. Conversely – and crucially – we maintain the property that locations not visited by our solution are expensive to visit; in fact, every bundle of these requests is expensive. The construction of a poly-time prize-collecting algorithm with this property is based on the construction in [34], and hinges on prize-collecting Steiner tree admitting a Lagrangian approximation (as shown, e.g., by Goemans and Williamson [23]).

Then, we wait for these unvisited locations to gather delay equal to their budget; once enough locations accumulate this delay, we can charge it to the optimal solution, as both the incurred delay and the cost of serving these requests are large. However, when unvisited locations gather large delay, the algorithm must also serve them; it does so greedily, moving to the request and back. We call these greedy services “tertiary”, and they exist alongside primary and secondary services.

An additional, more technical component of the algorithm is that of domes. As in [35], requests have levels in our algorithm, and a service starts when requests of level at most ℓ gather enough delay in a radius-2ℓ ball, for some level ℓ. However, unlike in [35], inside an inner ball of radius 2ℓ−1, we only consider delay of requests exactly ℓ, forming a dome-like structure. The benefit of this structure is in eliminating the slack in service levels that existed in the doubling argument of [35]. The use of this property in the proof is related to the investment counters that are maintained per location, rather than per request (as in [35]), as non-clairvoyance prohibits us from knowing a request’s future delay cost.

2 Preliminaries

In online service with delay, a metric space G of n points is given; we denote by δ⁢(u,v) the distance between two points u,v∈G. Requests are released over time in an online manner, where every request q is associated with a point V⁢(q)∈G. At any point in time, the algorithm can move the server from its current location a to a new location a′, paying a cost of δ⁢(a,a′). Then, every request pending q where V⁢(q)=a′ becomes served. We denote by rq the release time of request q. Every request q also has some continuous, non-decreasing delay function dq, which maps from a time t≥rq to the delay cost incurred by q if pending until time t111The continuity assumption is without loss of generality: relaxing this assumption, one could simulate continuous delay growth upon observing a delay “spike”.; we assume that every request must eventually be served, and thus dq tends to infinity as time advances. Without loss of generality, we also assume that dq⁢(rq)=0 (assuming otherwise would simply add a constant additive term to the cost of all solutions). We expand this notation to multiple requests: for every subset of requests Q′⊆Q and time t, we define dQ′⁢(t):=∑q∈Q′dq⁢(t). We also define m:=|Q| to be the total number of requests in the input sequence.

Our algorithms perform services, which are a set of server movements that take place instantaneously. Where λ is a service, we denote by tλ the time in which the service occurs. We define a⁢(t),a∗⁢(t) to be the locations of the algorithm’s server and the optimum’s server at time t, respectively. Throughout the paper, when we refer to the value of some variable at tλ for some service λ, we refer to the value immediately before the service. For example, a⁢(tλ) is the location of the server immediately before λ. As a shorthand, we also define aλ:=a⁢(tλ).

We define B⁢(v,r) to be the closed ball centered at v of radius r (i.e., the set of points of distance at most r from v). We also sometimes equate the points of the metric space G with the nodes of a clique graph, where the edge connecting nodes u,v has weight δ⁢(u,v). This graph representation is useful when discussing charging cylinders, a useful tool in our analysis.

For ease of notation, we use the superscript + to indicate the positive part of a number. That is, x+:=max⁡(0,x).

3 Online Service with Delay

This section introduces an algorithm for non-clairvoyant online service with delay, proving Theorem 1. First, we define k to be the number of locations on which requests are released in the input. Note that k≤min⁡(n,m); we thus focus on proving O⁢(k⁢log⁡k)-competitiveness, which implies the competitiveness bound of Theorem 1.

3.1 The Algorithm

Before describing the algorithm, we first introduce some of its components.

Steiner tree.

As part of our algorithm, we formulate and solve a Steiner tree problem. In Steiner tree, one is given a graph with edge costs and a set of terminal nodes. The goal is to buy an edge subset of minimal cost that connects the terminals. With terminals V, and assuming that the graph is known from context, we use ST∗⁢(V) to denote the optimal cost of a solution. We also sometimes refer to the (equivalent) rooted version, in which the terminals must be connected to a designated root node r; here, we use ST∗⁢(V;r) to denote the optimal cost.

Prize-collecting Steiner tree and Lagrangian approximation.

In the prize-collecting variant of the (rooted) Steiner tree problem, we are also given a penalty function π mapping from each terminal to a non-negative penalty; we write the prize-collecting input as (Q,π;r). The algorithm must connect terminals to the root by buying edges, and must pay the penalty for unconnected terminals. The goal of the algorithm is to minimize the sum of edge costs and penalty costs; we write PCST∗⁢(Q,π;r) to refer to the optimal solution to the input (Q,π;r). A Lagrangian prize-collecting algorithm is an algorithm that has different approximation ratios w.r.t. these two costs, such that it is 1-approximate on penalty costs. Specifically, Goemans and Williamson [23] presented the following algorithm for prize-collecting Steiner tree.

Theorem 3 (due to [23]).

There exists an approximation algorithm PCST for prize-collecting Steiner tree such that, fixing any input (Q,π;r), it holds that

PCSTb⁢(Q,π;r)+2⋅PCSTp⁢(Q,π;r)≤2⋅PCST∗⁢(Q,π;r),

where PCSTb,PCSTp are the buying and penalty costs of PCST, respectively.

In [34], a simple procedure is presented that converts a Lagrangian prize-collecting procedure into a procedure which identifies a solution to a maximal subset of requests subject to a budget per request. Combining this result with the algorithm of [23] yields Lemma 4, which introduces the procedure PCSolve used in our algorithm.

Lemma 4 (due to [23] and Proposition 21 from [34]).

There exists a procedure PCSolve which, given a prize-collecting Steiner tree input (Q,π;r), outputs a solution T for a request subset Q′⊆Q such that:

  • ■

    c⁢(T)≤2⋅∑q∈Q′π⁢(q).

  • ■

    For every Q′′⊆Q∖Q′, it holds that ST∗⁢(Q′′;r)≥∑q∈Q′′π⁢(q).

Levels and pointers.

The algorithm maintains for every pending request q a level ℓq, which is initially −∞. A service λ also has a level ℓλ, which determines its budget for serving requests. As services occur, they may increase the levels of requests. The algorithm also maintains for request q a pointer μq to the last service that increased the level of q. (A fine point, as seen in the algorithm, is that a service may also appear in the pointer μq only for “attempting” to increase ℓq.) Finally, overloading notation, each service λ also has a pointer μλ that points to a prior service; this pointer is equal to the pointer μq for some request q considered by λ.

Residual delay counters and domes.

The algorithm maintains a residual delay counter gv,ℓ for every location v and level ℓ; for time t, we define gv,ℓ⁢(t) to be the value of gv,ℓ at time t. This counter grows with the delay cost incurred by level-ℓ requests on v. In addition, the counters are occasionally decreased by services made by the algorithm; this can be interpreted as the service “paying” for incurred delay out of its budget. Positive counters correspond to incurred delay that has not yet been handled; such counters can trigger a service, in the manner we now describe.

At any time t, and for every level ℓ, the algorithm considers positive residual delay counters of levels at most ℓ inside B⁢(a⁢(t),2ℓ). Specifically, it considers the total unhandled residual delay of requests of level at most ℓ inside the ring B⁢(a⁢(t),2ℓ)∖B⁢(a⁢(t),2ℓ−1), plus unhandled residual delay of requests of level exactly ℓ inside the internal ball B⁢(a⁢(t),2ℓ−1). This forms a dome-like structure, as shown in Figure 1. The algorithm waits until a dome corresponding to some level ℓ becomes critical, i.e., has a lot of unhandled residual delay, and then starts a service. These notions are formalized in Definition 5.

Definition 5 (domes).

For every time t, level ℓ, and v∈B⁢(a⁢(t),2ℓ), define

yℓ⁢(v,t):={(gv,ℓ⁢(t))+v∈B⁢(a⁢(t),2ℓ−1)∑ℓ′≤ℓ(gv,ℓ′⁢(t))+v∈B⁢(a⁢(t),2ℓ)∖B⁢(a⁢(t),2ℓ−1)

For time t and level ℓ, define Yℓ⁢(t):=∑v∈B⁢(a⁢(t),2ℓ)yℓ⁢(v,t); where t is known from context, we also write Yℓ. If Yℓ≥2ℓ, we say that dome ℓ is critical.

This visualization illustrates the structure of domes. The metric space visualized is a line, shown on the horizontal axis. The vertical axis shows counter levels. The shapes in color correspond to the different domes at the current time, which include different levels at different points, according to their distance from the server.

Figure 1: Visualization of domes.

Algorithm’s Description.

Whenever dome ℓ becomes critical, we start a service λ of level ℓ+4. (If more than one dome is critical at the same time, we handle the dome of the largest level first.) The service first considers whether the dome has any positive residual delay from the inner ball B⁢(aλ,2ℓ−1)=B⁢(aλ,2ℓλ−5). If not, the service λ is called primary. Otherwise, consider a location v of the inner ball that contributes positive residual delay to the dome; it must be that gv,ℓ>0, which implies (through Proposition 9) that there exists a level-ℓ pending request on v. The service arbitrarily chooses such a request σλ, and observes the last service to modify the level of the request, i.e., μσλ; denote this service by λ′. Depending on λ′, the algorithm decides if the service will invest for the future (“secondary” service) or act greedily (“tertiary” service). Specifically, the algorithm maintains a counter β⁢(λ′) for the number of times λ′ has triggered tertiary services; if the counter is low, λ becomes tertiary and increments this counter; otherwise, λ will be secondary. After deciding if a service is primary, secondary, or tertiary, the algorithm zeroes all positive residual delay on locations in B⁢(aλ,2ℓλ) of levels up to ℓλ; in particular, this zeroes the residual delay that triggered λ.

Next, if the service is tertiary, it simply moves the server to σλ and back, concluding the service. Otherwise, λ is primary or secondary, and thus invests in serving pending requests, through the method ServeEligible. In ServeEligible, the service considers the subset of locations Vλ inside B⁢(aλ,2ℓλ) on which there are pending requests. To each location in Vλ, the algorithm assigns a budget of xλ=2ℓλ/|Vλ| to visiting each such location; the locations Vλ, together with their budgets as penalties, are transferred to PCSolve as a prize-collecting Steiner tree input (where the root is the current location of the server aλ). PCSolve outputs a tree connecting some locations Qλ∘⊆Vλ to aλ; this tree is then traversed by the server in a DFS fashion, visiting Qλ∘ and ending at aλ. For the remaining locations Vλ∖Qλ∘, where PCSolve pays the penalty, the algorithm decreases the delay counters for those locations by xλ. On those locations, the algorithm makes pending requests of level at most ℓλ point to λ, and upgrades their level to ℓλ.

Finally, for primary services, the algorithm may move the server to a new location aλ′. Recall that λ starts upon dome ℓλ−4 becoming critical; if the majority of the residual delay making dome ℓλ−4 critical occurs inside a small-radius ball (specifically, radius 2ℓλ−8), then the center of this ball becomes the new location aλ′, at which the server rests at the end of the service.

The non-clairvoyant algorithm for online service with delay is given in Algorithm 1, and the ServeEligible method appears in Algorithm 2. We henceforth focus on analyzing Algorithm 1 and proving Theorem 1.

Algorithm 1 Non-clairvoyant algorithm for online service with delay.
Algorithm 2 The ServeEligible method.

3.2 Definitions and Properties

Definition 6.

We define the following.

  1. 1.

    Let Λ denote the set of services in the algorithm. We partition Λ into Λ1,Λ2,Λ3, the sets of primary, secondary, and tertiary services, respectively.

  2. 2.

    For two services λ1,λ2∈Λ where λ2 occurs after λ1, if μλ2=λ1 we say that λ2 is assigned to λ1. Note that in this case λ1∈Λ1∪Λ2, λ2∈Λ2∪Λ3.

  3. 3.

    Let λ∈Λ1∪Λ2 be a service. If there exists a secondary service λ′∈Λ2 which is assigned to λ, then we call λ a certified service, and say that λ′ certified λ. We denote the set of certified services by Λc⊆Λ1∪Λ2.

Proposition 7.

For a certified service λ∈Λc, we have the following:

  1. 1.

    The service λ is certified by exactly one service λ′∈Λ2.

  2. 2.

    It holds that ℓλ′=ℓλ+4.

  3. 3.

    It holds that δ⁢(aλ,aλ′)≤2ℓλ+1.

Proof.

First, observing Line 9 of Algorithm 2, we note that if for request q we have μq=λ, then it must be the case that ℓq=ℓλ at that time. Note that λ is only certified by some λ′∈Λ2 if μσλ′=λ, and thus ℓσλ′=ℓλ at tλ′; but, ℓλ′=ℓσλ′+4 at tλ′, proving the second item. Moreover, note that σλ′∈Vλ, and thus δ⁢(aλ,σλ′)≤2ℓλ. In addition, since σλ′∈B⁢(aλ′,2ℓλ′−5), we have δ⁢(aλ′,σλ′)≤2ℓλ′−5=2ℓλ−1. The triangle inequality thus implies δ⁢(aλ,aλ′)≤2ℓλ+2ℓλ−1≤2ℓλ+1, proving the third item.

We now prove the first item, i.e., the uniqueness of λ′. Suppose, for contradiction, that a certified service λ∈Λc is certified by two services λ′,λ′′∈Λ2, and assume without loss of generality that λ′ occurs before λ′′. We prove that after λ′, there remains no pending request q with μq=λ, and thus λ′′ cannot certify λ later on. Indeed, consider such a request q immediately before λ′; it holds that q∈Vλ⊆B⁢(aλ,2ℓλ), and it must also be the case that ℓq=ℓλ at that time. But, we’ve shown that δ⁢(aλ,aλ′)≤2ℓλ+1, and thus B⁢(aλ,2ℓλ)⊆B⁢(aλ′,2ℓλ+4)=B⁢(aλ′,2ℓλ′). Thus, q∈Vλ′, and will either be served by λ′ or have μq be set to λ′, in contradiction to having μq=λ at tλ′′. ◀

Proposition 8.

For every level i it holds that Yi≤2i+2 at every point in time.

The proof of Proposition 8 is in Appendix B.

Proposition 9.

For every point v∈G, level ℓ and time t, it holds that gv,ℓ⁢(t)≤dQ′⁢(t), where Q′ is the set of pending requests of level exactly ℓ on v at time t. (In particular, when Q′=∅, it holds that gv,ℓ⁢(t)≤0.)

Proof.

We prove this by induction as time advances, noting that the proposition holds at time 0 (before any requests are released). Note that gv,ℓ⁢(t) grows at the same rate as the delay of pending requests of level ℓ on v, and thus delay growth cannot break the invariant. In addition, counter decreases in services cannot break the invariant. The only risky event is when a request of level ℓ is upgraded or completed. But, this only happens in a service λ such that ℓλ≥ℓ and v∈B⁢(aλ,2ℓλ). Note that in such services, Line 17 of Algorithm 1 ensures that gv,ℓ is non-positive after the service, maintaining the invariant. ◀

Proposition 10.

During a service λ, if the algorithm moves its server from aλ to aλ′ in Line 23 of Algorithm 1, then 2ℓλ−5−2ℓλ−8≤δ⁢(aλ,aλ′)≤2ℓλ−4+2ℓλ−8.

Proof.

Note that the server only moves to aλ′ when λ is primary. In this case, it holds that Vλ†∩B⁢(aλ,2ℓλ−5)=∅. But, due to Proposition 9, this implies that gv,ℓλ−4⁢(t)≤0 for every v∈B⁢(aλ,2ℓλ−5); thus, for such v we have yℓλ−4⁢(v,t)=0, and thus Vλ† is contained in the ring B⁢(aλ,2ℓλ−4)∖B⁢(aλ,2ℓλ−5). But, from the definition of aλ′, B⁢(aλ′,2ℓλ−8) must contain a point from Vλ†, which completes the proof. ◀

For a service λ, define the cost of the service, denoted c⁢(λ), to be the total movement of the server during λ plus the total amount by which the service decreases counters gv,ℓ.

Proposition 11.

ALG≤∑λ∈Λc⁢(λ).

Proof.

To prove the proposition, we just have to prove that the total delay incurred by the algorithm is upper-bounded by the total amount by which counters are decreased in the algorithm. First, recall the assumption that the delay of requests tends to infinity as time advances; thus, every request is eventually served by the algorithm. Thus, once all requests are served, Proposition 9 implies that gv,ℓ≤0 for every v∈G and level ℓ, which completes the proof. ◀

The following observation results from the fact that every counter gv,ℓ is counted in exactly one dome (and can also easily be seen in Figure 1).

Observation 12.

At any time t, and for every level ℓ, it holds that

∑ℓ′≤ℓYℓ′=∑v∈B⁢(a⁢(t),2ℓ)∑ℓ′≤ℓ(gv,ℓ′)+.
Lemma 13.

ALG≤O⁢(k)⋅∑λ∈Λ12ℓλ+O⁢(k)⋅∑λ∈Λc2ℓλ.

Proof.

Applying Proposition 11, it is enough to bound ∑λ∈Λc⁢(λ). We first bound the cost of tertiary services ∑λ∈Λ3c⁢(λ). Consider a tertiary service λ∈Λ3; it incurs the following costs:

  1. 1.

    It zeroes any positive counters gv,ℓ for every v∈B⁢(aλ,2ℓλ) and ℓ≤ℓλ. The cost of this is at most

    ∑v∈B⁢(aλ,2ℓλ)∑ℓ≤ℓλ(gv,ℓ)+=∑ℓ≤ℓλYℓ≤2ℓλ+3,

    where the equality is due to Observation 12, and the inequality is due to Proposition 8 and summing a geometric sequence.

  2. 2.

    It moves the server from aλ to σλ and back (Line 19 of Algorithm 1). Since σλ∈B⁢(aλ,2ℓλ−4), the cost of this is at most 2ℓλ−3.

Overall, the cost of a tertiary service λ is O⁢(2ℓλ).

Now, consider a non-tertiary service λ∈Λ1∪Λ2; there are at most 2⋅|Vλ|+1 tertiary services assigned to λ′, as each such service raises β⁢(λ) by 1 and β⁢(λ) does not exceed 2⋅|Vλ|+1; note that 2⋅|Vλ|+1=O⁢(k). Moreover, for a tertiary service λ′ assigned to λ we have ℓλ′=ℓλ+4. Overall, we have that the cost of tertiary services is O⁢(k)⋅∑λ∈Λ1∪Λ22ℓλ.

Next, we bound the cost of non-tertiary services. The cost of a service λ∈Λ1∪Λ2 consists of the following terms:

  1. 1.

    It zeroes positive counters gv,ℓ for every v∈B⁢(aλ,2ℓλ) and ℓ≤ℓλ. This cost can be bounded by O⁢(1)⋅2ℓλ, using the same argument as for tertiary services.

  2. 2.

    In Algorithm 2, the algorithm moves the server (Line 5) and decreases counters (Line 10). From the guarantee of PCSolve in Lemma 4, the cost of moving the server is at most 2⋅2⋅xλ⋅|Qλ∘|; the cost of decreasing counters is (|Vλ|−|Qλ∘|)⋅xλ. Overall, the cost of this item is at most O⁢(1)⋅|Vλ|⋅xλ, which is at most O⁢(1)⋅2ℓλ⋅|Vλ|. Using the fact that |Vλ|≤k, the cost of this item is at most O⁢(k)⋅2ℓλ.

  3. 3.

    In Line 23 of Algorithm 1, the server might move to a new location aλ′. However, δ⁢(aλ,aλ′)≤2ℓλ−4+2ℓλ−8 due to Proposition 10. Thus, the cost of this movement is also O⁢(1)⋅2ℓλ.

Overall, it holds that c⁢(λ)≤O⁢(k)⋅2ℓλ; combining this with the bound for tertiary services, we get

ALG≤O⁢(k)⋅∑λ∈Λ1∪Λ22ℓλ. (1)

Finally, we bound ∑λ∈Λ22ℓλ≤O⁢(1)⁢∑λ∈Λc2ℓλ, which completes the proof. Consider a secondary service λ∈Λ2, which certifies some prior service λ′=μλ. Through Proposition 7, it holds that ℓλ′=ℓλ−4, and thus 2ℓλ≤O⁢(1)⋅2ℓλ′. Again through Proposition 7, it holds that λ′ is only certified once (by λ); thus, summing over secondary services yields

∑λ∈Λ22ℓλ≤O⁢(1)⋅∑λ∈Λ12ℓλ,

which combined with Equation 1 completes the proof. ◀

3.3 Charging Cylinders

It remains to bound the terms ∑λ∈Λ12ℓλ and ∑λ∈Λc2ℓλ. To do so, we restate the notions of charging balls and charging cylinders introduced in [35].

First, consider our goal. The optimal solution takes some tour through the graph over time, and we would like to map its resulting cost to the services of the algorithm. To this end, we give each service λ temporary “ownership” of a set of edges and edge parts, for some interval in time. We then charge the cost associated with λ (i.e. 2ℓλ) to the total cost incurred by the optimal solution in traversing these edges and edge parts during the given interval. In doing so, one must ensure that no movement of OPT is charged to twice; this is ensured by having disjointness, which is the property that no edge part is owned by more than one service at any point in time.

Charging shapes and cylinders.

A charging shape is a shape in the metric space that contains some edges and “parts” of edges. (For the sake of this definition, an edge e can be partitioned into parts whose weights sum up to c⁢(e).)

A charging ball centered at v of radius r – which, overloading notation, we denote B⁢(v,r) – is a charging shape such that:

  • ■

    If both u,w are in B⁢(v,r) then B⁢(v,r) contains the entire edge {u,w}.

  • ■

    If u∈B⁢(v,r) but w∉B⁢(v,r), then B⁢(v,r) contains the part of {u,w} connected to u of weight r−δ⁢(v,u).

A charging cylinder is a pair (B,I) where I is a time interval and B is a charging shape.

Disjointness.

We say that a set of charging shapes is disjoint if the parts of edges that appear in different charging shapes do not intersect. We say that a set of charging cylinders is disjoint if for every time t it holds that the charging shapes of the cylinders whose time intervals contain t are disjoint.

Intersections.

For a set of edges E′⊆E and charging shape B, we define c⁢(E′∩B) to be the total weight of edges in E′ that appear in B. For a cylinder γ=(B,I), we define c⁢(OPT∩γ) (called the intersection of OPT with γ) to be the total weight of edges in E′ that appear in B, where E′ is the set of edges traversed by OPT at least once during I.

Theorem 14 is due to [35], and is used to relate the total intersection of the cylinder set we construct to the cost of the optimal solution. The intuition for the theorem is the following: suppose we are given a set of cylinders Γ whose shapes are balls centered at N points. One can replace every such charging ball of radius r with a perforated charging ball, from which balls of small radius Θ⁢(r/N2) are removed around each of the N points; let Γ′ be the set of cylinders after this perforation process. In Γ′, two cylinders whose shapes are (perforated) charging balls with radii r1,r2 where r1≤O⁢(r2/N2) are guaranteed to be disjoint. Suppose that in the original set Γ, every two cylinders with radii within a constant factor from each other are also disjoint; after the perforation, we can partition Γ′ into Θ⁢(log⁡N) disjoint classes. This bounds the intersection of Γ′ with OPT by at most Θ⁢(log⁡N)⋅OPT. Moreover, one can observe that this perforation of a cylinder’s shape decreases its intersection with OPT by at most a constant times the charging ball’s radius; this relates the intersection of Γ with OPT to the intersection of Γ′ with OPT. For more intuition regarding cylinders and Theorem 14, see Figure 2.

Theorem 14 ([35]).

Let Γ be a set of cylinders such that for every cylinder γ∈Γ its charging shape B⁢(vγ,rγ) is a ball. Partition Γ into {Γi} where for every γ∈Γi it holds that ⌈log⁡rγ⌉=i. If for every i the set of cylinders Γi is disjoint, then for every constant c>0 it holds that

∑γ∈Γc⁢(OPT∩γ)≤O⁢(log⁡k)⋅OPT+c⋅∑γ∈Γrγ,

where k is the number of centers used by cylinders in Γ.

(a) cylinders.
(b) perforated cylinders.

This figure illustrates the concept of cylinders used in this paper and in the proof of Theorem 14. Figure 2(a) shows a metric space G which is a line, the points of which appear on the vertical axis. The tour of the optimal server appears as an axis-aligned curve traversing space over time; the length of the solid parts of the curve correspond to the movement cost of the optimal solution. Two charging cylinders appear in the figure, whose charging shapes are balls; those balls appear as intervals in the one-dimensional metric space, and thus the cylinder appears as a rectangle in the figure. For each cylinder γ, the part of the optimal tour counted towards c⁢(OPT∩γ) is shown in red. Note that as the shown cylinders are disjoint, the sum of ∑γc⁢(OPT∩γ) lower-bounds OPT. Figure 2(b) shows the main tool used in proving Theorem 14 in [35], which is perforation; in essence, lower-radii charging balls are removed from each cylinder around each point in the metric space, enabling immediate disjointness with all cylinders of much lower radii.

Figure 2: Illustration of cylinders.

Through constructing and analyzing such cylinders, we prove the following lemmas.

Lemma 15.

It holds that ∑λ∈Λ12ℓλ≤O⁢(log⁡k)⋅OPT.

Lemma 16.

It holds that ∑λ∈Λc2ℓλ≤O⁢(log⁡k)⋅OPT.

The proof of Lemma 15 appears in Appendix A, while the proof of Lemma 16 appears in the remainder of this section. We now note that given these lemmas, the proof of the main theorem is complete.

Proof of Theorem 1.

The proof is immediate from Lemma 13, Lemma 15 and Lemma 16. ◀

The remainder of this section proves Lemma 16. For every service λ∈Λc, we denote by Λλ the set of tertiary services assigned to λ. We also define Σλ:={σλ′|λ′∈Λλ}; note that Σλ⊆Eλ. Finally, we define Σλ∘:=V⁢(Σλ).

First, we study the size of the set Σλ∘.

Proposition 17.

For every λ∈Λc, it holds that |Σλ∘|=⌈2⁢|Vλ|⌉.

Proof.

First, note that |Σλ| is exactly the final value of the counter β⁢(λ), as each tertiary service assigned to λ increases β⁢(λ) by 1 (Line 20 of Algorithm 1). A service assigned to λ will only be tertiary if β⁢(λ)<2⁢|Vλ|; otherwise, it would be secondary. Thus, the final value of the counter is at most ⌈2⁢|Vλ|⌉. However, we know that a secondary service is assigned to λ, as λ∈Λc. Thus, the final value of β⁢(λ) is exactly ⌈2⁢|Vλ|⌉, completing the proof. ◀

Definition 18.

For a service λ∈Λc, define:

  • ■

    Eλ to be the set of pending requests of level at most ℓλ on points in Σλ∘ at tλ.

  • ■

    The certified time interval Ic⁢(λ):=(minq∈Eλ⁡rq,maxλ′∈Λλ⁡tλ′].

  • ■

    The certified cylinder γc⁢(λ):=(B⁢(aλ,3⋅2ℓλ),Ic⁢(λ)).

We also define the justified residual delay of λ, which is the amount Dc,λ∗:=∑v∈Vλ∗xλ, where Vλ∗⊆Σλ∘ is the subset of locations which were not visited by the optimal solution during Ic⁢(λ).

To prove that the intersection of a certified cylinder with the optimal solution is sufficiently large, we first restate a proposition from [35]. Intuitively, it states that if the set of requested terminals in a Steiner tree input is concentrated in a ball, a constant fraction of the cost required for connecting them must be incurred within a padded version of the ball, whose radius is larger by a constant factor.

Proposition 19 (restatement of Proposition 3.22 from [35]).

Let V be a set of locations that are contained in B⁢(v,r), for some location v and radius r, and let G′⊆G be any subgraph connecting V. Then it holds that c⁢(G′∩ℬ⁢(v,3⁢r))≥ST⁢(V)/2.

Proposition 20.

It holds that ∑λ∈ΛcDc,λ∗≤OPT.

Proof.

We observe charging triplets of the form (v,ℓ,I), where v is a location, ℓ is a level, and I is a time interval. Every certified service λ∈Λc owns triplets. Specifically, for every service λ∈Λc, location v∈Vλ∗, and λv the tertiary service assigned to λ where σλv∈v, we say that λ owns the triplet (v,ℓλ,Iv), where Iv=[tλ,tλv] be the time interval between λ and the service λv. We now claim the following:

  1. 1.

    If λ owns triplet v,ℓ,I, then a delay of at least xλ is incurred by requests of level ℓ on v during I. Moreover, these requests are pending in the optimal solution during the interval I.

  2. 2.

    No two triplets intersect. That is, there are no two services λ1,λ2∈Λc such that λ1 owns (v,ℓ,I1), λ2 owns (v,ℓ,I2) and I1∩I2≠∅.

The first claim implies that the optimal solution incurs a delay cost of Dc,λ∗ per service λ∈Λc, and the second claim implies that no delay cost is charged twice. Together, these two claims complete the proof.

Claim 1.

Fix service λ∈Λc, location v∈Vλ∗, and tertiary service λv assigned to λ where σλv∈v; let Iv=[tλ,tλv], and set ℓ:=ℓλ. As v∈Σλ∘⊆Vλ, it holds immediately after λ that gv,ℓλ≤−xλ (due to Line 17 of Algorithm 1 and Line 10 of Algorithm 2). However, at tλv, it holds that yℓλv−4⁢(v)>0; moreover, it holds that v∈B⁢(aλv,2ℓλv−5), and thus yℓλv−4⁢(v,tλv)=(gv,ℓλv−4⁢(tλv))+=(gv,ℓλ⁢(tλv))+. Thus, the counter gv,ℓλ has increased by at least xλ during the time interval Iv:=(tλ,tλv].

Next, we claim that inside Iv, there was no non-tertiary service λ′ of level at least ℓ such that v∈B⁢(aλ′,2ℓλ). Assume otherwise, and note that σλv is pending on v, and is of level exactly ℓ; thus, after λ′, it would either be served or have μσλv be set to λ′, in contradiction to λv being assigned to λ.

As a result, we claim that every request on v of level ℓλ during Iv belongs to Eλ. First, note that immediately after λ, all pending level-ℓ requests on v are in Eλ. Suppose for contradiction that this is broken at some point; that is, a new level-ℓ request joins. This could only happen if its level is upgraded by some non-tertiary service during Iv, but there is no such service due to the previous claim.

Finally, note that the requests of Eλ are pending in the optimal solution during Iv, as the optimal server did not visit v during Ic⁢(λ); thus, the optimal solution incurs the same delay cost of at least xλ.

Claim 2.

Assume that two triplets (v,ℓ,I1), (v,ℓ,I2) that are owned by services λ1,λ2∈Λc, are such that I1∩I2≠∅; note that ℓλ1=ℓλ2=ℓ. Assume without loss of generality that λ1 is the earlier service; then, tλ2∈I1. Note that v∈B⁢(aλ2,2ℓλ2); however, this cannot be, at no non-tertiary service λ of level at least ℓ can occur during I1 such that v∈B⁢(aλ,2ℓλ), as seen in the proof of the first claim. ◀

Proposition 21.

For every λ∈Λc, it holds that 2ℓλ−1≤c⁢(OPT∩γc⁢(λ))+Dc,λ∗.

Proof.

Consider the set of locations W:=Σλ∘∖Vλ∗, which is a subset of Vλ. These locations were not visited during λ, as the solution computed by PCSolve in Line 4 of Algorithm 2 does not include them. However, due to the guarantee of PCSolve in Lemma 4, this implies that

ST∗⁢(W;aλ)≥xλ⋅|W|=2ℓλ/|Vλ|⋅|W|.

Noting that W⊆B⁢(aλ,2ℓλ), we have ST∗⁢(W)≥ST∗⁢(W;aλ)−2ℓλ. Applying Proposition 19, denoting by G∗ the subgraph traversed by OPT during Ic⁢(λ), it holds that c⁢(G∗∩B⁢(aλ,3⋅2ℓλ))≥ST∗⁢(W)/2. Combining the above, we get:

c⁢(OPT∩γc⁢(λ))+Dc,λ∗ ≥ST∗⁢(W)/2+(|Σλ∘|−|W|)⁢xλ
≥2ℓλ−1|Vλ|⋅|W|−2ℓλ−1+(|Σλ∘|−|W|)⁢2ℓλ|Vλ|
≥2ℓλ−1⋅(|W||Vλ|+|Σλ∘|−|W||Vλ|−1)=2ℓλ−1⋅(|Σλ∘||Vλ|−1)≥2ℓλ−1

where the final inequality is due to the fact that |Σλ∘|=⌈2⁢|Vλ|⌉, due to Proposition 17. ◀

Proposition 22.

For every ℓ, the set of cylinders {γc⁢(λ)|λ∈Λc∧ℓλ=ℓ} is disjoint.

The proof of Proposition 22 appears in Appendix B.

Proof of Lemma 16.

It holds that

∑λ∈Λc2ℓλ≤2⁢∑λ∈Λc(c⁢(OPT∩γc⁢(λ))+Dc,λ∗)≤O⁢(log⁡k)⋅OPT+O⁢(1)⋅OPT=O⁢(log⁡k)⋅OPT

where the first inequality is due to Proposition 21, and the second inequality is due to Proposition 22 and Proposition 20. ◀

4 Conclusions

In this paper, we presented a O⁢(min⁡{n⁢log⁡n,m⁢log⁡m})-competitive algorithm for non-clairvoyant online service with delay, that is deterministic and runs in polynomial time. This nearly matches the lower bounds of Ω⁢(n) and Ω⁢(m) on competitiveness that appear in [4].

However, the choice of metric space for the problem greatly affects the achievable competitive ratio for non-clairvoyant service with delay. The square-root lower bounds in [4] are obtained for a uniform metric space; however, for a metric space which is a line, an O⁢(log⁡n)-competitive non-clairvoyant algorithm exists [14]. Given this stark difference in competitive ratio, it would be interesting to identify a salient property of the metric space, and study competitiveness as a function of this property.

References

  • [1] Itai Ashlagi, Yossi Azar, Moses Charikar, Ashish Chiplunkar, Ofir Geri, Haim Kaplan, Rahul M. Makhijani, Yuyi Wang, and Roger Wattenhofer. Min-cost bipartite perfect matching with delays. In Approximation, Randomization, and Combinatorial Optimization. Algorithms and Techniques, APPROX/RANDOM 2017, August 16-18, 2017, Berkeley, CA, USA, pages 1:1–1:20, 2017. doi:10.4230/LIPIcs.APPROX-RANDOM.2017.1.
  • [2] Yossi Azar, Ashish Chiplunkar, Shay Kutten, and Noam Touitou. Set cover with delay - clairvoyance is not required. In Fabrizio Grandoni, Grzegorz Herman, and Peter Sanders, editors, 28th Annual European Symposium on Algorithms, ESA 2020, September 7-9, 2020, Pisa, Italy (Virtual Conference), volume 173 of LIPIcs, pages 8:1–8:21. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2020. doi:10.4230/LIPIcs.ESA.2020.8.
  • [3] Yossi Azar and Amit Jacob Fanani. Deterministic min-cost matching with delays. In Approximation and Online Algorithms - 16th International Workshop, WAOA 2018, Helsinki, Finland, August 23-24, 2018, Revised Selected Papers, pages 21–35, 2018. doi:10.1007/978-3-030-04693-4_2.
  • [4] Yossi Azar, Arun Ganesh, Rong Ge, and Debmalya Panigrahi. Online service with delay. In Proceedings of the 49th Annual ACM SIGACT Symposium on Theory of Computing, STOC 2017, Montreal, QC, Canada, June 19-23, 2017, pages 551–563, 2017. doi:10.1145/3055399.3055475.
  • [5] Yossi Azar, Runtian Ren, and Danny Vainstein. The min-cost matching with concave delays problem. In Dániel Marx, editor, Proceedings of the 2021 ACM-SIAM Symposium on Discrete Algorithms, SODA 2021, Virtual Conference, January 10 - 13, 2021, pages 301–320. SIAM, 2021. doi:10.1137/1.9781611976465.20.
  • [6] Yossi Azar and Noam Touitou. General framework for metric optimization problems with delay or with deadlines. In 60th IEEE Annual Symposium on Foundations of Computer Science, FOCS 2019, Baltimore, Maryland, USA, November 9-12, 2019, pages 60–71, 2019. doi:10.1109/FOCS.2019.00013.
  • [7] Yossi Azar and Noam Touitou. Beyond tree embeddings - a deterministic framework for network design with deadlines or delay. In 61st IEEE Annual Symposium on Foundations of Computer Science, FOCS 2020, Durham, NC, USA, November 16-19, 2020, pages 1368–1379. IEEE, 2020. doi:10.1109/FOCS46700.2020.00129.
  • [8] Marcin Bienkowski, Martin Böhm, Jaroslaw Byrka, Marek Chrobak, Christoph Dürr, Lukáš Folwarczný, Lukasz Jez, Jirí Sgall, Kim Thang Nguyen, and Pavel Veselý. New results on multi-level aggregation. Theor. Comput. Sci., 861:133–143, 2021. doi:10.1016/j.tcs.2021.02.016.
  • [9] Marcin Bienkowski, Martin Böhm, Jaroslaw Byrka, Marek Chrobak, Christoph Dürr, Lukáš Folwarczný, Lukasz Jez, Jiri Sgall, Nguyen Kim Thang, and Pavel Veselý. Online algorithms for multi-level aggregation. In 24th Annual European Symposium on Algorithms, ESA 2016, August 22-24, 2016, Aarhus, Denmark, pages 12:1–12:17, 2016. doi:10.4230/LIPIcs.ESA.2016.12.
  • [10] Marcin Bienkowski, Martin Böhm, Jaroslaw Byrka, and Jan Marcinkowski. Online facility location with linear delay. In Amit Chakrabarti and Chaitanya Swamy, editors, Approximation, Randomization, and Combinatorial Optimization. Algorithms and Techniques, APPROX/RANDOM 2022, September 19-21, 2022, University of Illinois, Urbana-Champaign, USA (Virtual Conference), volume 245 of LIPIcs, pages 45:1–45:17. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2022. doi:10.4230/LIPIcs.APPROX/RANDOM.2022.45.
  • [11] Marcin Bienkowski, Jaroslaw Byrka, Marek Chrobak, Lukasz Jez, Dorian Nogneng, and Jirí Sgall. Better approximation bounds for the joint replenishment problem. In Proceedings of the Twenty-Fifth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2014, Portland, Oregon, USA, January 5-7, 2014, pages 42–54, 2014. doi:10.1137/1.9781611973402.4.
  • [12] Marcin Bienkowski, Artur Kraska, Hsiang-Hsuan Liu, and Pawel Schmidt. A primal-dual online deterministic algorithm for matching with delays. In Approximation and Online Algorithms - 16th International Workshop, WAOA 2018, Helsinki, Finland, August 23-24, 2018, Revised Selected Papers, pages 51–68, 2018. doi:10.1007/978-3-030-04693-4_4.
  • [13] Marcin Bienkowski, Artur Kraska, and Pawel Schmidt. A match in time saves nine: Deterministic online matching with delays. In Approximation and Online Algorithms - 15th International Workshop, WAOA 2017, Vienna, Austria, September 7-8, 2017, Revised Selected Papers, pages 132–146, 2017. doi:10.1007/978-3-319-89441-6_11.
  • [14] Marcin Bienkowski, Artur Kraska, and Pawel Schmidt. Online service with delay on a line. In Structural Information and Communication Complexity - 25th International Colloquium, SIROCCO 2018, Ma’ale HaHamisha, Israel, June 18-21, 2018, Revised Selected Papers, pages 237–248, 2018. doi:10.1007/978-3-030-01325-7_22.
  • [15] Carlos Fisch Brito, Elias Koutsoupias, and Shailesh Vaya. Competitive analysis of organization networks or multicast acknowledgment: How much to wait? Algorithmica, 64(4):584–605, 2012. doi:10.1007/s00453-011-9567-5.
  • [16] Niv Buchbinder, Moran Feldman, Joseph (Seffi) Naor, and Ohad Talmon. O(depth)-competitive algorithm for online multi-level aggregation. In Proceedings of the Twenty-Eighth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2017, Barcelona, Spain, Hotel Porta Fira, January 16-19, pages 1235–1244, 2017. doi:10.1137/1.9781611974782.80.
  • [17] Niv Buchbinder, Kamal Jain, and Joseph Naor. Online primal-dual algorithms for maximizing ad-auctions revenue. In Algorithms - ESA 2007, 15th Annual European Symposium, Eilat, Israel, October 8-10, 2007, Proceedings, pages 253–264, 2007. doi:10.1007/978-3-540-75520-3_24.
  • [18] Niv Buchbinder, Tracy Kimbrel, Retsef Levi, Konstantin Makarychev, and Maxim Sviridenko. Online make-to-order joint replenishment model: primal dual competitive algorithms. In Proceedings of the Nineteenth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2008, San Francisco, California, USA, January 20-22, 2008, pages 952–961, 2008. URL: http://dl.acm.org/citation.cfm?id=1347082.1347186.
  • [19] Ryder Chen, Jahanvi Khatkar, and Seeun William Umboh. Online weighted cardinality joint replenishment problem with delay. In Mikolaj Bojanczyk, Emanuela Merelli, and David P. Woodruff, editors, 49th International Colloquium on Automata, Languages, and Programming, ICALP 2022, July 4-8, 2022, Paris, France, volume 229 of LIPIcs, pages 40:1–40:18. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2022. doi:10.4230/LIPIcs.ICALP.2022.40.
  • [20] Lindsey Deryckere and Seeun William Umboh. Online matching with set and concave delays. In Nicole Megow and Adam D. Smith, editors, Approximation, Randomization, and Combinatorial Optimization. Algorithms and Techniques, APPROX/RANDOM 2023, September 11-13, 2023, Atlanta, Georgia, USA, volume 275 of LIPIcs, pages 17:1–17:17. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2023. doi:10.4230/LIPICS.APPROX/RANDOM.2023.17.
  • [21] Daniel R. Dooly, Sally A. Goldman, and Stephen D. Scott. TCP dynamic acknowledgment delay: Theory and practice (extended abstract). In Proceedings of the Thirtieth Annual ACM Symposium on the Theory of Computing, Dallas, Texas, USA, May 23-26, 1998, pages 389–398, 1998. doi:10.1145/276698.276792.
  • [22] Yuval Emek, Yaacov Shapiro, and Yuyi Wang. Minimum cost perfect matching with delays for two sources. In Algorithms and Complexity - 10th International Conference, CIAC 2017, Athens, Greece, May 24-26, 2017, Proceedings, pages 209–221, 2017. doi:10.1007/978-3-319-57586-5_18.
  • [23] Michel X. Goemans and David P. Williamson. A general approximation technique for constrained forest problems. In Proceedings of the Third Annual ACM-SIAM Symposium on Discrete Algorithms, SODA ’92, pages 307–316, Philadelphia, PA, USA, 1992. Society for Industrial and Applied Mathematics. URL: http://dl.acm.org/citation.cfm?id=139404.139468.
  • [24] Anupam Gupta, Amit Kumar, and Debmalya Panigrahi. Caching with time windows. In Konstantin Makarychev, Yury Makarychev, Madhur Tulsiani, Gautam Kamath, and Julia Chuzhoy, editors, Proccedings of the 52nd Annual ACM SIGACT Symposium on Theory of Computing, STOC 2020, Chicago, IL, USA, June 22-26, 2020, pages 1125–1138. ACM, 2020. doi:10.1145/3357713.3384277.
  • [25] Anupam Gupta, Amit Kumar, and Debmalya Panigrahi. A hitting set relaxation for $k$-server and an extension to time-windows. In 62nd IEEE Annual Symposium on Foundations of Computer Science, FOCS 2021, Denver, CO, USA, February 7-10, 2022, pages 504–515. IEEE, 2021. doi:10.1109/FOCS52979.2021.00057.
  • [26] Anupam Gupta, Amit Kumar, and Debmalya Panigrahi. Caching with time windows and delays. SIAM J. Comput., 51(4):975–1017, 2022. doi:10.1137/20m1346286.
  • [27] Kun He, Sizhe Li, Enze Sun, Yuyi Wang, Roger Wattenhofer, and Weihao Zhu. Randomized algorithm for MPMD on two sources. In Jugal Garg, Max Klimm, and Yuqing Kong, editors, Web and Internet Economics - 19th International Conference, WINE 2023, Shanghai, China, December 4-8, 2023, Proceedings, volume 14413 of Lecture Notes in Computer Science, pages 348–365. Springer, 2023. doi:10.1007/978-3-031-48974-7_20.
  • [28] Sungjin Im, Benjamin Moseley, Chenyang Xu, and Ruilong Zhang. Online dynamic acknowledgement with learned predictions. CoRR, abs/2305.18227, 2023. doi:10.48550/arXiv.2305.18227.
  • [29] Anna R. Karlin, Claire Kenyon, and Dana Randall. Dynamic TCP acknowledgment and other stories about e/(e-1). Algorithmica, 36(3):209–224, 2003.
  • [30] Predrag Krnetic, Darya Melnyk, Yuyi Wang, and Roger Wattenhofer. The k-server problem with delays on the uniform metric space. In Yixin Cao, Siu-Wing Cheng, and Minming Li, editors, 31st International Symposium on Algorithms and Computation, ISAAC 2020, December 14-18, 2020, Hong Kong, China (Virtual Conference), volume 181 of LIPIcs, pages 61:1–61:13. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2020. doi:10.4230/LIPIcs.ISAAC.2020.61.
  • [31] Ngoc Mai Le, Seeun William Umboh, and Ningyuan Xie. The power of clairvoyance for multi-level aggregation and set cover with delay. In Nikhil Bansal and Viswanath Nagarajan, editors, Proceedings of the 2023 ACM-SIAM Symposium on Discrete Algorithms, SODA 2023, Florence, Italy, January 22-25, 2023, pages 1594–1610. SIAM, 2023. doi:10.1137/1.9781611977554.ch59.
  • [32] Mathieu Mari, Michal Pawlowski, Runtian Ren, and Piotr Sankowski. Online matching with delays and stochastic arrival times. In Noa Agmon, Bo An, Alessandro Ricci, and William Yeoh, editors, Proceedings of the 2023 International Conference on Autonomous Agents and Multiagent Systems, AAMAS 2023, London, United Kingdom, 29 May 2023 - 2 June 2023, pages 976–984. ACM, 2023. doi:10.5555/3545946.3598737.
  • [33] Noam Touitou. Nearly-tight lower bounds for set cover and network design with deadlines/delay. In Hee-Kap Ahn and Kunihiko Sadakane, editors, 32nd International Symposium on Algorithms and Computation, ISAAC 2021, December 6-8, 2021, Fukuoka, Japan, volume 212 of LIPIcs, pages 53:1–53:16. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2021. doi:10.4230/LIPIcs.ISAAC.2021.53.
  • [34] Noam Touitou. Frameworks for nonclairvoyant network design with deadlines or delay. In Kousha Etessami, Uriel Feige, and Gabriele Puppis, editors, 50th International Colloquium on Automata, Languages, and Programming, ICALP 2023, July 10-14, 2023, Paderborn, Germany, volume 261 of LIPIcs, pages 105:1–105:20. Schloss Dagstuhl – Leibniz-Zentrum für Informatik, 2023. doi:10.4230/LIPIcs.ICALP.2023.105.
  • [35] Noam Touitou. Improved and deterministic online service with deadlines or delay. In Barna Saha and Rocco A. Servedio, editors, Proceedings of the 55th Annual ACM Symposium on Theory of Computing, STOC 2023, Orlando, FL, USA, June 20-23, 2023, pages 761–774. ACM, 2023. doi:10.1145/3564246.3585107.

Appendix A Proof of Lemma 15

To bound the cost of primary services, we first identify and focus on two subsets of services in Λ1, namely, Λ1,s and Λ1,f.

Definition 23.

We define Λ1,s⊆Λ1 to be the subset of services in which the server did not move to a new location aλ′ (that is, Line 23 of Algorithm 1 did not run).

We define Λ1,f⊆Λ1∖Λ1,s to be the subset of services λ in which δ⁢(a∗⁢(tλ),aλ′)≥2ℓλ−7; that is, in λ the server moved to a new location that is of distance at least 2ℓλ−7 from the optimal solution.

Proposition 24.

∑λ∈Λ12ℓλ≤O⁢(1)⋅OPT+O⁢(1)⋅(∑λ∈Λ1,f2ℓλ+O⁢(1)⋅∑λ∈Λ1,s2ℓλ).

The proof of Proposition 24 is similar to that of Proposition A.11 in [35]. Intuitively, we again define a potential function proportional to the distance between the algorithm’s server and optimal solution’s server. For a service λ∈Λ1∖(Λ1,f∪Λ1,s), the final movement in Line 23 of Algorithm 1 shrinks the distance between the algorithm and the optimal solution such that the resulting decrease in potential is at least 2ℓλ.

Proof of Proposition 24.

Consider the potential function ϕ⁢(t):=27⋅δ⁢(a⁢(t),a∗⁢(t)). Note that ϕ⁢(t) only takes non-negative values, and is initially 0. The potential function can change upon a movement of the algorithm’s server (Line 23 of Algorithm 1) or the optimal solution’s server. Note that the total increase in ϕ due to movements in OPT is at most 27⋅OPT; also denote by Δλ the change to ϕ due to service λ∈Λ1 in the algorithm. (Note that in non-primary services, the final location of the server is the same as its initial location, and thus they do not affect the potential function.) Thus, denoting by ϕ⁢(∞) the final value of the potential function, it holds that

0≤ϕ⁢(∞)≤∑λ∈Λ1Δλ+27⋅OPT.

Adding ∑λ∈Λ12ℓλ to both sides yields

∑λ∈Λ12ℓλ≤∑λ∈Λ1(2ℓλ+Δλ)+27⋅OPT. (2)

First, consider a service λ∈Λ1∖(Λ1,f∪Λ1,s), and let t:=tλ. In λ, the server moves from aλ to aλ′, and it is guaranteed that a∗⁢(t)∈B⁢(aλ′,2ℓλ−7). Using Proposition 10, it holds δ⁢(aλ,aλ′)≥2ℓλ−5−2ℓλ−8; thus, δ⁢(aλ,a∗⁢(t))≥2ℓλ−5−2ℓλ−7−2ℓλ−8≥2ℓλ−6. However, after the movement of the algorithm’s server to aλ′, the distance between the algorithm’s server and the optimum’s server is at most 2ℓλ−7; thus, the distance between the servers decreased by at least 2ℓλ−7, and thus Δλ≤−2ℓλ. This implies that 2ℓλ+Δλ≤0 for every λ∈Λ1∖Λ1,f∪Λ1,s; plugging into Equation 2, we get

∑λ∈Λ12ℓλ≤27⋅OPT+∑λ∈Λ1,f∪Λ1,s(2ℓλ+Δλ). (3)

Again using Proposition 10, for services λ∈Λ1 where the server moves, it holds that δ⁢(aλ,aλ′)≤2ℓλ−4+2ℓλ−8≤2ℓλ−3, and thus Δλ≤⋅2ℓλ+4. (When the server does not move, Δλ=0.) Thus, it holds that for every λ∈Λ1, 2ℓλ+Δλ≤17⋅2ℓλ. Plugging into Equation 3 completes the proof. ◀

Definition 25.

For a service λ∈Λ1,f∪Λ1,s, define:

  • ■

    Rλ to be the set of pending requests of level at most ℓλ−4 on points in Vλ† at tλ.

  • ■

    The primary time interval Ip⁢(λ):=(minq∈Rλ⁡rq,tλ].

  • ■

    The primary cylinder γp⁢(λ):=(B⁢(aλ,2ℓλ−3),Ip⁢(λ)).

Further define Vλ∗⊆Vλ† be the set of locations in Vλ† not visited by the optimal solution during Ip⁢(λ). Finally, define the justified residual delay of λ, which is the amount Dp,λ∗:=∑v∈Vλ∗yℓλ−4⁢(v,tλ).

The proofs of the following three propositions appear in Appendix B.

Proposition 26.

∑λ∈Λ1,f∪Λ1,sDp,λ∗≤OPT

Proof of Proposition 26.

First a service λ∈Λ1,f∪Λ1,s, and define t:=tλ. We first note that the delay cost in Dp,λ∗ is indeed incurred by the optimal solution. Fix a location v∈Vλ∗; by definition, yℓλ−4⁢(v)=∑ℓ≤ℓλ−4(gv,ℓ⁢(t))+≤∑ℓ≤ℓλ−4∑q∈Rℓ′dq⁢(t), where Rℓ′⊆Rλ is the subset of requests on v of level exactly ℓ (this inequality is due to Proposition 9). But, from the definition of Ip⁢(λ), the requests of Rλ on v are not served in the optimal solution at t, and thus the optimal solution incurred ∑ℓ≤ℓλ−4∑q∈Rℓ′dq⁢(t) delay cost for those requests. Next, note that this delay cost is not charged to the optimal solution for more than one service; this is ensured by the zeroing of the delay counters in Line 17 of Algorithm 1. ◀

Proposition 27.

For every λ∈Λ1,f∪Λ1,s, it holds that 2ℓλ−8≤c⁢(OPT∩γp⁢(λ))+Dp,λ∗.

Proof of Proposition 27.

Consider a service λ∈Λ1,f∪Λ1,s, and define t:=tλ, B:=B⁢(aλ,2ℓλ−4), B′:=B⁢(aλ,2ℓλ−3). Note that B is the ball that contains all requests in Rλ, and that B′ is the shape used for the charging cylinder γp⁢(λ). Let a,a∗ denote the locations of the algorithm’s and optimal solution’s servers at t, respectively.

Case 1: 𝝀∈𝚲1,f.

Define a′:=aλ′. Define B⋆:=B⁢(a′,2ℓλ−8),B⋆⋆:=B⁢(a′,2ℓλ−7); note that B⋆⊆B⋆⋆. From the choice of a′, it holds that yℓλ−4⁢(B⋆)≥2ℓλ−5. However, a∗∉B⋆⋆, from the fact that λ∈Λ1,f. Thus, one of the following holds:

  • ■

    The optimal solution did not visit B⋆ during Ip⁢(λ). In this case, it holds that B⋆⊆Vλ∗, and thus Dp,λ∗≥yℓλ−4⁢(B⋆)≥2ℓλ−5, which completes the proof for this case.

  • ■

    The optimal solution visited B⋆ during Ip⁢(λ); in this case, the optimal server moved a distance of at least 2ℓλ−7−2ℓλ−8=2ℓλ−8 inside B⋆⋆∖B⋆ during Ip⁢(λ) (since it was in a∗ at the end of Ip⁢(λ)). Now, note that B⋆⋆⊆B′, as Proposition 10 states that δ⁢(a′,a)≤2ℓλ−4+2ℓλ−8; this yields c⁢(OPT∩γp⁢(λ))≥2ℓλ−7−2ℓλ−8≥2ℓλ−8, completing the proof.

Case 2: 𝝀∈𝚲1,s.

Denote B∗:=B⁢(a∗,2ℓλ−8). From the definition of Λ1,s, it holds that yℓλ−4⁢(B\B∗)≥2ℓλ−5. Suppose the optimal solution’s server does not visit B\B∗ during Ip⁢(λ); then, it holds that B\B∗⊆Vλ∗, and thus Dp,λ∗≥2ℓλ−5, completing the proof.

Otherwise, the optimal solution’s server visited B\B∗ during Ip⁢(λ). There are two subcases to consider:

  • ■

    Suppose δ⁢(a∗,a)≤2ℓλ−3−2ℓλ−8. In this case, B∗⊆B′. The optimal solution visited B\B∗ during Ip⁢(λ), but was at a∗ at t; thus, it moved a distance of at least 2ℓλ−8 inside B∗, and thus inside B′, during Ip⁢(λ). This implies that c⁢(OPT∩γp⁢(λ))≥2ℓλ−8, completing the proof.

  • ■

    Suppose δ⁢(a∗,a)>2ℓλ−3−2ℓλ−8, and thus the distance of a∗ from B is at least 2ℓλ−4−2ℓλ−8≥2ℓλ−8. Using a similar argument to the previous item, the optimal solution moved a distance of at least 2ℓλ−8 inside the ring B⁢(a,2ℓλ−4+2ℓλ−8)\B⁢(a,2ℓλ−4) during Ip⁢(λ). Observing that this ring is contained in B′ yields that c⁢(OPT∩γp⁢(λ))≥2ℓλ−8, completing the proof.

◀

Proposition 28.

For every ℓ, the set of cylinders {γp⁢(λ)|λ∈Λ1,f∪Λ1,s∧ℓλ=ℓ} is disjoint.

Proof of Proposition˜28.

Suppose for contradiction that there exist λ1,λ2∈Λ1,f∪Λ1,s where ℓλ1=ℓλ2=ℓ such that Ip⁢(λ1)∩Ip⁢(λ2)≠∅ and B⁢(aλ1,2ℓ−3)∩B⁢(aλ2,2ℓ−3)≠∅. Assume without loss of generality that tλ1≤tλ2, and thus tλ1∈Ip⁢(λ2). Then, observe that after λ1, all pending requests of level at most ℓ in B⁢(aλ1,2ℓ) are upgraded to level ℓ. However, in λ2, the requests in Rλ2 are of level at most ℓ−4; moreover, the requests in Rλ2 are in B⁢(aλ2,2ℓ−4)⊆B⁢(aλ1,2ℓ), where the containment is due to the fact that δ⁢(aλ1,aλ2)≤2ℓ−2 (otherwise, we contradict B⁢(aλ1,2ℓ−3)∩B⁢(aλ2,2ℓ−3)≠∅). This implies that all requests in Rλ2 arrived after tλ1, yielding a contradiction to tλ1∈Ip⁢(λ2). ◀

Proof of Lemma 15.

It holds that

∑λ∈Λ1,f2ℓλ+∑λ∈Λ1,s2ℓλ ≤∑λ∈Λ1,f∪Λ1,s28⋅(c⁢(OPT∩γp⁢(λ))+Dp,λ∗)
≤O⁢(log⁡k)⋅OPT+O⁢(1)⋅OPT=O⁢(log⁡k)⋅OPT

where the first inequality is due to Proposition 27, and the second inequality is due to Proposition˜28 and Proposition 20. ◀

Appendix B Omitted Proofs

Proof of Proposition 8.

First, suppose a service λ occurs, and consider the point immediately after the loop containing Line 17 of Algorithm 1. At that time, we have Yi≤∑v∈B⁢(aλ,2i)∑i′≤i(gv,i′)+=0 for every i≤ℓλ. Moreover, for i>ℓλ, it holds that Yi≤2i (otherwise, dome i would be critical, and λ would have a higher level as a result).

We now prove the proposition as an invariant over time, noting that at time 0 it trivially holds. Note that the invariant cannot be broken by continuous delay increase; indeed, when Yi exceeds 2i, a service is immediately started which zeroes Yi. Thus, the only possible event that could break the invariant is a movement by the server (Line 23 of Algorithm 1).

Suppose for contradiction that this happens after some (primary) service λ, at a time t+ immediately after λ, as the server moves from aλ to aλ′ As before, consider the time during λ immediately after the loop containing Line 17 of Algorithm 1, and denote it by t−. We also apply the superscripts −,+ to Yi and gv,i to refer to their values at times t−,t+ respectively.

Consider any class i. If i≤ℓλ−1, then note that δ⁢(aλ′,aλ)≤2ℓλ−4+2ℓλ−8<2ℓλ−1, due to Proposition 10. Thus, B⁢(aλ′,2i)⊆B⁢(aλ,2ℓλ). But, for every v∈B⁢(aλ,2ℓλ) and i′≤ℓλ, it holds that gv,i′+=gv,i′−≤0, and thus Yi+=0. Otherwise, i≥ℓλ; in this case, note that B⁢(aλ′,2i)⊆B⁢(aλ,2i+1). Thus:

Yi+ ≤∑i′≤iYi′+
=∑i′≤i∑v∈B⁢(aλ′,2i)(gv,i′)+
≤∑i′≤i∑v∈B⁢(aλ,2i+1)(gv,i′)+
≤∑i′≤i+1∑v∈B⁢(aλ,2i+1)(gv,i′)+
=∑i′≤i+1Yi′−≤∑i′≤i+12i′≤2i+2,

where the first inequality stems from {Yi′} being non-negative and the two equalities use the definition of Yi. The penultimate inequality uses the fact that Yi′−≤2i′ for every i′, as noted in the beginning of the proof. ◀

Proof of Proposition 22.

Fixing any ℓ, assume otherwise that there exist two cylinders γc⁢(λ1),γc⁢(λ2)∈{γc⁢(λ)|λ∈Λc∧ℓλ=ℓ} that are not disjoint. That is, it holds that δ⁢(aλ1,aλ2)<6⋅2ℓ, and also Ic⁢(λ1)∩Ic⁢(λ2)≠∅. Let λ1′,λ2′ be the level-(ℓ+4) secondary services that certify λ1,λ2, respectively; without loss of generality, assume λ1′ occurs before λ2′.

First, we claim that δ⁢(aλ1,aλ1′)≤1.5⋅2ℓ. To prove this, consider q1:=σλ1′; it must be that q1∈B⁢(aλ1,2ℓλ1)∩B⁢(aλ1′,2ℓλ1′−5). Since ℓλ1=ℓ and ℓλ1′=ℓ+4, the claim holds.

Next, we claim that λ1′ occurs before λ2. Assume otherwise, and consider the request q2:=σλ2′. Since λ2′ certifies λ2; moreover, it holds that q∈B⁢(aλ2,2ℓλ2). Thus,

δ⁢(q2,aλ1′) ≤δ⁢(q2,aλ2)+δ⁢(aλ2,aλ1)+δ⁢(aλ1,aλ1′)
≤2ℓ+6⋅2ℓ+1.5⋅2ℓ≤8.5⋅2ℓ≤2ℓλ1′.

Thus, q2∈Vλ1′; moreover, as q was pending at both tλ2 and tλ2′, it is pending at tλ1′. Due to Line 9 of Algorithm 2, after λ1′, q2 is either served or of level ℓλ1′=ℓ+4. But this is a contradiction to having level ℓλ2′−4=ℓ later on, at tλ2′; thus, λ1′ must occur before λ1.

Thus, λ1′ occurs between λ1 and λ2. Note that λ1′ occurs after all the tertiary services assigned to λ1, and thus λ1′ occurs after Ic⁢(λ1). We claim that λ1′ also occurs before the release of every request in Eλ2, and thus before Ic⁢(λ2). This claim would yield that Ic⁢(λ1),Ic⁢(λ2) are disjoint, contradicting the assumption that γc⁢(λ1),γc⁢(λ2) are disjoint, and would thus conclude the proof of the proposition.

To prove the claim, suppose a request q∈Eλ2 on some v∈Vλ2 is released before tλ1′. Then, note that δ⁢(aλ2,aλ1′)≤δ⁢(aλ2,aλ1)+δ⁢(aλ1,aλ1′)≤6⋅2ℓ+1.5⋅2ℓ=7.5⋅2ℓ. Thus, B⁢(aλ2,2ℓλ2)⊆B⁢(aλ1′,2ℓλ1′), and thus v∈Vλ1′. As q is pending at tλ1′, it is of level at least ℓλ1′=ℓ+4 after λ1′; this is in contradiction to ℓq≤ℓ at λ2, completing the proof. ◀