Multi-level Weighted Additive Spanners
Reyan Ahmed, Greg Bodwin, Faryad Darabi Sahneh, Keaton Hamm, Stephen Kobourov, Richard Spence
MMulti-level Weighted Additive Spanners
Reyan Ahmed
University of Arizona, Tucson, United [email protected]
Greg Bodwin
University of Michigan, Ann Arbor, United [email protected]
Faryad Darabi Sahneh
University of Arizona, Tucson, United [email protected]
Keaton Hamm
University of Texas at Arlington, Arlington, United [email protected]
Stephen Kobourov
University of Arizona, Tucson, United [email protected]
Richard Spence
University of Arizona, Tucson, United [email protected]
Abstract
Given a graph G = ( V, E ), a subgraph H is an additive + β spanner if dist H ( u, v ) ≤ dist G ( u, v ) + β for all u, v ∈ V . A pairwise spanner is a spanner for which the above inequality only must hold forspecific pairs P ⊆ V × V given on input, and when the pairs have the structure P = S × S forsome subset S ⊆ V , it is specifically called a subsetwise spanner. Spanners in unweighted graphshave been studied extensively in the literature, but have only recently been generalized to weightedgraphs.In this paper, we consider a multi-level version of the subsetwise spanner in weighted graphs,where the vertices in S possess varying level, priority, or quality of service (QoS) requirements, andthe goal is to compute a nested sequence of spanners with the minimum number of total edges. Wefirst generalize the +2 subsetwise spanner of [Pettie 2008, Cygan et al., 2013] to the weighted setting.We experimentally measure the performance of this and several other algorithms for weighted additivespanners, both in terms of runtime and sparsity of output spanner, when applied at each level of themulti-level problem. Spanner sparsity is compared to the sparsest possible spanner satisfying thegiven error budget, obtained using an integer programming formulation of the problem. We run ourexperiments with respect to input graphs generated by several different random graph generators:Erdős–Rényi, Watts–Strogatz, Barabási–Albert, and random geometric models. By analyzing ourexperimental results we developed a new technique of changing an initialization parameter valuethat provides better performance in practice. Theory of computation → Design and analysis of algorithms
Keywords and phrases multi-level, graph spanner, approximation algorithms
Digital Object Identifier
Supplement Material
All algorithms, implementations, the ILP solver, experimental data andanalysis are available on Github at https://github.com/abureyanahmed/multi_level_weighted_additive_spanners . Acknowledgements
The research for this paper was partially supported by NSF grants CCF-1740858,CCF1712119, and DMS-1839274. © Reyan Ahmed, Greg Bodwin, Faryad Darabi Sahneh, Keaton Hamm, Stephen Kobourov, andRichard Spence;licensed under Creative Commons License CC-BYLeibniz International Proceedings in InformaticsSchloss Dagstuhl – Leibniz-Zentrum für Informatik, Dagstuhl Publishing, Germany a r X i v : . [ c s . D M ] F e b . Ahmed, et al. XX:1 This paper studies spanners of undirected input graphs with edge weights. Given an inputgraph, a spanner is a sparse subgraph with approximately the same distance metric as theoriginal graph. Spanners are used as a primitive for many algorithmic tasks involving theanalysis of distances or shortest paths in enormous input graphs; it is often advantageous tofirst replace the graph with a spanner, which can be analyzed much more quickly and storedin much smaller space, at the price of a small amount of error. See the recent survey [4] formore details on these applications.Spanners were first studied in the setting of multiplicative error, where for an input graph G and an error (“stretch”) parameter k , the spanner H must satisfy dist H ( s, t ) ≤ k · dist G ( s, t )for all vertices s, t . This setting was quickly resolved in a seminal paper by Althöfer, Das,Dobkin, Joseph, and Soares [7], where the authors proved that for all positive integers k , all n -vertex graphs have spanners on O ( n /k ) edges with stretch 2 k −
1, and that this tradeoffis best possible. Thus, as expected, one can trade off error for spanner sparsity, increasingthe stretch k to pay more and more error for sparser and sparser spanners.For very large graphs, purely additive error is arguably a much more appealing paradigm.For a constant c >
0, a + c spanner of an n -vertex graph G is a subgraph H such thatdist H ( s, t ) ≤ dist G ( s, t ) + c for all vertices s, t . Thus, for additive error the excess distancein H is independent of the graph size and of dist G ( s, t ), which can be large when n is large.Additive spanners were introduced by Liestman and Shermer [27], and followed by threelandmark theoretical results on the sparsity of additive spanners in unweighted graphs:Aingworth, Chekuri, Indyk, and Motwani [6] showed that all graphs have +2 spanners on O ( n / ) edges, Chechik [16, 12] showed that all graphs have +4 spanners on O ( n / ) edges,and Baswana, Kavitha, Mehlhorn, and Pettie [10] showed that all graphs have +6 spannerson O ( n / ) edges.Despite the inherent appeal of additive error, spanners with multiplicative error remainmuch more commonly used in practice. There are two reasons for this. First, while the multiplicative spanner of Althöfer et al [7] works without issue for weightedgraphs, the previous additive spanner constructions hold only for unweighted graphs,whereas the metrics that arise in applications often require edge weights. Addressing this,recent work of the authors [3] and in two papers of Elkin, Gitlitz, and Neiman [21, 22]gave natural extensions of the classic additive spanner constructions to weighted graphs.For example, the +2 spanner bound becomes the following statement: for all n -vertexweighted graphs G , there is a subgraph H satisfying dist H ( s, t ) ≤ dist G ( s, t ) + 2 W ( s, t ),where W ( s, t ) denotes the maximum edge weight along an arbitrary s (cid:32) t shortest pathin G . The +4 spanner generalizes similarly, and the +6 spanner does as well with thesmall exception that the error increases to +(6 + ε ) W ( s, t ), for ε > Second, poly( n ) factors in spanner size can be quite serious in large graphs, and soapplications often require spanners of near-linear size, say O ( n . ) edges for an n -vertexinput graph. The worst-case spanner sizes of O ( n / ) or greater for additive spannerconstructions are thus undesirable, and unfortunately, there is a theoretical barrier toimproving them: Abboud and Bodwin [1] proved that one cannot generally trade off moreadditive error for sparser spanners, as one can in the multiplicative setting. Specifically,for any constant c >
0, there is no general construction of + c spanners for n -nodeinput graphs on O ( n / − . ) edges. However, the lower bound construction is ratherpathological, and it is not likely to arise in practice. It is known that for many practical X:2 Multi-level Weighted Additive Spanners graph classes, e.g., those with good expansion, near-linear additive spanners always exist[10]. Thus, towards applications of additive error, it is currently an important openquestion whether modern additive spanner constructions on practical graphs of interesttend to exhibit performance closer to the worst-case bounds from [1], or bounds closerto the best ones available for the given input graphs. (We remark here that there arestrong computational barriers to designing algorithms that achieve the sparsest possible+ c spanners directly, or which even closely approximate this quantity in general [17]).The goal of this work is to address the second point, by measuring the experimentalperformance of the state-of-the-art constructions for weighted additive spanners on graphsgenerated from various popular random models and measuring their performance. Weconsider both + cW spanners (where W = max uv ∈ E w ( uv ) is the maximum edge weight)and + cW ( · , · ) spanners, whose additive error is + cW ( s, t ) for each pair s, t ∈ V . We areinterested both in runtime and in the ratio of output spanner size to the size of the sparsestpossible spanner (which we obtain using an ILP, discussed in Section 4). We specificallyconsider generalizations of the three staple constructions for weighted additive spannersmentioned above, in which the spanner distance constraint only needs to be satisfied forgiven pairs of vertices.In particular, the following extensions are considered. A pairwise spanner is a subgraphthat must satisfy the spanner error inequality for a given set of vertex pairs P taken on input,and a subsetwise spanner is a pairwise spanner with the additional structure P = S × S forsome vertex subset S . See [30, 20, 26, 25, 11, 19, 13, 14] for recent prior work on pairwiseand subsetwise spanners. We also discuss a multi-level version of the subsetwise additivespanner problem where we have a weighted graph G = ( V, E ), a nested sequence of terminals S ‘ ⊆ S ‘ − ⊆ · · · ⊆ S ⊆ V and a real number c ≥ G ‘ ⊆ G ‘ − ⊆ · · · ⊆ G such that G i is a + cW subsetwise spanner of G over S i . The objective is to minimize the total number of edges in all subgraphs. Similargeneralizations have been studied for the Steiner tree problem under various names includingMulti-level Network Design [8], Quality of Service Multicast Tree (QoSMT) [15, 24], PrioritySteiner Tree [18], Multi-Tier Tree [28], and Multi-level Steiner Tree [2, 5]. However, multi-level or QoS generalizations of spanner problems appear to have been much less studied inliterature. Section 2 generalizes the +2 subsetwise construction [20], and Section 3 generalizesto the multi-level setting. All unweighted graphs have polynomially constructible +2 subsetwise spanners on O ( n p | S | )edges [30, 20]. For weighted graphs, Ahmed et al. [3] recently give a +4 W subsetwisespanner construction, also using O ( n p | S | ) edges. In this section we show how to generalizethe +2 subsetwise construction [30, 20] to the weighted setting by giving a constructionwhich produces a +2 W spanner of a weighted graph (with integer edge weights in [1 , W ])on O ( nW p | S | ) edges. Due to space, we omit most proof details here but describe theconstruction instead.A clustering C = { C , C , . . . , C q } is a set of disjoint subsets of vertices. Initially, everyvertex is unclustered. The construction has two steps: the clustering phase and the pathbuying phase. The clustering phase is exactly the same as that of [30, 20] in which weconstruct a cluster subgraph G C as follows: set β = log n p | S | W , and while there is a vertex v with at least d n β e unclustered neighbors, we add a cluster C to C containing exactly d n β e unclustered neighbors of v (note that v C ). We add to G C all edges vx ( x ∈ C ) and xy . Ahmed, et al. XX:3 ( x, y ∈ C ). When there are no more vertices with at least d n β e unclustered neighbors, weadd all the unclustered vertices and their incident edges to G C .In the second (path-buying) phase, we start with a clustering C and a cluster subgraph G := G C . There are z := (cid:0) | S | (cid:1) unordered pairs of vertices in S ; let π , π , . . . , π z denotethe shortest paths between these vertex pairs where π i = π ( u i , v i ) has endpoints { u i , v i } . Asin [20], we iterate from i = 1 to i = z and determine whether to add path π i . Define the costand value of a path π i as follows:cost( π i ) := π i which are absent in G i − value( π i ) := x, C ) where x ∈ { u i , v i } , C ∈ C ,C contains at least one vertex in π i ,and dist π i ( x, C ) < dist G i − ( x, C )If cost( π i ) ≤ (2 W + 1)value( π i ), then we add (“buy”) π i to the spanner by letting G i = G i − ∪ π i . Otherwise, we do not add π i , and let G i = G i − . The final spanner returned is H = G z . (cid:73) Lemma 1.
For any u i , v i ∈ S , we have dist H ( u i , v i ) ≤ dist G ( u i , v i ) + 2 W . Proof sketch.
The proof is largely the same as in [20] except with one main difference: inthe unweighted case, the distance between any two points within the same cluster is at most2, and it is shown in [20] that using this property, if there are t edges in π ( u, v ) missingfrom G C , then there are at least t clusters containing at least one vertex on π ( u, v ). In theweighted case, assuming W is constant, there are Ω( t ) clusters of C which contain at leastone vertex on π ( u, v ). (cid:74)(cid:73) Corollary 2.
Let G be a weighted graph with integer edge weights in [1 , W ] . Then G has a +6 W pairwise spanner on O ( W n | P | / ) edges. This follows from applying the +8 W construction of Ahmed et al. [3] (Appendix A, Al-gorithm 3), except we use the above +2 W subsetwise spanner instead of the +4 W subsetwisespanner construction given in [3] as a subroutine. Here we study a multi-level variant of graph spanners. We first define the problem: (cid:73)
Definition 3 (Multi-level weighted additive spanner) . Given a weighted graph G ( V, E ) withmaximum weight W , a nested sequence of subsets of vertices S ‘ ⊆ S ‘ − ⊆ . . . ⊆ S ⊆ V , and c ≥ , a multi-level additive spanner is a sequence of + cW subsetwise spanners G ‘ ⊆ G ‘ − ⊆ . . . ⊆ G ⊆ G , where G i is a subsetwise + cW spanner over S i . Observe that Definition 3 generalizes the subsetwise spanner, which is a special casewhere ‘ = 1. We measure the size of a multi-level spanner by its sparsity, defined bysparsity( { G i } ‘i =1 ) := P ‘i =1 | E ( G i ) | . The problem can equivalently be phrased in terms of priorities and rates: each vertex v ∈ S has a priority P ( v ) between 1 and ‘ (namely, P ( v ) = max { i : v ∈ S i } ), and we wishto compute a single subgraph containing edges of different rates such that for all u, v ∈ S ,there is a + cW spanner path consisting of edges of rate at least min { P ( u ) , P ( v ) } . With this,we will typically refer to the priority of v to denote the highest i such that v ∈ S i , or 0 if X:4 Multi-level Weighted Additive Spanners (a) (b)
Figure 1 (a) The rounding-up approach computes an optimal spanner at each level assuming anexact subroutine), so the sizes of the spanners on each level are at most that of the optimal solution(9 + 40 edges vs. 12 + 40). (b) However, when an edge is present in a top-level solution, it must bepresent in lower-level solutions. The rounding-up approach takes the union of the spanners in thebottom level; in this case, the sparsity of the rounded-up solution (9 + 48 vs. 12 + 40) is greaterthan that of the optimum. v S . In this section, we show that the multi-level version is not significantly harder thanthe ordinary “single-level” version: a subroutine which can compute an additive spannercan be used to compute a multi-level spanner whose sparsity is comparably good. Let OPTdenote the minimum sparsity over all candidate multi-level additive spanners.We first describe a simple rounding-up approach based on an algorithm by Charikar etal. [15] for the QoSMT problem, a similar generalization of the Steiner tree problem. For thisapproach, assume we have a subroutine which computes an exact or approximate single-levelsubsetwise spanner. Given v ∈ S , let P ( v ) ∈ [1 , ‘ ] denote the priority of v . The rounding-upapproach is as follows: for each v , round P ( v ) up to the nearest power of 2. This effectivelyconstructs a “rounded-up” instance where all vertices in S have priority either 1, 2, 4, . . . ,2 d log ‘ e . The sparsity of the optimum solution in the rounded-up instance is at most 2OPT;given the optimum solution to the original instance with sparsity OPT, a feasible solution tothe rounded-up instance with sparsity at most 2OPT can be obtained by rounding up therate of each edge to the nearest power of 2.For each i ∈ { , , , . . . , d log ‘ e } , use the subroutine to compute a level- i subsetwisespanner over all vertices whose rounded-up priority is at least i . The final multi-level additivespanner is obtained by taking the union of these computed spanners, by keeping an edge atthe highest level it appears in. (cid:73) Theorem 4.
Assuming an exact subsetwise spanner subroutine, the solution computed bythe rounding-up approach has sparsity at most · OPT.
This is proved using the same ideas as the 4 ρ -approximation for QoSMT [15]. Asmentioned earlier, in practice we use an approximation algorithm to compute the subsetwisespanner instead of computing the minimum spanner. (cid:73) Theorem 5.
There exists a ˜ O ( n/ p | S | ) -approximation algorithm to compute multi-levelweighted additive spanners with additive stretch W when W = O (log n ) . This follows from using the +2 W subsetwise construction in Section 2. The approximationratio of this subsetwise spanner algorithm is O ( nW/ p | S | ) as the construction produces . Ahmed, et al. XX:5 a spanner of size O ( nW p | S | ), while the sparsest additive spanner trivially has at least | S | − | S | ) edges.We now show that, under certain conditions, if we have a subroutine which computes asubsetwise spanner of G , S of size O ( n a | S | b ), a very naïve algorithm can be used to obtain amulti-level spanner also with sparsity O ( n a | S | b ). (cid:73) Theorem 6.
Suppose there is an absolute constant < α < such that | S i | ≤ α | S i − | forall i ∈ { , . . . , ‘ } . Then we can compute a multi-level spanner with sparsity O ( n a | S | b ) . Proof.
Consider the following simple construction: for each i ∈ { , , , . . . , ‘ } , computea level- i subsetwise spanner of size O ( n a | S i | b ). Consider the union of these spanners, bykeeping each edge at the highest level it appears. The sparsity of the returned multi-levelspanner is at mostsparsity( { G i } ) = O ( n a | S | b + 2 n a | S | b + 3 n a | S | b + . . . + ‘n a | S ‘ | b ) ≤ O ( n a | S | b (1 + 2 α b + 3 α b + . . . + ‘α ( ‘ − b ))= O ( n a | S | b )where we used the arithmetico-geometric series 1 + 2( α b ) + 3( α b ) + . . . = − α b ) which isconstant for fixed α , b . Note that 0 < α < b >
0, which implies 0 < α b < (cid:74) The assumption that | S i | ≤ α | S i − | for some constant α is fairly natural, as many realisticnetworks tend to have significantly fewer hubs than non-hubs. (cid:73) Corollary 7.
Under the assumption | S i | ≤ α | S i − | for all i ∈ { , . . . , ‘ } , there exists apoly-time algorithm which computes a multi-level +2 spanner of sparsity O ( n p | S | ) . Proof.
This follows by using the +2 construction by Cygan et al. [20] on O ( n p | S | ) edges asthe subroutine. (cid:74) To compute a minimum size additive spanner, we utilize a slight modification of the ILP in [4,Section 9], wherein we choose the specific distortion function f ( t ) = t + cW and minimize thesparsity rather than total weight of the spanner. For completeness, we present the full ILPfor computing a single-level additive subsetwise spanner below along with a brief descriptionof the multi-level extension. Here E represents the bidirected edge set, obtained by addingdirected edges ( u, v ) and ( v, u ) for each edge uv ∈ E . The binary variable x uv ( i,j ) is 1 if edge( i, j ) is included on the selected u - v path and 0 otherwise, and w ( e ) is the weight of edge e .Minimize X e ∈ E x e subject to (1) X ( i,j ) ∈ E x uv ( i,j ) w ( e ) ≤ dist G ( u, v ) + cW ∀ ( u, v ) ∈ S ; e = ij (2) X ( i,j ) ∈ Out ( i ) x uv ( i,j ) − X ( j,i ) ∈ In ( i ) x uv ( j,i ) = i = u − i = v ∀ ( u, v ) ∈ S ; ∀ i ∈ V (3) X ( i,j ) ∈ Out ( i ) x uv ( i,j ) ≤ ∀ ( u, v ) ∈ S ; ∀ i ∈ V (4) X:6 Multi-level Weighted Additive Spanners x uv ( i,j ) + x uv ( j,i ) ≤ x e ∀ ( u, v ) ∈ S ; ∀ e = { i, j } ∈ E (5) x e , x uv ( i,j ) ∈ { , } (6)Inequalities (3)–(4) enforce that for each u , v ∈ S , the selected edges corresponding to u , v form a path; inequality (2) enforces that the length of this path is at most dist G ( u, v ) + cW (note that W may be replaced with W ( u, v )). Inequality (5) ensures that if x uv ( i,j ) = 1 or x uv ( i,j ) = 1, then edge ij is taken.To generalize the ILP formulation to the multi-level problem, we take a similar set ofvariables for every level. The rest of the constraints are similar, except we define x ke = 1 ifedge e is present on level k and the variables x uv ( i,j ) are also indexed by level. We add theconstraint x ke ≤ x k − e for all k ∈ { , . . . , ‘ } which enforces that if edge e is present on level k , it is also present on all lower levels. Finally, the objective is to minimize the sparsity P ‘k =1 P e ∈ E x ke . In this section, we provide experimental results involving the rounding-up framework describedin Section 3. This framework needs a single level subroutine; we use the +2 W subsetwiseconstruction in Section 2 and the three pairwise +2 W ( · , · ), +4 W ( · , · ), +6 W constructionsprovided in [3] (see Appendix A). We generate multi-level instances and solve the instancesusing our exact algorithm and the four approximation algorithms. We consider naturalquestions about how the number of levels ‘ , number of vertices n , and decay rate of terminalswith respect to levels affect the running times and (experimental) approximation ratios,defined as the sparsity of the returned multi-level spanner divided by OPT.We used CPLEX 12.6.2 as an ILP solver in a high-performance computer for all exper-iments (Lenovo NeXtScale nx360 M5 system with 400 nodes). Each node has 192 GB ofmemory. We have used Python for implementing the algorithms and spanner constructions.Since we have run the experiment on a couple of thousand instances, we run the solver forfour hours. We run experiments first to test experimental approximation ratio vs. the parameters, andthen to test running time vs. parameters. Each set of experiments has several parameters:the graph generator, the number of levels ‘ , the number of vertices n , and how the size ofthe terminal sets S i (vertices requiring level or priority at least i ) decrease as i decreases.In what follows, we use the Erdős–Rényi (ER) [23], Watts–Strogatz (WS) [31], Barabási–Albert (BA) [9], and random geometric (GE) [29] models. We generate a set of small graphs(10 ≤ n ≤
40) and a set of large graphs (50 ≤ n ≤ of Erdős–Rényi graphs is relatively small. In our dataset, the range of the radius is 2-4.Hence, we also provide the results of random geometric graphs which have larger radius(4-12). The remaining results and the radius distribution of different generators are available Note that, one can show that the +2 W , +4 W , +8 W spanners in [3] are actually +2 W ( ., . ) , +4 W ( ., . )and +6 W spanners respectively by using a tighter analysis. The minimum over all v ∈ V of max w ∈ V d G ( v, w ) where d G ( v, w ) is the graph distance (by number ofedges, not total weight) between v and w . Ahmed, et al. XX:7 at the supplement Github link. We consider number of levels ‘ ∈ { , , } for small graphs, ‘ ∈ { , . . . , } for large graphs, and adopt two methods for selecting terminal sets: linearand exponential. A terminal set S with lowest priority of size n (1 − ‘ +1 ) in the linearcase and n in the exponential case is chosen uniformly at random. For each subsequentlevel, ‘ +1 vertices are deleted at random in the linear case, whereas half the remainingvertices are deleted in the exponential case. Levels/priorities and terminal sets are relatedvia S i = { v ∈ S : P ( v ) ≥ i } . We choose edge weights w ( e ) randomly, independently, anduniformly from { , , . . . , } .An experimental instance of the multi-level problem here is thus characterized by fourparameters: graph generator, number of vertices n , number of levels ‘ , and terminal selectionmethod TSM ∈ {
Linear,Exponential } . As there is randomness involved, we generatedfive instances for every choice of parameters (e.g., ER, n = 30, ‘ = 2, Linear ). For eachinstance of the small graphs, we compute the approximate solution using either the +2 W ,+2 W ( · , · ), +4 W , or +6 W spanner subroutine, and the exact solution using the ILP describedin Section 4. We compute the experimental approximation ratio by dividing the sparsity ofthe approximate solution by the sparsity of the optimum solution (OPT). For large graphs,we only compute the approximate solution. We consider different spanner constructions as the single level subroutine in the multi-levelspanner. We first consider the +2 W subsetwise construction (Section 2). +2 W Subsetwise Construction-based Approximation
We first describe the experimental results on Erdős–Rényi graphs w.r.t. n , ‘ , and terminalselection method in Figure 2. The average experimental ratio increases as n increases. Thisis expected since the theoretical approximation ratio of ˜ O ( n/ p | S | ) is proportional to n .The average and minimum experimental ratio does not change that much as the number oflevels increases; however, the maximum ratio increases. The experimental ratio of the linearterminal selection method is slightly better compared to that of the exponential method. Figure 2
Performance of the algorithm that uses +2 W subsetwise spanner as the single levelsolver on Erdős–Rényi graphs w.r.t. n , ‘ , and terminal selection method. +2 W ( · , · ) Pairwise Construction-based Approximation
We now consider the +2 W ( · , · ) pairwise construction [3] (Algorithm 1). We first describe theexperimental results on Erdős–Rényi graphs w.r.t. n , ‘ , and terminal selection method inFigure 3. The average experimental ratio increases as n increases. This is expected since thetheoretical approximation ratio is proportional to n . The average and minimum experimental X:8 Multi-level Weighted Additive Spanners ratio do not change that much as the number of levels increases, however, the maximumratio increases. The experimental ratio of the linear terminal selection method is also slightlybetter compared to that of the exponential method.
Figure 3
Performance of the algorithm that uses +2 W ( · , · ) pairwise spanner as the single levelsolver on Erdős–Rényi graphs w.r.t. n , ‘ , and terminal selection method. One major difference between the subsetwise and pairwise construction is the subsetwiseconstruction considers the (global) maximum edge weight W of the graph in the error. On theother hand, the + cW ( · , · ) spanners consider the (local) maximum edge weight in a shortestpath for each pair of vertices s, t . We provide a comparison between the global and localsettings.We describe the experimental results on Erdős–Rényi graphs w.r.t. n , ‘ , and the terminalselection method in Figure 4. The average experimental ratio increases as n increases forboth global and local settings. However, the ratio of the local setting is smaller compared tothat of the global setting. One reason for this difference is the solution to the global exactalgorithm is relatively smaller since the global setting considers larger errors. The ratio ofthe global setting increases as the number of levels increases and for the exponential terminalselection method. For the local setting, the ratio does not change that much. Figure 4
Performance of the global and local construction-based algorithms on Erdős–Rényigraphs w.r.t. n , ‘ , and terminal selection method. +4 W ( · , · ) Pairwise Construction-based Approximation
We now consider the +4 W ( · , · ) pairwise construction [3] (Algorithm 2) as a single levelsubroutine. We first describe the experimental results on Erdős–Rényi graphs w.r.t. n , ‘ ,and terminal selection method in Figure 5. The average experimental ratio increases as n increases. This is expected since the theoretical approximation ratio is proportional to n .The average experimental ratio does not change that much as the number of levels increases; . Ahmed, et al. XX:9 however, the maximum ratio increases. The experimental ratio of the linear terminal selectionmethod is also slightly better compared to that of the exponential method. Figure 5
Performance of the algorithm that uses +4 W ( · , · ) pairwise spanner as the single levelsolver on Erdős–Rényi graphs w.r.t. n , ‘ , and terminal selection method. +2 W ( · , · ) and +4 W ( · , · ) Setups
We now provide a comparison between the pairwise +2 W ( · , · ) and +4 W ( · , · ) construction-based approximation algorithms. We first describe the experimental results on Erdős–Rényigraphs w.r.t. n , ‘ , and the terminal selection method in Figure 6. The average experimentalratio increases as n increases for both +2 W ( · , · ) and +4 W ( · , · ) settings. As n increases,the ratio of the +4 W ( · , · ) construction-based algorithm decreases slightly. The +4 W ( · , · )construction-based algorithm slightly outperforms the +2 W ( · , · ) algorithm for ‘ = 3 andexponential selection method. Figure 6
Performance of the pairwise +2 W ( · , · ) and +4 W ( · , · ) construction-based algorithms onErdős–Rényi graphs w.r.t. n , ‘ , and terminal selection method. +6 W Pairwise Construction-based Approximation
We now consider the +6 W pairwise construction [3] (Algorithm 3) as a single level solver.We first describe the experimental results on Erdős–Rényi graphs w.r.t. n , ‘ , and terminalselection method in Figure 7. The average experimental ratio increases as n increases. Thisis expected since the theoretical approximation ratio is proportional to n . The averageexperimental ratio does not change that much as the number of levels increases; however,the maximum ratio increases. The maximum and average experimental ratios of the linearterminal selection method are slightly better compared to that of the exponential method. +2 W and +6 W Setups
We now provide a comparison between pairwise +2 W and +6 W construction-based approx-imation algorithms. We first describe the experimental results on Erdős–Rényi graphs w.r.t. X:10 Multi-level Weighted Additive Spanners
Figure 7
Performance of the algorithm that uses +6 W pairwise spanner as the single level solveron Erdős–Rényi graphs w.r.t. n , ‘ , and terminal selection method. n , ‘ , and the terminal selection method in Figure 8. The average experimental ratio increasesas n increases for both +2 W and +6 W settings. As the number of vertices increases, theratio of the +6 W construction-based algorithm gets smaller. This is expected since a largererror makes the problem easier to so. Similarly, as ‘ increases, the +6 W construction-basedalgorithm outperforms the +2 W algorithm. The average experimental ratio of the +6 W construction based algorithm is smaller both in the linear and exponential terminal selectionmethods. Figure 8
Performance of the pairwise +2 W and +6 W construction-based algorithms on Erdős–Rényi graphs w.r.t. n , ‘ , and terminal selection method. We generate some large instances on up to 500 vertices and run different multi-level spanneralgorithms on them. We use n = { , , , . . . , } and ‘ = { , , , . . . , } . We describethe experimental results on Erdős–Rényi graphs w.r.t. n , ‘ , and the terminal selection methodin Figure 9. We are comparing four multi-level algorithms, namely those using the +2 W subsetwise and +2 W ( · , · ), +4 W ( · , · ), +6 W pairwise constructions [3] as subroutines with P = S × S . Since computing the optimal solution exactly via ILP is computationallyexpensive on large instances, we report the ratio in terms of relative sparsity, defined asthe sparsity of the multi-level spanner returned by one algorithm divided by the minimumsparsity over the spanners returned by all four. The ratio of the +6 W construction basedalgorithm is lowest and the +2 W construction based algorithm is highest. This is expectedsince a higher additive error generally reduces the number of edges needed. Overall the ratiodecreases as n increases. This is because the significance of small additive error reduces asthe graph size and distances get larger. The relative ratio for the +2 W construction increasesas ‘ increases, and for the exponential terminal selection method. . Ahmed, et al. XX:11 Figure 9
Performance of different approximation algorithms on large Erdős–Rényi graphs w.r.t. n , ‘ , and terminal selection method. It is worth mentioning that the +2 subsetwise spanner [20] and +2 W subsetwise spanner(Section 2) begin with a clustering phase, while the algorithms described in Appendix A beginwith a d -light initialization. In d -light initialization, we add the d lightest edges incident toeach vertex; these edges tend to be on shortest paths. In practice, there may be relatively fewedges which appear on shortest paths and some of these edges might be redundant. Hence,we compute +2 W ( · , · ) spanners with different values of d . We describe the experimentalresults on Erdős–Rényi graphs w.r.t. n , ‘ , and the terminal selection method in Figure 10.We have computed the ratio as described in Section 5.2.8. From the figures, we see that aswe reduce the value of d exponentially, the ratio decreases. This experiment suggests that wecan exponentially reduce the value of d and take the solution that has the minimum numberof edges. This will introduce a log d factor in the running time of the algorithm; however,the solution size will be reduced. Figure 10
Impact of different values of d on large Erdős–Rényi graphs w.r.t. n , ‘ , and terminalselection method. We now provide the running times of the different algorithms. We show the running time ofthe ILP on Erdős–Rényi graphs w.r.t. n , ‘ , and terminal selection method in Figure 11. Therunning time of the ILP increases exponentially as n increases, as expected. The executiontime of a single level instance with 45 vertices is more than 64 hours using a 28 core processor.Hence, we kept the number of vertices less than or equal to 40 for our small graphs. Theexperimental running time should increase as ‘ increases, but we do not see that pattern inthese plots because some of the instances were not able to finish in four hours.We provide the experimental running time of the approximation algorithm on Erdős–Rényi graphs in Figure 12. The running time of the +2 W construction-based algorithm isthe largest. Overall, the running time increases as n increases. There is no straightforward X:12 Multi-level Weighted Additive Spanners
Figure 11
Running time of all exact algorithms on Erdős–Rényi graphs w.r.t. n , ‘ , and terminalselection method. relation between the running time and ‘ . Although the number of calls to the single levelsubroutine increases as ‘ increases, it also depends on the size of the subset in a single level.Hence, if the subset sizes are larger, then it may take longer for small ‘ . The running time ofthe linear method is larger. Figure 12
Running time of all approximation algorithms on large Erdős–Rényi graphs w.r.t. n , ‘ ,and terminal selection method. The running times appear reasonable in other settings too; see the supplemental Githubrepository for details and experimental results.
We have provided a framework where we can use different spanner subroutines to computemulti-level spanners of varying additive error. We additionally introduced a generalization ofthe +2 subsetwise spanner [20] to integer edge weights, and illustrate that this can reducethe +8 W error in [3] to +6 W . A natural question is to provide an approximation algorithmthat can handle different additive error for different levels. We also provided an ILP to findthe exact solution for both global and local settings. Using the ILP and the given spannerconstructions, we have run experiments and provided the experimental approximation ratioover the graphs we generated. The experimental results suggest that the +2 W clustering-based approach is slower than the initialization based approaches. We provided a method ofchanging the initialization parameter d which reduces the sparsity in practice. References Amir Abboud and Greg Bodwin. The 4/3 additive spanner exponent is tight. Journal of theACM (JACM), 64(4):1–20, 2017. Abu Reyan Ahmed, Patrizio Angelini, Faryad Darabi Sahneh, Alon Efrat, David Glickenstein,Martin Gronemann, Niklas Heinsohn, Stephen Kobourov, Richard Spence, Joseph Watkins, andAlexander Wolff. Multi-level Steiner trees. In 17th International Symposium on Experimental . Ahmed, et al. XX:13
Algorithms, (SEA), pages 15:1–15:14, 2018. URL: https://doi.org/10.4230/LIPIcs.SEA.2018.15 , doi:10.4230/LIPIcs.SEA.2018.15 . Reyan Ahmed, Greg Bodwin, Faryad Darabi Sahneh, Stephen Kobourov, and Richard Spence.Weighted additive spanners. In Isolde Adler and Haiko Müller, editors, Graph-TheoreticConcepts in Computer Science, pages 401–413, Cham, 2020. Springer International Publishing. Reyan Ahmed, Greg Bodwin, Faryad Darabi Sahneh, Keaton Hamm, Mohammad Javad LatifiJebelli, Stephen Kobourov, and Richard Spence. Graph spanners: A tutorial review. ComputerScience Review, 37:100253, 2020. Reyan Ahmed, Faryad Darabi Sahneh, Keaton Hamm, Stephen Kobourov, and RichardSpence. Kruskal-Based Approximation Algorithm for the Multi-Level Steiner Tree Problem.In Fabrizio Grandoni, Grzegorz Herman, and Peter Sanders, editors, 28th Annual EuropeanSymposium on Algorithms (ESA 2020), volume 173 of Leibniz International Proceedings inInformatics (LIPIcs), pages 4:1–4:21, Dagstuhl, Germany, 2020. Schloss Dagstuhl–Leibniz-Zentrum für Informatik. URL: https://drops.dagstuhl.de/opus/volltexte/2020/12870 , doi:10.4230/LIPIcs.ESA.2020.4 . Donald Aingworth, Chandra Chekuri, Piotr Indyk, and Rajeev Motwani. Fast estimation ofdiameter and shortest paths (without matrix multiplication). SIAM Journal on Computing,28:1167–1181, 04 1999. doi:10.1137/S0097539796303421 . Ingo Althöfer, Gautam Das, David Dobkin, and Deborah Joseph. Generating sparse spannersfor weighted graphs. In Scandinavian Workshop on Algorithm Theory (SWAT), pages 26–37,Berlin, Heidelberg, 1990. Springer Berlin Heidelberg. Anantaram Balakrishnan, Thomas L. Magnanti, and Prakash Mirchandani. Modeling andheuristic worst-case performance analysis of the two-level network design problem. ManagementSci., 40(7):846–867, 1994. doi:10.1287/mnsc.40.7.846 . Albert-László Barabási and Réka Albert. Emergence of scaling in random networks. science,286(5439):509–512, 1999. Surender Baswana, Telikepalli Kavitha, Kurt Mehlhorn, and Seth Pettie. Additive spannersand ( α , β )-spanners. ACM Transactions on Algorithms (TALG), 7(1):5, 2010. Greg Bodwin. Linear size distance preservers. In Proceedings of the Twenty-Eighth AnnualACM-SIAM Symposium on Discrete Algorithms (SODA), pages 600–615. Society for Industrialand Applied Mathematics, 2017. Greg Bodwin. A note on distance-preserving graph sparsification. arXiv preprintarXiv:2001.07741, 2020. Greg Bodwin and Virginia Vassilevska Williams. Better distance preservers and additivespanners. In Proceedings of the Twenty-seventh Annual ACM-SIAM Symposium on DiscreteAlgorithms (SODA), pages 855–872. Society for Industrial and Applied Mathematics, 2016.URL: http://dl.acm.org/citation.cfm?id=2884435.2884496 . Hsien-Chih Chang, Pawel Gawrychowski, Shay Mozes, and Oren Weimann. Near-OptimalDistance Emulator for Planar Graphs. In Proceedings of 26th Annual European Symposiumon Algorithms (ESA 2018), volume 112, pages 16:1–16:17, 2018. M. Charikar, J. Naor, and B. Schieber. Resource optimization in QoS multicast routing ofreal-time multimedia. IEEE/ACM Transactions on Networking, 12(2):340–348, April 2004. doi:10.1109/TNET.2004.826288 . Shiri Chechik. New additive spanners. In Proceedings of the twenty-fourth annual ACM-SIAMsymposium on Discrete algorithms (SODA), pages 498–512. Society for Industrial and AppliedMathematics, 2013. Eden Chlamtáč, Michael Dinitz, Guy Kortsarz, and Bundit Laekhanukit. Approximating span-ners and directed steiner forest: Upper and lower bounds. In Proceedings of the Twenty-EighthAnnual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 534–553. SIAM, 2017. Julia Chuzhoy, Anupam Gupta, Joseph (Seffi) Naor, and Amitabh Sinha. On the approx-imability of some network design problems. ACM Trans. Algorithms, 4(2):23:1–23:17, 2008. doi:10.1145/1361192.1361200 . X:14 Multi-level Weighted Additive Spanners Don Coppersmith and Michael Elkin. Sparse sourcewise and pairwise distance preservers.SIAM Journal on Discrete Mathematics, 20(2):463–501, 2006. Marek Cygan, Fabrizio Grandoni, and Telikepalli Kavitha. On pairwise spanners. InProceedings of 30th International Symposium on Theoretical Aspects of Computer Science(STACS 2013), volume 20, pages 209–220, 2013. URL: http://drops.dagstuhl.de/opus/volltexte/2013/3935 , doi:10.4230/LIPIcs.STACS.2013.209 . Michael Elkin, Yuval Gitlitz, and Ofer Neiman. Almost shortest paths and PRAM distanceoracles in weighted graphs. arXiv preprint arXiv:1907.11422, 2019. Michael Elkin, Yuval Gitlitz, and Ofer Neiman. Improved weighted additive spanners. arXivpreprint arXiv:2008.09877, 2020. Paul Erdős and Alfréd Rényi. On random graphs, i. Publicationes Mathematicae (Debrecen),6:290–297, 1959. Marek Karpinski, Ion I. Mandoiu, Alexander Olshevsky, and Alexander Zelikovsky. Improvedapproximation algorithms for the quality of service multicast tree problem. Algorithmica,42(2):109–120, 2005. doi:10.1007/s00453-004-1133-y . Telikepalli Kavitha. New pairwise spanners. Theory of Computing Systems, 61(4):1011–1036, Nov 2017. URL: https://doi.org/10.1007/s00224-016-9736-7 , doi:10.1007/s00224-016-9736-7 . Telikepalli Kavitha and Nithin M. Varma. Small stretch pairwise spanners and ap-proximate d -preservers. SIAM Journal on Discrete Mathematics, 29(4):2239–2254, 2015.URL: https://doi.org/10.1137/140953927 , arXiv:https://doi.org/10.1137/140953927 , doi:10.1137/140953927 . Arthur Liestman and Thomas Shermer. Additive graph spanners. Networks, 23:343 – 363, 071993. doi:10.1002/net.3230230417 . Prakash Mirchandani. The multi-tier tree problem. INFORMS J. Comput., 8(3):202–218,1996. Mathew Penrose. Random geometric graphs. Number 5. Oxford university press, 2003. Seth Pettie. Low distortion spanners. ACM Transactions on Algorithms (TALG), 6(1):7,2009. Duncan J Watts and Steven H Strogatz. Collective dynamics of ‘small-world’networks. Nature,393(6684):440, 1998. . Ahmed, et al. XX:15
A Pairwise spanner constructions [3]
Here, we provide pseudocode (Algorithms 1–3) describing the +2 W , +4 W , and +8 W pairwisespanner constructions by Ahmed et al. [3]. These spanner constructions have a similartheme: first, construct a d -light initialization, which is a subgraph H obtained by addingthe d lightest edges incident to each vertex (or all edges if the degree is at most d ). Then foreach pair ( s, t ) ∈ P , consider the number of edges in π ( s, t ) which are absent in the currentsubgraph H . Add π ( s, t ) to H if the number of missing edges is at most some threshold ‘ ,or otherwise randomly sample vertices and either add a shortest path tree rooted at thesevertices, or construct a subsetwise spanner among them. Algorithm 1 +2 W pairwise spanner [3] d = | P | / , ‘ = n/ | P | / H = d -light initialization let m be the number of missing edges needed for a valid construction while m > nd do for ( s, t ) ∈ P do x = | E ( π ( s, t )) \ E ( H ) | if x ≤ ‘ then add π ( s, t ) to H R = random sample of vertices, each with probability 1 / ( ‘d ) for r ∈ R do add a shortest path tree rooted at r to each vertex add the m missing edges return H B Experiments
In the main paper, we mostly discussed the experimental results of Erdős–Rényi graphs. Inthis section, we provide the results of random geometric graphs. The plots of Watts–Strogatzand Barabási–Albert graphs are available in the Github repository.
B.1 The +2 W Subsetwise Construction-based Approximation
We describe the experimental results on random geometric graphs w.r.t. n , ‘ , and terminalselection methods in Figure 13. In both cases the average ratio increases as n and ‘ increases.The average ratio is relatively lower for the linear terminal selection method. Using a tighter analysis or the above +2 W subsetwise construction in place of the +4 W construction inAlgorithm 3, the additive error can be improved to +2 W ( · , · ), +4 W ( · , · ), and +6 W for integer edgeweights. X:16 Multi-level Weighted Additive Spanners
Algorithm 2 +4 W pairwise spanner [3] d = | P | / , ‘ = n/ | P | / H = d -light initialization let m be the number of missing edges needed for a valid construction while m > nd do for ( s, t ) ∈ P do x = | E ( π ( s, t )) \ E ( H ) | if x ≤ ‘ then add π ( s, t ) to H else if x ≥ n/d then R = random sample of vertices, each w.p. d /n add a shortest path tree rooted at each r ∈ R else add first ‘ and last ‘ missing edges of π ( s, t ) to H R = i.i.d. sample of vertices, w.p. 1 / ( ‘d ) for each r, r ∈ R do if exists r → r path missing ≤ n/d edges then add to H a shortest r → r path among paths missing ≤ n/d edges add the m missing edges return H Algorithm 3 +8 W pairwise spanner [3] d = | P | / , ‘ = n/ | P | / H = d -light initialization let m be the number of missing edges needed for a valid construction while m > nd do for ( s, t ) ∈ P do x = | E ( π ( s, t )) \ E ( H ) | if x ≤ ‘ then add π ( s, t ) to H else add first ‘ and last ‘ missing edges of π ( s, t ) to H R = random sample of vertices, each w.p. 1 / ( ‘d ) H = +4 W subsetwise ( R × R )-spanner [3] add H to H add the m missing edges return H Figure 13
Performance of the algorithm that uses +2 W subsetwise spanner as the single levelsolver on random geometric graphs w.r.t. n , ‘ , and terminal selection method. . Ahmed, et al. XX:17 B.2 The +2 W ( · , · ) Pairwise Construction-based Approximation
We describe the experimental results on random geometric graphs w.r.t. n , ‘ , and terminalselection method in Figure 14. The average experimental ratio increases as n increases. Themaximum ratio increases as ‘ increases. Again, the experimental ratio of the linear terminalselection method is relatively smaller compared to the exponential method. Figure 14
Performance of the algorithm that uses +2 W ( · , · ) pairwise spanner as the single levelsolver on random geometric graphs w.r.t. n , ‘ , and terminal selection method. B.3 Comparison between Global and Local Setups
We describe the experimental results on random geometric graphs w.r.t. n , ‘ , and theterminal selection method in Figure 15. The ratio of the local setting is smaller compared tothe global setting. Figure 15
Performance of the global and local construction-based algorithms on random geometricgraphs w.r.t. n , ‘ , and terminal selection method. B.4 The +4 W ( · , · ) Pairwise Construction-based Approximation
We describe the experimental results on random geometric graphs w.r.t. n , ‘ , and terminalselection method in Figure 16. The experimental ratio increases as the number of verticesincreases. The maximum ratio increases as the number of levels increases. Again, theexperimental ratio of the linear terminal selection method is relatively smaller compared tothe exponential method. X:18 Multi-level Weighted Additive Spanners
Figure 16
Performance of the algorithm that uses +4 W ( · , · ) pairwise spanner as the single levelsolver on random geometric graphs w.r.t. n , ‘ , and terminal selection method. B.5 Comparison between +2 W ( · , · ) and +4 W ( · , · ) Setups
We describe the experimental results on random geometric graphs w.r.t. n , ‘ , and theterminal selection method in Figure 17. As n increases the average ratio of +4 W ( · , · )-basedapproximation algorithm becomes smaller compared to the +2 W ( · , · )-based algorithm. Theaverage ratio of +4 W ( · , · ) is relatively smaller for the exponential terminal selection method. Figure 17
Performance of the pairwise +2 W ( · , · ) and +4 W ( · , · ) construction-based algorithmson random geometric graphs w.r.t. n , ‘ , and terminal selection method. B.6 The +6 W Pairwise Construction-based Approximation
We describe the experimental results on random geometric graphs w.r.t. n , ‘ , and terminalselection method in Figure 18. The experimental ratio increases as the number of verticesincreases. The maximum ratio increases as the number of levels increases. Again, theexperimental ratio of the linear terminal selection method is relatively smaller compared tothe exponential method. Figure 18
Performance of the algorithm that uses +6 W ( · , · ) pairwise spanner as the single levelsolver on random geometric graphs w.r.t. n , ‘ , and terminal selection method. . Ahmed, et al. XX:19 B.7 Comparison between +2 W and +6 W Setups
We describe the experimental results on random geometric graphs w.r.t. n , ‘ , and theterminal selection method in Figure 19. We can see that as n gets larger the ratio of +6 W gets smaller. The situation is similar when ‘ increases. Figure 19
Performance of the pairwise +2 W and +6 W construction-based algorithms on randomgeometric graphs w.r.t. n , ‘ , and terminal selection method. B.8 Experiment on Large Graphs
We describe the experimental results on random geometric graphs w.r.t. n , ‘ , and theterminal selection method in Figure 20. Figure 20
Performance of different approximation algorithms on large random geometric graphsw.r.t. n , ‘ , and terminal selection method. B.9 Impact of Initial Parameters
We describe the experimental results on random geometric graphs w.r.t. n , ‘ , and the terminalselection method in Figure 21. Again, the experiment suggests that we can exponentiallyreduce the value of d and take the solution that has a minimum number of edges. Figure 21
Impact of different values of d on large random geometric graphs w.r.t. n , ‘‘