Nearly-Optimal Algorithm for Non-Clairvoyant Service with Delay
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 is the size of the metric space and is the number of requests, there are lower bounds of and 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 -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 and .
Keywords and phrases:
Online, Delay, Deadlines, -server, Non-clairvoyant2012 ACM Subject Classification:
Theory of computation K-server algorithms ; Theory of computation Online algorithmsEditors:
Olaf Beyersdorff, Michał Pilipczuk, Elaine Pimentel, and Nguyễn Kim ThắngSeries and Publisher:

1 Introduction
In online service with delay, or OSD, a server exists on a metric space of 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 ; specifically, -competitiveness. This was later improved to -competitiveness [6], and then to -competitiveness [35], where 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 and 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 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 -competitive.
In particular, note that ; thus, Theorem 1 also yields an competitiveness bound. Recalling the 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 -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 and 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 -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 servers (rather than a single server). Azar et al. [4] presented a -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 is linear. Subsequently, for the special case of a metric space that is a weighted star, Gupta et al. [26] presented an -competitive randomized algorithm. For a general metric space, Gupta et al. [25] presented a -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 , but then gathers delay cost that triggers another service at time , then the requests that were served by would have gathered large delay during 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- ball, for some level . However, unlike in [35], inside an inner ball of radius , 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 of points is given; we denote by the distance between two points . Requests are released over time in an online manner, where every request is associated with a point . At any point in time, the algorithm can move the server from its current location to a new location , paying a cost of . Then, every request pending where becomes served. We denote by the release time of request . Every request also has some continuous, non-decreasing delay function , which maps from a time to the delay cost incurred by if pending until time 111The 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 tends to infinity as time advances. Without loss of generality, we also assume that (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 and time , we define . We also define 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 the time in which the service occurs. We define to be the locations of the algorithm’s server and the optimum’s server at time , respectively. Throughout the paper, when we refer to the value of some variable at for some service , we refer to the value immediately before the service. For example, is the location of the server immediately before . As a shorthand, we also define .
We define to be the closed ball centered at of radius (i.e., the set of points of distance at most from ). We also sometimes equate the points of the metric space with the nodes of a clique graph, where the edge connecting nodes has weight . 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, .
3 Online Service with Delay
This section introduces an algorithm for non-clairvoyant online service with delay, proving Theorem 1. First, we define to be the number of locations on which requests are released in the input. Note that ; we thus focus on proving -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 , and assuming that the graph is known from context, we use 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 ; here, we use 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 . 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 to refer to the optimal solution to the input . 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 for prize-collecting Steiner tree such that, fixing any input , it holds that
where are the buying and penalty costs of , 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.
Levels and pointers.
The algorithm maintains for every pending request a level , 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 a pointer to the last service that increased the level of . (A fine point, as seen in the algorithm, is that a service may also appear in the pointer only for “attempting” to increase .) Finally, overloading notation, each service also has a pointer that points to a prior service; this pointer is equal to the pointer for some request considered by .
Residual delay counters and domes.
The algorithm maintains a residual delay counter for every location and level ; for time , we define to be the value of at time . This counter grows with the delay cost incurred by level- requests on . 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 , and for every level , the algorithm considers positive residual delay counters of levels at most inside . Specifically, it considers the total unhandled residual delay of requests of level at most inside the ring , plus unhandled residual delay of requests of level exactly inside the internal ball . 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 , level , and , define
For time and level , define ; where is known from context, we also write . If , 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.
Algorithm’s Description.
Whenever dome becomes critical, we start a service of level . (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 . If not, the service is called primary. Otherwise, consider a location of the inner ball that contributes positive residual delay to the dome; it must be that , which implies (through Proposition 9) that there exists a level- pending request on . 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 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 inside on which there are pending requests. To each location in , the algorithm assigns a budget of to visiting each such location; the locations , 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 ). PCSolve outputs a tree connecting some locations to ; this tree is then traversed by the server in a DFS fashion, visiting and ending at . For the remaining locations , where PCSolve pays the penalty, the algorithm decreases the delay counters for those locations by . 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 . Recall that starts upon dome becoming critical; if the majority of the residual delay making dome critical occurs inside a small-radius ball (specifically, radius ), then the center of this ball becomes the new location , 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.
3.2 Definitions and Properties
Definition 6.
We define the following.
-
1.
Let denote the set of services in the algorithm. We partition into , the sets of primary, secondary, and tertiary services, respectively.
-
2.
For two services where occurs after , if we say that is assigned to . Note that in this case , .
-
3.
Let be a service. If there exists a secondary service which is assigned to , then we call a certified service, and say that certified . We denote the set of certified services by .
Proposition 7.
For a certified service , we have the following:
-
1.
The service is certified by exactly one service .
-
2.
It holds that .
-
3.
It holds that .
Proof.
First, observing Line 9 of Algorithm 2, we note that if for request we have , then it must be the case that at that time. Note that is only certified by some if , and thus at ; but, at , proving the second item. Moreover, note that , and thus . In addition, since , we have . The triangle inequality thus implies , proving the third item.
We now prove the first item, i.e., the uniqueness of . Suppose, for contradiction, that a certified service is certified by two services , and assume without loss of generality that occurs before . We prove that after , there remains no pending request with , and thus cannot certify later on. Indeed, consider such a request immediately before ; it holds that , and it must also be the case that at that time. But, we’ve shown that , and thus . Thus, , and will either be served by or have be set to , in contradiction to having at .
Proposition 8.
For every level it holds that at every point in time.
The proof of Proposition 8 is in Appendix B.
Proposition 9.
For every point , level and time , it holds that , where is the set of pending requests of level exactly on at time . (In particular, when , it holds that .)
Proof.
We prove this by induction as time advances, noting that the proposition holds at time (before any requests are released). Note that grows at the same rate as the delay of pending requests of level on , 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 . Note that in such services, Line 17 of Algorithm 1 ensures that is non-positive after the service, maintaining the invariant.
Proposition 10.
During a service , if the algorithm moves its server from to in Line 23 of Algorithm 1, then .
Proof.
Note that the server only moves to when is primary. In this case, it holds that . But, due to Proposition 9, this implies that for every ; thus, for such we have , and thus is contained in the ring . But, from the definition of , must contain a point from , which completes the proof.
For a service , define the cost of the service, denoted , to be the total movement of the server during plus the total amount by which the service decreases counters .
Proposition 11.
.
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 for every and level , which completes the proof.
The following observation results from the fact that every counter is counted in exactly one dome (and can also easily be seen in Figure 1).
Observation 12.
At any time , and for every level , it holds that
Lemma 13.
.
Proof.
Applying Proposition 11, it is enough to bound . We first bound the cost of tertiary services . Consider a tertiary service ; it incurs the following costs:
-
1.
It zeroes any positive counters for every and . The cost of this is at most
where the equality is due to Observation 12, and the inequality is due to Proposition 8 and summing a geometric sequence.
-
2.
It moves the server from to and back (Line 19 of Algorithm 1). Since , the cost of this is at most .
Overall, the cost of a tertiary service is .
Now, consider a non-tertiary service ; there are at most tertiary services assigned to , as each such service raises by and does not exceed ; note that . Moreover, for a tertiary service assigned to we have . Overall, we have that the cost of tertiary services is .
Next, we bound the cost of non-tertiary services. The cost of a service consists of the following terms:
-
1.
It zeroes positive counters for every and . This cost can be bounded by , using the same argument as for tertiary services.
-
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 ; the cost of decreasing counters is . Overall, the cost of this item is at most , which is at most . Using the fact that , the cost of this item is at most .
-
3.
In Line 23 of Algorithm 1, the server might move to a new location . However, due to Proposition 10. Thus, the cost of this movement is also .
Overall, it holds that ; combining this with the bound for tertiary services, we get
(1) |
Finally, we bound , which completes the proof. Consider a secondary service , which certifies some prior service . Through Proposition 7, it holds that , and thus . Again through Proposition 7, it holds that is only certified once (by ); thus, summing over secondary services yields
which combined with Equation 1 completes the proof.
3.3 Charging Cylinders
It remains to bound the terms and . 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. ) 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 can be partitioned into parts whose weights sum up to .)
A charging ball centered at of radius – which, overloading notation, we denote – is a charging shape such that:
-
If both are in then contains the entire edge .
-
If but , then contains the part of connected to of weight .
A charging cylinder is a pair where is a time interval and 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 it holds that the charging shapes of the cylinders whose time intervals contain are disjoint.
Intersections.
For a set of edges and charging shape , we define to be the total weight of edges in that appear in . For a cylinder , we define (called the intersection of OPT with ) to be the total weight of edges in that appear in , where is the set of edges traversed by OPT at least once during .
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 points. One can replace every such charging ball of radius with a perforated charging ball, from which balls of small radius are removed around each of the points; let be the set of cylinders after this perforation process. In , two cylinders whose shapes are (perforated) charging balls with radii where 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 disjoint classes. This bounds the intersection of with OPT by at most . 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 is a ball. Partition into where for every it holds that . If for every the set of cylinders is disjoint, then for every constant it holds that
where is the number of centers used by cylinders in .
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 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 is shown in red. Note that as the shown cylinders are disjoint, the sum of 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.
Through constructing and analyzing such cylinders, we prove the following lemmas.
Lemma 15.
It holds that .
Lemma 16.
It holds that .
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 remainder of this section proves Lemma 16. For every service , we denote by the set of tertiary services assigned to . We also define ; note that . Finally, we define .
First, we study the size of the set .
Proposition 17.
For every , it holds that .
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 ; otherwise, it would be secondary. Thus, the final value of the counter is at most . However, we know that a secondary service is assigned to , as . Thus, the final value of is exactly , completing the proof.
Definition 18.
For a service , define:
-
to be the set of pending requests of level at most on points in at .
-
The certified time interval .
-
The certified cylinder .
We also define the justified residual delay of , which is the amount , where is the subset of locations which were not visited by the optimal solution during .
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 be a set of locations that are contained in , for some location and radius , and let be any subgraph connecting . Then it holds that .
Proposition 20.
It holds that .
Proof.
We observe charging triplets of the form , where is a location, is a level, and is a time interval. Every certified service owns triplets. Specifically, for every service , location , and the tertiary service assigned to where , we say that owns the triplet , where be the time interval between and the service . We now claim the following:
-
1.
If owns triplet , then a delay of at least is incurred by requests of level on during . Moreover, these requests are pending in the optimal solution during the interval .
-
2.
No two triplets intersect. That is, there are no two services such that owns , owns and .
The first claim implies that the optimal solution incurs a delay cost of per service , and the second claim implies that no delay cost is charged twice. Together, these two claims complete the proof.
Claim 1.
Fix service , location , and tertiary service assigned to where ; let , and set . As , it holds immediately after that (due to Line 17 of Algorithm 1 and Line 10 of Algorithm 2). However, at , it holds that ; moreover, it holds that , and thus . Thus, the counter has increased by at least during the time interval .
Next, we claim that inside , there was no non-tertiary service of level at least such that . Assume otherwise, and note that is pending on , and is of level exactly ; thus, after , it would either be served or have be set to , in contradiction to being assigned to .
As a result, we claim that every request on of level during belongs to . First, note that immediately after , all pending level- requests on are in . 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 , but there is no such service due to the previous claim.
Finally, note that the requests of are pending in the optimal solution during , as the optimal server did not visit during ; thus, the optimal solution incurs the same delay cost of at least .
Claim 2.
Assume that two triplets , that are owned by services , are such that ; note that . Assume without loss of generality that is the earlier service; then, . Note that ; however, this cannot be, at no non-tertiary service of level at least can occur during such that , as seen in the proof of the first claim.
Proposition 21.
For every , it holds that .
Proof.
Consider the set of locations , which is a subset of . 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
Noting that , we have . Applying Proposition 19, denoting by the subgraph traversed by OPT during , it holds that . Combining the above, we get:
where the final inequality is due to the fact that , due to Proposition 17.
Proposition 22.
For every , the set of cylinders is disjoint.
The proof of Proposition 22 appears in Appendix B.
Proof of Lemma 16.
It holds that
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 -competitive algorithm for non-clairvoyant online service with delay, that is deterministic and runs in polynomial time. This nearly matches the lower bounds of and 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 -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 , namely, and .
Definition 23.
We define to be the subset of services in which the server did not move to a new location (that is, Line 23 of Algorithm 1 did not run).
We define to be the subset of services in which ; that is, in the server moved to a new location that is of distance at least from the optimal solution.
Proposition 24.
.
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 , 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 .
Proof of Proposition 24.
Consider the potential function . Note that only takes non-negative values, and is initially . 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 ; also denote by the change to due to service 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
Adding to both sides yields
(2) |
First, consider a service , and let . In , the server moves from to , and it is guaranteed that . Using Proposition 10, it holds ; thus, . However, after the movement of the algorithm’s server to , the distance between the algorithm’s server and the optimum’s server is at most ; thus, the distance between the servers decreased by at least , and thus . This implies that for every ; plugging into Equation 2, we get
(3) |
Again using Proposition 10, for services where the server moves, it holds that , and thus . (When the server does not move, .) Thus, it holds that for every , . Plugging into Equation 3 completes the proof.
Definition 25.
For a service , define:
-
to be the set of pending requests of level at most on points in at .
-
The primary time interval .
-
The primary cylinder .
Further define be the set of locations in not visited by the optimal solution during . Finally, define the justified residual delay of , which is the amount .
The proofs of the following three propositions appear in Appendix B.
Proposition 26.
Proof of Proposition 26.
First a service , and define . We first note that the delay cost in is indeed incurred by the optimal solution. Fix a location ; by definition, , where is the subset of requests on of level exactly (this inequality is due to Proposition 9). But, from the definition of , the requests of on are not served in the optimal solution at , and thus the optimal solution incurred 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 , it holds that .
Proof of Proposition 27.
Consider a service , and define , , . Note that is the ball that contains all requests in , and that is the shape used for the charging cylinder . Let denote the locations of the algorithm’s and optimal solution’s servers at , respectively.
Case 1: .
Define . Define ; note that . From the choice of , it holds that . However, , from the fact that . Thus, one of the following holds:
-
The optimal solution did not visit during . In this case, it holds that , and thus , which completes the proof for this case.
-
The optimal solution visited during ; in this case, the optimal server moved a distance of at least inside during (since it was in at the end of ). Now, note that , as Proposition 10 states that ; this yields , completing the proof.
Case 2: .
Denote . From the definition of , it holds that . Suppose the optimal solution’s server does not visit during ; then, it holds that , and thus , completing the proof.
Otherwise, the optimal solution’s server visited during . There are two subcases to consider:
-
Suppose . In this case, . The optimal solution visited during , but was at at ; thus, it moved a distance of at least inside , and thus inside , during . This implies that , completing the proof.
-
Suppose , and thus the distance of from is at least . Using a similar argument to the previous item, the optimal solution moved a distance of at least inside the ring during . Observing that this ring is contained in yields that , completing the proof.
Proposition 28.
For every , the set of cylinders is disjoint.
Proof of Proposition˜28.
Suppose for contradiction that there exist where such that and . Assume without loss of generality that , and thus . Then, observe that after , all pending requests of level at most in are upgraded to level . However, in , the requests in are of level at most ; moreover, the requests in are in , where the containment is due to the fact that (otherwise, we contradict ). This implies that all requests in arrived after , yielding a contradiction to .
Proof of Lemma 15.
It holds that
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 for every . Moreover, for , it holds that (otherwise, dome 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 it trivially holds. Note that the invariant cannot be broken by continuous delay increase; indeed, when exceeds , a service is immediately started which zeroes . 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 immediately after , as the server moves from to As before, consider the time during immediately after the loop containing Line 17 of Algorithm 1, and denote it by . We also apply the superscripts to and to refer to their values at times respectively.
Consider any class . If , then note that , due to Proposition 10. Thus, . But, for every and , it holds that , and thus . Otherwise, ; in this case, note that . Thus:
where the first inequality stems from being non-negative and the two equalities use the definition of . The penultimate inequality uses the fact that for every , as noted in the beginning of the proof.
Proof of Proposition 22.
Fixing any , assume otherwise that there exist two cylinders that are not disjoint. That is, it holds that , and also . Let be the level- secondary services that certify , respectively; without loss of generality, assume occurs before .
First, we claim that . To prove this, consider ; it must be that . Since and , the claim holds.
Next, we claim that occurs before . Assume otherwise, and consider the request . Since certifies ; moreover, it holds that . Thus,
Thus, ; moreover, as was pending at both and , it is pending at . Due to Line 9 of Algorithm 2, after , is either served or of level . But this is a contradiction to having level later on, at ; thus, must occur before .
Thus, occurs between and . Note that occurs after all the tertiary services assigned to , and thus occurs after . We claim that also occurs before the release of every request in , and thus before . This claim would yield that are disjoint, contradicting the assumption that are disjoint, and would thus conclude the proof of the proposition.
To prove the claim, suppose a request on some is released before . Then, note that . Thus, , and thus . As is pending at , it is of level at least after ; this is in contradiction to at , completing the proof.