Abstract 1 Introduction 2 The 𝒆(𝑫+𝟏)-competitive Algorithm 3 The (𝟒𝑯+𝟐)𝒆-competitive Algorithm 4 Conclusion References

Improved and Parameterized Algorithms for Online Multi-Level Aggregation

Young-San Lin ORCID Melbourne Business School, University of Melbourne, Australia    Alex Turoczy ORCID Department of Computer Science, University of Oxford, UK
Abstract

We study the online multi-level aggregation problem with deadlines (MLAP-D) introduced by Bienkowski, Böhm, Byrka, Chrobak, Dürr, Folwarczný, Jeż, Sgall, Thang, and Veselý (ESA 2016, OR 2020). In this problem, requests arrive over time at the vertices of a given vertex-weighted tree, and each request has a deadline that it must be served by. The cost of serving a request equals the cost of a path from the root to the vertex where the request resides. Instead of serving each request individually, requests can be aggregated and served by transmitting a subtree from the root that spans the vertices on which the requests reside, to potentially be more cost-effective. The aggregated cost is the weight of the transmission subtree. The goal of MLAP-D is to find an aggregation solution that minimizes the total cost while serving all requests. MLAP-D generalizes some well-studied problems including the TCP acknowledgment problem and the joint replenishment problem, and arises in natural scenarios such as multi-casting, sensor networks, and supply chain management.

We present improved and parameterized algorithms for MLAP-D. Our result is twofold. First, we present an e(D+1)-competitive algorithm where D is the depth of the tree. Second, we present an e(4H+2)-competitive algorithm where H is the caterpillar dimension of the tree. Here, HD and Hlog2|V| where |V| is the number of vertices in the given tree. The caterpillar dimension remains constant for rich but simple classes of trees, such as line graphs (H=1), caterpillar graphs (H=2), and lobster graphs (H=3). To the best of our knowledge, this is the first online algorithm parameterized on a measure better than depth. The state-of-the-art online algorithms are 6(D+1)-competitive by Buchbinder, Feldman, Naor, and Talmon (SODA 2017) and O(log|V|)-competitive by Azar and Touitou (FOCS 2020). Our framework outperforms the state-of-the-art ratios when H=o(min{D,log2|V|}). Our memory-based algorithms extend transmission subtrees with a cost comparable to transmission subtrees used to serve previous requests. Our simple framework directly applies to trees with any structure and differs from the previous frameworks that reduce the problem to trees with specific structures.

Keywords and phrases:
Online Algorithms, Approximation Algorithms, Graph Problems
Copyright and License:
[Uncaptioned image] © Young-San Lin and Alex Turoczy; licensed under Creative Commons License CC-BY 4.0
2012 ACM Subject Classification:
Theory of computation Online algorithms
Related Version:
Full Version: https://arxiv.org/abs/2511.23211
Editor:
Pierre Fraigniaud

1 Introduction

Aggregation optimization problems have a wide range of applications including supply chain management [2, 18, 22, 31], communication networks [19, 20], and multicasting [5, 13]. The common scenario of these applications is that individually resolving each request can be costly over time. Requests can be aggregated and served as batches under some aggregation constraints to lower service costs.

This work investigates the online multi-level aggregation problem with deadlines (MLAP-D) introduced in [7],111See also [8] for the journal version. which captures two characteristics of aggregation optimization problems. First, the service network is hierarchical and has a rooted tree structure. Second, the requests arrive in an online and dynamic fashion, and the decision-making is irrevocable in serving the requests.

1.1 Online Multi-level Aggregation with Deadlines

In MLAP-D, we are given an undirected tree 𝒯=(V,E) rooted at rV. Each vertex vV is associated with a cost defined by c:V0. The tree 𝒯 and the vertex costs are given offline, in advance. A request ρ is associated with a vertex vρV(𝒯) and a time interval [aρ,dρ]. Here, vρ is the location of the request, and aρ,dρ0 are the arrival time and the deadline of the request ρ, respectively. The time starts at zero, and the continuous time model is used. At time aρ, request ρ arrives and the information of ρ (vρ and dρ) is revealed. The requests appear in an online fashion, so at time t, any information about requests ρ with aρ>t is not revealed. The output of an algorithm for MLAP-D is a collection T1,,T of subtrees of 𝒯 rooted at r at different times t1,t2,t where t1<t2<<t. A request ρ is served if during the time interval [aρ,dρ], a rooted subtree Ti contains vρ. It is possible that more than one request is served at the same vertex and the same time. Every request ρ must be served before the deadline dρ. It is noteworthy that we need not serve requests one at a time, as requests with overlapping time intervals can be served simultaneously as a batch, which can be more cost-effective. Let 𝒮={(Ti,ti)}i=1 denote a solution for MLAP-D. The cost of 𝒮 is the total cost of the subtrees at different times. More specifically, let

c(𝒮)=i=1c(Ti) be the cost of 𝒮 where c(Ti)=vV(Ti)c(v) is the cost of Ti.

Without loss of generality we assume that the arrival times and deadlines of all requests are distinct, as any instance can be converted to an instance of this form via an infinitesimal perturbation.

We note following [15] that the vertex-weighted formulation captures the edge-weighted problem as follows. First, we can assume that in the edge-weighted instance, r only has one adjacent vertex. If r has multiple adjacent vertices, we can separate the problem into multiple instances in which r has one adjacent vertex. Combining the solution of these separated instances gives a solution of the original instance without any extra cost. Next, we can move the cost of any edge into the endpoint vertex further away from r and finally remove r and set the vertex adjacent to r as the new root.

Given a problem instance , and a deterministic online algorithm ALG, we use alg() to denote the cost of the solution to outputted by ALG. Using the classic online algorithm framework, we compare this cost to that of the offline optimal solution OPT on this instance, which we denote opt(). An algorithm is k-competitive if alg()kopt() for all problem instances . For a fixed problem instance, we will simply use alg and opt to denote the costs.

MLAP-D was presented as a unification of several aggregation problems on trees [7]. We defer the discussions about these special case problems in Section 1.4. The first non-trivial online algorithm for MLAP-D was D22D-competitive [7], which was later improved to the state-of-the-art 6(D+1)-competitive algorithm [15]. Here, D is the depth of the tree. There is a paper claiming a D-competitive algorithm [26] which we cannot confirm the correctness of. When D=2, the competitive ratio is 2 [10, 11], which remains the highest known lower bound on the competitive ratio of MLAP-D for trees of fixed depth. The problem is NP-hard [2] and APX-hard [10, 27]. Closing the competitive ratio gap between 2 and O(D) has been an intriguing open problem.

1.2 Our Contributions

In this work, we present improved competitiveness for MLAP-D. Our result is twofold. First, we present an improved O(D)-competitive algorithm. Second, we present an O(H)-competitive algorithm where H is the caterpillar dimension of the tree. Our competitive algorithms are based on a generic memory-based framework which judiciously constructs an online solution according to historical information.

1.2.1 Our 𝑶(𝑫)-competitive algorithm

In Section 2, we show the following theorem by our memory-based framework.

Theorem 1.

There exists a (1+1D)D(D+1)e(D+1)-competitive algorithm for MLAP-D.

We emphasize that our algorithm can be directly applied to any tree structure. This makes the analysis direct, and differs from some previous work that relies on reductions to trees with specific structures, such as L-decreasing trees [9, 15].

1.2.2 𝑶(𝑯)-competitiveness

To potentially improve the competitive ratio for MLAP-D, we consider a preferable measure over depth, namely, the caterpillar dimension introduced in [25]. The notion of heavy path decomposition was introduced in [30]. A heavy path decomposition of 𝒯 is a vertex-disjoint partition 𝒫 such that (1) each element in 𝒫 is a set of vertices that contains exactly one leaf vertex and forms a path in 𝒯 and (2) any two vertices in an element in 𝒫 must have an ancestor-descendant relationship. Recall that r is the root vertex of 𝒯. Consider a leaf vertex u and the r-u path. Let d(𝒫,u) denote the number of elements in 𝒫 intersecting the r-u path. The dimension of the decomposition 𝒫 is dim(𝒫):=maxuL(𝒯){d(𝒫,u)} where L(𝒯) denotes the set of leaf vertices in 𝒯. The caterpillar dimension H of 𝒯 is the minimum dimension among all heavy path decompositions. See Figure 1 for an example.

Figure 1: 𝒯 consists of the solid and dashed edges. Components connected by the solid edges define the elements of 𝒫. The heavy path decomposition 𝒫 of 𝒯 has six elements: {vd,vh}, {r,va,ve,vi}, {vj}, {vf}, {vb,vg}, and {vc}. When the leaf vertex u=vh,vj,vf,vg, or vc, the r-u path intersects two elements in 𝒫 which maximizes d(𝒫,u), so the dimension of 𝒫 is two. A decomposition with a lower dimension does not exist, so the caterpillar dimension of 𝒯 is two.

The caterpillar dimension remains constant for certain classes of trees, such as line graphs (H=1), caterpillar graphs (H=2), and lobster graphs (H=3). The caterpillar dimension is at most D and log2|V|, and can be computed in polynomial time, as well as the corresponding heavy path decomposition [25].

In Section 3, we show the following theorem using our memory-based framework.

Theorem 2.

There exists a (4H+2)(1+12H+1)H+1(1+12H)He(4H+2)-competitive algorithm for MLAP-D.

To the best of our knowledge, this is the first online algorithm parameterized on a measure better than depth. Interestingly, our framework outperforms the state-of-the-art ratios of O(D) [16] and O(log|V|) [4] if H=o(min{D,log2|V|}). For infinite line graphs (H=1), the best competitive ratio is known to be exactly 4 [7].

1.3 High-level Technical Overview

1.3.1 The 𝒆(𝑫+𝟏)-competitive algorithm

In both the offline and online settings, the fundamental question when designing an algorithm for MLAP-D is to decide how many extra requests to aggregate into the service subtree, beyond the bare minimum required for a feasible solution. The biggest challenge one faces when developing a competitive algorithm is finding a way to lower-bound the performance of the optimum solution for a given instance. Most online algorithms for MLAP-D [9, 15] have been memoryless, in the sense that the algorithm’s decision making is only a function of the current unserved requests and locations, and the relative order of their deadlines. This discards information which can potentially be used to justify further aggregation of the service subtree at a given time ti. Our main algorithmic contribution is to incorporate memory naturally to inform the algorithm’s decision-making process. From a mathematical standpoint, memory is used in the amortized analysis to ensure that we can attribute the cost of our algorithm alg to the cost of the optimal solution opt without double-counting, which is crucial for establishing a competitive ratio.

Leaving out some technical details, we describe the motivations behind our algorithms as follows. When an active request ρ reaches its deadline at time ti, we are forced to transmit a service subtree which contains vρ, and so our algorithm begins by initializing the service subtree as the path r-vρ. Each v in the r-vρ path adds a cost of c(v) to the algorithm’s solution, and therefore we want to delay making another service which includes v until we are sure that opt itself must have outputted services with costs comparable to c(v). Therefore, it is natural that each node receives a budget proportional to c(v) which is allocated towards adding extra services to the service subtree, and we call the nodes that the budget is spent on investments. The investment procedure is handled by a recursive function, where deeper nodes are the first to make their investments. The difficulty with this approach is that at different times, several different vertices may invest in the same node, which could lead to over-counting the costs associated with opt.

We use memory to tackle this issue. Before vertices on the path from r-vρ start spending their investment budget, they may also add their previous investments to the service subtree and recursively expand the transmission subtree, in a stage of the algorithm we call the expansion stage. This prevents nodes from reinvesting onto previous investments. The expansion stage is handled by a separate recursive process which occurs before the investment stage. It is then for these expansion vertices that we make investments. We decide whether to add those previous investments as follows. After a vertex has made its investment, we set a timer in memory to record when all of the investments we have made are anticipated to reach their deadline. If a vertex v at time ti is an expansion vertex again after the timer has elapsed, then we can make inferences about comparable costs opt must have experienced based on our investments. In this case, we call v an anticipated vertex at time ti. Otherwise, we can infer that there must have been a request that had appeared deeper than v and expired before our timer elapsed, which we can also associate with a cost by opt. We call such vertices unanticipated at time ti.

We briefly provide a broad overview of the analysis. In Section 2.1, we express alg in terms of only the unanticipated expansion nodes. We use the standard amortized analysis techniques, in particular, an accounting argument to redistribute the costs in a top-down fashion based on proof by induction. Then in Section 2.2, we show that the unanticipated expansion nodes serve as a way to lower bound opt. This requires using a charging scheme that defines a one-to-one mapping between the cost accounted for the unanticipated expansion vertices and opt. As a consequence of these two results, we can bound the competitive ratio of the algorithm. When we first define the algorithm, we leave a parameter which controls the extent of aggregation unspecified. Selecting the optimal parameter results in an e(D+1)-competitive algorithm for MLAP-D.

1.3.2 The 𝒆(𝟒𝑯+𝟐)-competitive algorithm

Our e(4H+2)-competitive algorithm utilizes the framework developed by the e(D+1)-competitive algorithm. The main difference is the use of the heavy path decomposition structure while assigning memory-based investment budgets to vertices. Instead of assigning the budget for every vertex v to be proportional to its cost c(v), we allow one vertex per path in 𝒫 to have a potentially much larger budget.

Following the same strategy as before, to prove the competitiveness of our algorithm, we show that (1) the cost alg is comparable with the cost of the unanticipated expansion vertices and (2) we can relate the costs of unanticipated expansion vertices to opt directly via a charging scheme. The charging scheme is identical to our O(D)-competitive algorithm. The main change to the analysis is to judiciously modify the redistribution accounting argument for the cost based on a proof by induction to show (1). Ultimately, by selecting the optimal parameters for the two different investment budgets, we obtain an e(4H+2)-competitive algorithm for MLAP-D.

1.4 Related Work

1.4.1 Online multi-level aggregation with waiting cost

The most related variant of MLAP-D is the setting that each request has a waiting cost instead of a strict deadline. The objective is to minimize the sum of the total service and waiting costs. This problem is termed the online multi-level aggregation problem (MLAP). For general MLAP, an algorithm with competitive ratio D42D was presented in [7] and later improved to O(D2) [3]. When D=1, MLAP is also called the TCP acknowledgment problem (TCP-AP). The optimal competitive ratio for TCP-AP is 2 for deterministic algorithms [19] and e/(e1)1.582 for randomized algorithms [16, 20]. Interestingly, TCP-AP is equivalent to the lot sizing problem [31], which has been extensively studied in the operations research community. When D=2, MLAP is also called the joint replenishment problem (JRP). The state-of-the-art competitive ratio for JRP is 3 [17] and the current best lower bound is 2.754 [11] which improves an earlier bound of 2.64 [17]. When H=1, i.e., the input tree is a line, the upper bound for the competitive ratio is 5 [12] which improves an earlier bound of 8 [14], and the lower bound is 4 [7] which improves an earlier bound of (5+5)/23.618 [12]. [4] introduced a unifying framework for problems with delay and deadlines admitting a competitive ratio of O(log|V|) for MLAP. A slight variant of MLAP was presented in [21] where the competitive ratio is logarithmic in the cost of the aggregation tree. We refer the reader to [9] for a concise summary for MLAP and MLAP-D.

1.4.2 Offline multi-level aggregation

In offline MLAP-D, the information of all requests, including the location, the arrival time, and the deadline (also the waiting cost for offline MLAP), is given in advance. The offline problem currently has significantly better approximation results than the online problem. For offline MLAP-D, the current best approximation ratio is 2 [6, 7]. For offline MLAP, the current best approximation ratio is 2+ε [28] by adapting an algorithm in [24] for the multi-stage assembly problem. For offline TCP-AP, there is an optimal dynamic programming algorithm [1]. Offline JRP is NP-hard [2] and APX-hard [10, 27] and the current best approximation ratio is 1.791 [11] improving the previous ratios of 1.8 [23] and 2 [24].

1.4.3 Approximation algorithms parameterized on caterpillar dimension

Quite surprisingly, the only algorithm parameterized on the caterpillar dimension that we are aware of is the advice complexity of the online k-server problem on trees [29]. More specifically, to obtain optimal solutions for online k-server on trees, it is sufficient to use 2+2log2(H+1) bits of advice per request. We believe that the caterpillar dimension is a natural measure to evaluate the performance of approximation and online algorithms for challenging problems on trees, especially for problems like MLAP-D where the state-of-the-art competitive ratio is linear in the tree depth.

2 The 𝒆(𝑫+𝟏)-competitive Algorithm

In this section, we prove Theorem 1.

We describe the components of Algorithm 1. Once a request ρ reaches its deadline, the procedure OnDeadline is called in order to construct a service subtree to serve ρ. During this procedure, vertices are added to a service subtree T in two separate stages, which we call the expansion stage and the investment stage. Vertices added during the procedure ExpansionStage are added to the set VE and those added during InvestmentStage are added to VI, and the final transmission tree is taken as the subtree induced on the disjoint union VEVI. For each node v, the algorithm maintains three pieces of information which are used in both stages: v0, nextv0, and IvV(𝒯v){v} where 𝒯v is the subtree of 𝒯 rooted at v which includes all the vertices and edges under v. These variables are initialized in the Initialization procedure at the beginning of the problem instance as v=c(v), nextv= and Iv=. We later describe how this stored information is used.

Algorithm 1 e(D+1)-competitive algorithm for MLAP-D.

We first describe the expansion stage. When an unserved request ρ on vρ reaches its deadline at time t, we are forced to output a service subtree containing vρ. In this case, we say that the request ρ is critical. We start by adding the vertices on the path from r to vρ to VE. From here, the algorithm recursively expands the transmission subtree by adding the vertices which are in Iv to VE if nextvt, starting with v=r and then repeating this on its children in VE. Observe for the first service occurring at t1 that none of the sets Iv are added to VE, as nextv= initially.

We now describe the investment stage. Figuratively speaking, each vertex v has a price c(v) which the algorithm must invest into v before v can be added to VI. We keep track of the remaining cost for a vertex v using the variable v; v starts at c(v), is decreased with every investment, and is then reset to c(v) after v has been added to VI. For each node vVE (starting with the deepest nodes and working upwards), we allocate a budget proportional to c(v) for the algorithm to put towards investing into vertices, and once v=0, we add v to VI. The bookkeeping for the spending of budget is done within the Invest procedure. The allocated budget for vVE is θc(v), where for our competitive analysis, we find that the best competitive guarantee is obtained when θ=D. An important property of the algorithm is that the budget of vVE is only spent on vertices deeper than v, and it invests towards the requests in non-decreasing order of deadline. The algorithm stores the set of vertices which vVE invested in into the variable Iv. Once a given node vVE has spent its budget, it sets nextv as the earliest deadline among the remaining unserved requests beneath v, or to if there are no such active requests. Therefore, if the next time that v is added during the expansion stage occurs at time t, then if tnextv, the algorithm will also add Iv during the expansion stage.

The following terms and notations will be used throughout the analysis.

Definition 3 (Expansion vertices, Investment vertices).

Consider the transmission subtree Ti=𝒯[VEVI] transmitted by Algorithm 1 at time ti. A vertex v is an expansion vertex at time ti if vVE, and an investment vertex at time ti if vVI. The set of expansion vertices at time ti will be denoted ViE, and the set of investment vertices at time ti will be denoted ViI.

As the variables Iv and nextv change value within a single timestep, we make the following definition to refer to the values at specific times unambiguously.

Definition 4 (Iv,i,Iv,i,nextv,i,nextv,i).

If Algorithm 1 transmits a service subtree at time ti, we define Iv,i (respectively, Iv,i) to be the value of Iv before (respectively, after) the function call OnDeadline at ti. nextv,i and nextv,i are defined analogously.

Each set of expansion vertices ViE is partitioned into two disjoint sets.

Definition 5 (Anticipated vertices, unanticipated vertices).

We call a vertex vViE anticipated at time ti if nextv,iti. We call a vertex vViE unanticipated at time ti if it is an expansion vertex at time ti and nextv,i>ti. We denote the set of vertices anticipated at time ti as Ai, and those which are unanticipated as A¯i, so that ViE=AiA¯i is a disjoint union.

Our analysis will be split into two parts. First, we express alg solely in terms of the nodes that are unanticipated. The following lemma is proved in Section 2.1.

Lemma 6.
alg(1+1θ)D(1+θ)i=1c(A¯i).

In Section 2.2, we use a charging argument to show that the costs of unanticipated expansion vertices across time can be charged directly to OPT without double-charging. We prove the following.

Lemma 7.
i=1c(A¯i)opt.

Combining Lemmas 6 and 7 implies

alg(1+1θ)D(1+θ)opt.

The best choice is θ=D which implies Theorem 1. The proof is provided in the full version.

Before proceeding with the proofs for Lemmas 6 and 7, we highlight some important properties of Algorithm 1, which we will refer to throughout the analysis. We give brief justifications of each after stating them.

Observation 8.

For all ti, the subgraph of 𝒯 induced by ViE is a subtree rooted at r.

Observation 8 follows because r is added to VE during OnDeadline, and whenever we add v to VE, we add the entire u-v path where uVE already, which maintains connectivity of VE.

Observation 9.

For all ti and vV(𝒯), we have Iv,iV(𝒯v){v}.

Observation 9 holds at t1 because in Initialization, Iv is set to . The variable Iv only changes at times ti when vViE. Then, during a call InvestmentStage(VI,VE,v) at ti, we only invest in vertices in 𝒯v. Additionally, v could not invest into itself as vViE already, and hence IvV(𝒯v){v} at all moments of the algorithm.

Observation 10.

For all ti, if vViE and vIv,i, then all ancestors of v are in Ti.

Observation 10 is justified as follows. Consider vViE and vIv,i. Then Invest(v,v,VI) must have been called for bv>0 at time ti. Due to line 29, v was the first vertex on v-v path not in VEVI, meaning that all ancestors of v must be in Ti already.

Observation 11.

For all ti, if u,vViE and u is an ancestor of v with Iu,i𝒯v, then nextu,inextv,i.

Observation 11 is justified as follows. Assume for now that nextv,i, so nextv,i=dρ where ρ has the earliest deadline among unserved requests in 𝒯v(VEVI) after the investment stage at v has completed at ti. Observe that the investment stage for v occurs before the investment stage for u, as u is an ancestor of v. Therefore, when the investment stage for u begins, the earliest deadline among unserved request in 𝒯v(VEVI) has a deadline at earliest dρ. Because the investment stage invests towards requests in non-decreasing order of deadline, it follows that if Iu,i𝒯v, then at some point the request in 𝒯u(VEVI) with earliest deadline was located at a vertex in 𝒯v. But this implies that at the conclusion of the investment stage for u that all requests in 𝒯u(VEVI) have deadline at earliest dρ. Therefore, nextu would be set no earlier than dρ, and therefore nextu,idρ=nextv,i. For the other case, if nextv,i=, then after the investment stage for v there were no requests in 𝒯v(VEVI), and so Iu,i𝒯v is impossible.

2.1 Upper-bounding ALG

In this section, we prove Lemma 6.

Observe that an investment vertex v at time ti is only added to ViI if a total of c(v) is invested by expansion vertices to reduce the variable v to zero. As each expansion vertex v can invest no more than θc(v), we obtain

i=1c(ViI)i=1θc(ViE).

This yields

alg=i=1c(Ti)=i=1[c(ViE)+c(ViI)]i=1[c(ViE)+θc(ViE)]=(1+θ)i=1c(ViE). (1)

Now that we have expressed the cost solely in terms of the expansion vertices, we wish to express the cost solely in unanticipated expansion vertices, as these costs can then be directly associated with opt in Section 2.2. To do so, we must move the costs of anticipated nodes to those which were unanticipated. We first show the following two lemmas.

Lemma 12.

Let vAi be an anticipated vertex at time ti, then v must have been an expansion vertex at a time tj<ti, in other words vVjE for some j<i.

Proof.

Suppose vAi. By definition this means that nextv,iti, and hence clearly nextv,i. As the nextv variable is originally assigned to in the Initialization of the algorithm, it follows that nextv must have had its value reassigned prior to ti. As the algorithm’s variable nextv is only reassigned at times for which v is an expansion vertex, we therefore know that v must have been an expansion vertex at some time before ti.

Lemma 13.

Let vAi be an anticipated node at time ti, and let tj be the latest time before ti that v was an expansion vertex (see Lemma 12). Let θc(v) be the budget assigned to v in the investment stage for v. Then c(Iv,i)θc(v).

Proof.

Suppose vAi. According to Lemma 12, we know that v must have been an expansion vertex at a time earlier than ti. Let tj be the most recent time before ti for which vVjE.

As the variable nextv is not changed between tj and ti, we know that nextv,j=nextv,i, and hence nextv,j also. Therefore, we know that after leaving the while loop on line 27 within the InvestmentStage(VI,VE,v) call at time tj, it must be the case that there were still pending requests on vertices in 𝒯v(VEVI), or else nextv,j would have been set to in line 31. Thus, it must instead be the case that the condition bv>0 of the while loop failed, and so the entirety of the budget assigned to v at time tj was spent. Observe that each call of Invest(v,v,VI) will decrease the budget bv by Δbv, but will add v to Iv, where c(v)vΔbv. Thus the amount by which the budget decreases is always at most the amount by which c(Iv) increases. As during the iteration at time tj, bv must have decreased by at least θc(v), it follows that c(Iv) must have increased by at least θc(v) during the investment stage. As Iv is set to at the beginning of the investment stage, we know c(Iv)=0 initially, and thus if c(Iv) increases by at least θc(v) during the investment phase, we know c(Iv,j)θc(v). Observing that c(Iv,j)=c(Iv,i) finishes the proof.

We can now express the cost of all expansion nodes only in terms of the unanticipated nodes.

Lemma 14.

For any ti, we have

c(ViE)=vViEc(v)(1+1θ)DvA¯ic(v)=(1+1θ)Dc(A¯i)
Proof.

We proceed using the accounting method of amortized analysis. For a fixed ti, consider placing coins of value c(v) on each anticipated vertex vViE. Thus the total cost initially on the structure ViE equals the left-hand side of the inequality stated by the Lemma. We will redistribute the costs which are on anticipated nodes, to obtain a rearrangement of costs which is upper-bounded by the larger quantity of the lemma.

We start with the root r. We process r as follows. If r is an unanticipated node of Ti, we do not move the cost from c(r) – we will only move the costs off of anticipated nodes. Otherwise if r is an anticipated node, then by Lemma 13, c(r)1θc(Ir,i)=1θvIr,ic(v). If r is anticipated, then we know that all the nodes in Ir,i were added to ViE, and so we can reallocate this cost of c(r) from r as an additional cost of at most c(v)θ to each vIr,i.

We descend the vertices in ViE and repeat this process: we call a expansion node v “ready to redistribute” if all of its ancestors have been processed. To process an unanticipated vA¯i, we do nothing and the cost remains on v. For any anticipated vAi currently allocated a cost of Cc(v), we process v by reallocating this as an additional cost of Cθc(v) to each node v in Iv,i. Recall by Observation 9 that v will only invest into vertices in 𝒯v, and so these costs are strictly pushed to deeper vertices.

Claim 15.

When a vertex vViE at depth d is ready to redistribute but has not yet been processed, the allocated costs on vertices vViE𝒯v is at most (1+1/θ)dc(v).

Proof.

We proceed by induction on d. The base case of d=0 is trivial, as this corresponds to the fact that all vertices in vViE have an allocated cost of c(v) before the root r is processed.

Assume inductively that the claim has held true up to a depth d, and a vertex v at depth d+1 is ready to redistribute. This means that when the parent of v, call it u, was ready to redistribute, all nodes wV(𝒯u) had allocated at most (1+1/θ)dc(w). If u is unanticipated, then the cost on u is not moved, so none of the vertices in 𝒯u receive any additional costs. This would imply that the costs on vertices w in 𝒯v would still be at most (1+1/θ)dc(w)(1+1/θ)d+1c(w), and so the claim will continue to hold after u is processed. Otherwise, consider what would occur when u was processed if u was anticipated. An additional cost of at most 1θ(1+1/θ)dc(w) would be added to all vertices in w𝒯u (recall that the cost Cc(u) of u is reallocated as an additional cost of Cθc(w) to each node wIu,i). Therefore immediately following the processing of u, each wV(𝒯u) would have had a cost of at most (1+1/θ)dc(w)+1θ(1+1/θ)dc(w)=(1+1/θ)d+1c(w). At this point, v would be ready to redistribute, and as 𝒯v is a subtree of 𝒯u, the inductive step is finished and we have proven Claim 15.

This redistribution process must terminate eventually, as the tree 𝒯 has a bounded depth of D. Observe that this redistribution cost will leave anticipated vertices of ViE with no costs, while an unanticipated vertex v in ViE at depth d would be left with a cost of (1+1/θ)dc(v)(1+1/θ)Dc(v). As we have at no point decreased the total cost on the structure ViE, the inequality stated by the lemma follows.

Combining inequality (1) and Lemma 14 implies Lemma 6.

2.2 Charging Scheme against OPT

In this section, we prove Lemma 7.

We accomplish this using a charging argument to map the costs of unanticipated expansion vertices at times ti to OPT. However, before we can do so, we need to further characterize the unanticipated expansion nodes, which we accomplish in the following lemma.

Lemma 16.

Let ρi denote the pending request which triggered OnDeadline at ti. Then for any vA¯i, either v is on the r-vρi path, or vIv,i for some vAi.

Proof.

Observe that there are only 2 cases in Algorithm 1 for which a vertex v can be added to ViE; (1) during OnDeadline, if v is on the path r-vρi and (2) during ExpansionStage(VI,VE,u), if v is on the path u-u where uAi and uIu,i. Case (1) clearly satisfies the lemma, so we will now assume the second case, that v lies on the path u-u where uAi and uIu,i. As the lemma is obvious for v=u, we continue under the assumption that vu.

By Lemma 12, there must be a time ti<ti such that uViE, let ti be the most recent such time, and observe that nextu,i=nextu,i and Iu,i=Iu,i. As uIu,i=Iu,i, by Observation 10 we know that vTi. We now make an important claim.

Claim 17.

For any w on the path u-u (where uAi, uViE, and uIu,i=Iu,i, and ti defined as before) if wViE then wAi, nextw,i=nextw,i and Iw,i=Iw,i.

Proof.

By Observation 11, we have that nextw,inextu,i, as w is on the u-u path. We know that wViE, and we also know that wViE, because w is on the u-u path where u,uViE, and ViE forms a subtree due to Observation 8. Further observe that it is impossible for w to be anticipated at any time t with ti<t<ti, because this would necessitate that u would be anticipated at time t by Observation 8, which would contradict the fact that ti is the latest time before ti for which u is anticipated. With this observation, it follows that nextw,i=nextw,i. Putting this together, we have that nextw,i=nextw,inextu,i=nextu,iti, where we used the fact that uAi. Hence, wAi by definition, proving the claim.

Earlier we found that vTi=ViEViI. Due to Claim 17, we now know that vViE as otherwise vAi, which would contradict the fact that v is an unanticipated vertex at time ti.

Thus vViI, meaning there must have been some vViE such that Invest(v,v,VI) with bv>0 was called at time ti and resulted in the addition of v into ViI, and so vIv,i. Observe that by the time Invest(u,u,VI) was called, we would have needed all vertices on the path u-u already present in VEVI, and hence v must have invested in v before Invest(u,u,VI) was called. Thus, v must be at least as deep as u. v must also be an ancestor of v in order for v to have invested into v by Observation 9, and hence v is on the path u-v, and hence also on the path u-u. Therefore Claim 17 applies, meaning vAi. Finally, vIv,i=Iv,i, finishing the proof.

We are now ready to define the charging scheme.

2.2.1 The Charging Scheme

Let vA¯i be an unanticipated expansion vertex at time ti. Let ρi be the request which triggered the creation of a service at time ti, so dρi=ti. Using Lemma 16, we know that v is either on the r-vρi path, or vIv,i for vAi. We thus split the charging scheme into two cases:

  • Case 1: v is on the path r-vρi. Then, OPT must have served ρi within the time [aρi,dρi]=[aρi,ti]. OPT’s service to ρi must have also included v, and so we charge the cost of c(v) against any of these c(v) costs OPT incurs for including v in its service history within [aρi,ti].

  • Case 2: v is not on the path r-vρi, and vIv,i for some vAi. If there are multiple such v, we simply fix one arbitrarily for each unanticipated vA¯i. By Lemma 12 we know that v must have been an expansion vertex at a time before ti, so suppose that this occurred most recently at ti<ti. Then we would have that nextv,i=nextv,i. As vAi, we have nextv,iti. Now, as vIv,i=Iv,i and ALG processes requests in 𝒯v in non-decreasing deadline, it follows that while ALG was investing the budget on v at time ti, there must have been an unserved request ρ on a vertex vρ such that v was on the path v-vρ. Because nextv,i is determined as the next pending task in 𝒯u not yet in ViEViI, we know that dρnextv,i. Linking this together, we find that dρnextv,i=nextv,iti.

    Thus OPT must have served ρ within the time [aρ,dρ], which is a subset of [aρ,ti] by the above inequality. Such a service must have included v, and thus we charge c(v) to the associated cost of c(v) incurred by OPT during the timeframe [aρ,ti].

In both Case 1 and Case 2, we find ourselves charging c(v) to a portion of OPT’s service history within [aρ,ti] which serves ρ where vρ is deeper than v. In order to unify these two cases, we call this particular ρ the request associated with unanticipated node v at time ti.

Using the above charging scheme, the cost of any unanticipated vertex at a time ti is mapped to a cost in opt. To establish Lemma 7, we are left with showing that this mapping is one-to-one, i.e., no one portion of opt is charged to more than once.

Lemma 18.

The charging scheme for ALG consists of unique charges against OPT.

Proof.

Seeking a contradiction, suppose instead that two distinct charges for a vertex vA¯i and vA¯j coincide, say at times tj and ti where j<i. We will do a case analysis based on whether the charge at ti is Case 1 or Case 2. Suppose that ρj and ρi are the requests associated (as defined above) to v at times tj and ti respectively. The charges to OPT’s history must have taken place between times [aρj,tj] and [aρi,ti]. Thus, they could only coincide if aρi<tj (utilizing our assumption of distinct arrivals and deadlines for distinct services). In words, this means ρi was present when v was an unanticipated expansion vertex at time tj. This leads to the following observation used throughout the proof.

Observation 19.

For any tk>tj, if ρi was not served before tk, we must have nextv,kdρi.

We split the remainder of the proof into the two cases depending on the type of charging for v which occurs at time ti. We will show that both lead to contradiction.

Case 1.

In this scenario, v is on the critical path due to the expiry of ρi, meaning ρi was not served before time ti, and so k=i satisfies the conditions required for Observation 19. Thus nextv,idρi. As dρi=ti, this would imply nextv,iti which would contradict the fact that vA¯j.

Case 2.

This means at time ti, for some ancestor vAi of v, that vIv,i. Recall by definition this means that the last time v was an expansion node prior to ti, at time ti<ti, ρi must have been active where vρi𝒯v. We know that vViE, as vViE and ViE is a subtree by Observation 8. Therefore it must be true that titj, as ti is defined as the latest time before tj that v was an expansion vertex. More strictly, ti>tj as it is impossible for v to invest into v at time tj because vVjE, i.e it is an expansion vertex at time tj. Hence we know tj<ti<ti.

We know that ρi must not have been served before time ti, because it was this service which caused v to invest into v at time ti, by definition of Case 2 charge. Hence by Observation 19, we know that nextv,idρ as ti>tj. Observe further that v could not have been an expansion vertex at time ti, otherwise v would not have invested into v at ti. Therefore the variable nextv would not be affected at time ti, meaning nextv,i=nextv,i and thus nextv,idρi still. It is impossible for v to be an expansion vertex within the time interval (ti,ti), because this would imply that v would be an expansion vertex within (ti,ti) by Observation 8. Thus it follows that the variable nextv is not changed in the interval (ti,ti), and so nextv,idρi.

However, from the discussion in the Case 2 charge definition, we already know that dρiti, and so nextv,idρiti. This contradicts the fact that vA¯i, thereby finishing the proof.

3 The (𝟒𝑯+𝟐)𝒆-competitive Algorithm

In this section, we prove Theorem 2.

We show that Algorithm 1 can be modified in a way which results in the competitive ratio being bounded above by a linear function of the caterpillar dimension H of 𝒯. Throughout this section, we assume that we are given a heavy path decomposition 𝒫 for 𝒯 with dimension H.

This section builds upon the work from Section 2, and thus we assume familiarity with Algorithm 1 and the notations and definitions introduced previously. We also introduce some new pieces of notation.

Definition 20 (P(v) and p(v)).

Let v be a vertex in 𝒯. Let P(v) denote the path which v lies on in 𝒫. Let p(v) be the intersection of the path P(v) and the path from r to v.

Algorithm 2 (4H+2)e-competitive algorithm for MLAP-D.

The motivation behind Algorithm 2 is that if we wish for the competitive ratio to not be parameterized by the depth of 𝒯, we cannot follow the accounting method of Lemma 14, because this explicitly descends the tree node-by-node and invariably leads to a function of D. If we wish to parameterize instead in terms of H, then one would need the accounting method to be performed path-by-path instead.

Algorithm 2 accomplishes this aim by allowing the deepest expansion node at time ti on each path P𝒫, which we will denote vP,i, to potentially have a much larger budget to spend during the investment stage in comparison to Algorithm 1. Instead of the budget for vP,i being θ1c(vP,i) for some θ1 as was the case in Algorithm 1, for these nodes the budget at time ti becomes θ1c(p(vP,i)). Our algorithm will specified in terms of two parameters, θ1 and θ2, and we will choose their values to optimize our bound on the competitive ratio during the analysis. Additionally, vP,i is made to be the only vertex on P(vP,i) which can make investments on vertices in 𝒯vP,i. If vP is not the deepest expansion node on P(v), and if the next unserved request is within 𝒯vP(v),i, then we stop making investments for v, which is done in line 19. The idea is that because vP,i has a disproportionally large budget, we can simply use the investments from vP,i for v as well.

Definition 21 (vP,i, Disproportional vertices, recently disproportional vertices).

We define vP,i to be the deepest node in PViE, where P𝒫. We say a vertex v is disproportional at time ti if v=vP(v),i. That is, v is the deepest expansion vertex at time ti in P(v). Let vAi, and let tj<ti be the latest time before ti that v was an expansion vertex (which must exist due to Lemma 12). Then we say v was recently disproportional at time ti if v was disproportional at time tj, i.e v=vP(v),j.

Similar to the proof of Theorem 1, our analysis is split into two parts. First, we express alg in terms of the unanticipated nodes. The following lemma is proven in the full version.

Lemma 22.
alg(1+1θ1)H+1(1+1θ2)H(1+θ1+θ2)i=1c(A¯i).

Second, we use the same charging argument for Lemma 7 to show that the costs of unanticipated expansion vertices across time can be charged directly to OPT without double-charging. Combining Lemmas 22 and 7 implies

alg(1+1θ1)H+1(1+1θ2)H(1+θ1+θ2)opt.

The best choice is θ1=2H+1 and θ2=2H which implies Theorem 2. The proof is provided in the full version.

Crucially, Algorithm 2 has built upon Algorithm 1 using an approach which allows the key lower bound on opt provided by Lemma 7 to continue to hold. To see why the analysis of Section 2.2 can be applied identically to Algorithm 2, observe that Observations 8, 9, 10 and 11 are also true for Algorithm 2. Then, because Section 2.2 only utilizes these observations rather than any features particular to either algorithm, we see that Lemma 7 provides a robust lower bound for opt. Therefore, Algorithm 1 can be used as a generic framework for MLAP-D algorithms.

4 Conclusion

This paper developed a memory-based framework for online MLAP-D, which allowed for a direct analysis in the case of general trees, and improved on competitiveness results. To show the framework was flexible, we demonstrated that it could be modified to provide competitive ratios linear in caterpillar dimension, a measure which unifies several results for special classes of graph which had been considered previously for MLAP-D. Future research could extend the memory-based framework to the problem of MLAP with delay costs, which would likely tighten the upper bounds of competitive ratios for this problem. The framework could also be modified to work for other special tree classes. The most notable open problem in this area remains the wide asymptotic gap for the competitive ratio, where the best-known lower bound remains constant.

References

  • [1] Alok Aggarwal and James K Park. Improved algorithms for economic lot size problems. Operations research, 41(3):549–571, 1993. doi:10.1287/OPRE.41.3.549.
  • [2] Esther Arkin, Dev Joneja, and Robin Roundy. Computational complexity of uncapacitated multi-echelon production planning problems. Operations research letters, 8(2):61–66, 1989.
  • [3] Yossi Azar and Noam Touitou. General framework for metric optimization problems with delay or with deadlines. In 2019 IEEE 60th Annual Symposium on Foundations of Computer Science (FOCS), pages 60–71. IEEE, 2019. doi:10.1109/FOCS.2019.00013.
  • [4] Yossi Azar and Noam Touitou. Beyond tree embeddings–a deterministic framework for network design with deadlines or delay. In 2020 IEEE 61st Annual Symposium on Foundations of Computer Science (FOCS), pages 1368–1379. IEEE, 2020. doi:10.1109/FOCS46700.2020.00129.
  • [5] BR Badrinath. Gathercast: The design and implementation of a programmable aggregation mechanism for the internet. In Proceedings Ninth International Conference on Computer Communications and Networks (Cat. No. 00EX440), pages 206–213. IEEE, 2000.
  • [6] Luca Becchetti, Alberto Marchetti-Spaccamela, Andrea Vitaletti, Peter Korteweg, Martin Skutella, and Leen Stougie. Latency-constrained aggregation in sensor networks. ACM Transactions on Algorithms (TALG), 6(1):1–20, 2009. doi:10.1145/1644015.1644028.
  • [7] Marcin Bienkowski, Martin Böhm, Jaroslaw Byrka, Marek Chrobak, Christoph Dürr, Lukáš Folwarcznỳ, Łukasz Jeż, Jiri Sgall, Kim Thang Nguyen, and Pavel Veselỳ. Online algorithms for multi-level aggregation. In The 24th European Symposium on Algorithms (ESA), 2016.
  • [8] Marcin Bienkowski, Martin Böhm, Jaroslaw Byrka, Marek Chrobak, Christoph Dürr, Lukáš Folwarcznỳ, Łukasz Jeż, Jiří Sgall, Nguyen Kim Thang, and Pavel Veselỳ. Online algorithms for multilevel aggregation. Operations Research, 68(1):214–232, 2020. doi:10.1287/OPRE.2019.1847.
  • [9] Marcin Bienkowski, Martin Böhm, Jaroslaw Byrka, Marek Chrobak, Christoph Dürr, Lukáš Folwarcznỳ, Łukasz Jeż, Jiří Sgall, Nguyen Kim Thang, and Pavel Veselỳ. New results on multi-level aggregation. Theoretical Computer Science, 861:133–143, 2021. doi:10.1016/J.TCS.2021.02.016.
  • [10] Marcin Bienkowski, Jarosław Byrka, Marek Chrobak, Neil Dobbs, Tomasz Nowicki, Maxim Sviridenko, Grzegorz Świrszcz, and Neal E Young. Approximation algorithms for the joint replenishment problem with deadlines. Journal of Scheduling, 18(6):545–560, 2015. doi:10.1007/S10951-014-0392-Y.
  • [11] Marcin Bienkowski, Jaroslaw Byrka, Marek Chrobak, Łukasz Jeż, Dorian Nogneng, and Jiří Sgall. Better approximation bounds for the joint replenishment problem. In Proceedings of the twenty-fifth annual ACM-SIAM symposium on discrete algorithms, pages 42–54. SIAM, 2014.
  • [12] Marcin Bienkowski, Jaroslaw Byrka, Marek Chrobak, Łukasz Jeż, Jiří Sgall, and Grzegorz Stachowiak. Online control message aggregation in chain networks. In Workshop on Algorithms and Data Structures, pages 133–145. Springer, 2013.
  • [13] Edward Bortnikov and Reuven Cohen. Schemes for scheduling control messages by hierarchical protocols. Computer Communications, 24(7-8):731–743, 2001. doi:10.1016/S0140-3664(00)00276-0.
  • [14] Carlos Fisch Brito, Elias Koutsoupias, and Shailesh Vaya. Competitive analysis of organization networks or multicast acknowledgment: How much to wait? Algorithmica, 64:584–605, 2012. doi:10.1007/S00453-011-9567-5.
  • [15] Niv Buchbinder, Moran Feldman, Joseph 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, pages 1235–1244. SIAM, 2017.
  • [16] Niv Buchbinder, Kamal Jain, and Joseph Naor. Online primal-dual algorithms for maximizing ad-auctions revenue. In European Symposium on Algorithms, pages 253–264. Springer, 2007. doi:10.1007/978-3-540-75520-3_24.
  • [17] Niv Buchbinder, Tracy Kimbrel, Retsef Levi, Konstantin Makarychev, and Maxim Sviridenko. Online make-to-order joint replenishment model: Primal-dual competitive algorithms. Operations Research, 61(4):1014–1029, 2013. doi:10.1287/OPRE.2013.1188.
  • [18] Wallace B Crowston and Michael H Wagner. Dynamic lot size models for multi-stage assembly systems. Management Science, 20(1):14–21, 1973.
  • [19] Daniel R Dooly, Sally A Goldman, and Stephen D Scott. Tcp dynamic acknowledgment delay (extended abstract) theory and practice. In Proceedings of the thirtieth annual ACM symposium on Theory of computing, pages 389–398, 1998.
  • [20] Anna R Karlin, Claire Kenyon, and Dana Randall. Dynamic tcp acknowledgment and other stories about e/(e1). Algorithmica, 36:209–224, 2003.
  • [21] Sanjeev Khanna, Joseph Seffi Naor, and Dan Raz. Control message aggregation in group communication protocols. In Automata, Languages and Programming: 29th International Colloquium, ICALP 2002 Málaga, Spain, July 8–13, 2002 Proceedings 29, pages 135–146. Springer, 2002.
  • [22] Alf Kimms. Multi-level lot sizing and scheduling: methods for capacitated, dynamic, and deterministic models. Springer Science & Business Media, 2012.
  • [23] Retsef Levi, Robin Roundy, David Shmoys, and Maxim Sviridenko. A constant approximation algorithm for the one-warehouse multiretailer problem. Management Science, 54(4):763–776, 2008. doi:10.1287/MNSC.1070.0781.
  • [24] Retsef Levi, Robin O Roundy, and David B Shmoys. Primal-dual algorithms for deterministic inventory problems. Mathematics of Operations Research, 31(2):267–285, 2006. doi:10.1287/MOOR.1050.0178.
  • [25] Jiří Matoušek. On embedding trees into uniformly convex banach spaces. Israel Journal of Mathematics, 114(1):221–237, 1999.
  • [26] Jeremy McMahan. A d-competitive algorithm for the multilevel aggregation problem with deadlines, 2021. arXiv:2108.04422.
  • [27] Tim Nonner and Alexander Souza. Approximating the joint replenishment problem with deadlines. Discrete Mathematics, Algorithms and Applications, 1(02):153–173, 2009. doi:10.1142/S1793830909000130.
  • [28] L. L. C. Pedrosa. Private communication reported in [7], 2013.
  • [29] Marc P Renault and Adi Rosén. On online algorithms with advice for the k-server problem. Theory of Computing Systems, 56(1):3–21, 2015. doi:10.1007/S00224-012-9434-Z.
  • [30] DD SLEATOR and RE TARJAN. A data structure for dynamic trees. Journal of computer and system sciences (Print), 26(3):362–391, 1983. doi:10.1016/0022-0000(83)90006-5.
  • [31] Harvey M Wagner and Thomson M Whitin. Dynamic version of the economic lot size model. Management science, 5(1):89–96, 1958.