# Approximation algorithms and an integer program for multi-level graph spanners

Given a weighted graph G(V,E) and t > 1, a subgraph H is a t--spanner of G if the lengths of shortest paths in G are preserved in H up to a multiplicative factor of t. The subsetwise spanner problem aims to preserve distances in G for only a subset of the vertices. We generalize the minimum-cost subsetwise spanner problem to one where vertices appear on multiple levels, which we call the multi-level graph spanner (MLGS) problem, and describe two simple heuristics. Applications of this problem include road/network building and multi-level graph visualization, especially where vertices may require different grades of service. We formulate a 0--1 integer linear program (ILP) of size O(|E||V|^2) for the more general minimum pairwise spanner problem, which resolves an open question by Sigurd and Zachariasen on whether this problem admits a useful polynomial-size ILP. We extend this ILP formulation to the MLGS problem, and evaluate the heuristic and ILP performance on random graphs of up to 100 vertices and 500 edges.

## Authors

• 12 publications
• 15 publications
• 3 publications
• 38 publications
• 10 publications
• 10 publications
• ### A General Framework for Multi-level Subsetwise Graph Sparsifiers

Given an undirected weighted graph $G(V,E)$, a subsetwise sparsifier ove...
05/02/2019 ∙ by Reyan Ahmed, et al. ∙ 0

• ### Multi-level Weighted Additive Spanners

Given a graph G = (V,E), a subgraph H is an additive +β spanner if _H(u,...
02/11/2021 ∙ by Reyan Ahmed, et al. ∙ 0

• ### Spanner Approximations in Practice

A multiplicative α-spanner H is a subgraph of G=(V,E) with the same vert...
07/05/2021 ∙ by Markus Chimani, et al. ∙ 0

• ### Kruskal-based approximation algorithm for the multi-level Steiner tree problem

We study the multi-level Steiner tree problem: a generalization of the S...
02/15/2020 ∙ by Reyan Ahmed, et al. ∙ 0

• ### Multi-Level Steiner Trees

In the classical Steiner tree problem, one is given an undirected, conne...
04/08/2018 ∙ by Reyan Ahmed, et al. ∙ 0

• ### Adaptive Community Search in Dynamic Networks

Community search is a well-studied problem which, given a static graph a...
11/10/2020 ∙ by Ioanna Tsalouchidou, et al. ∙ 0

• ### Dynamic Multilevel Graph Visualization

We adapt multilevel, force-directed graph layout techniques to visualizi...
12/10/2007 ∙ by Todd L. Veldhuizen, et al. ∙ 0

##### This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

## 1 Introduction

Given an undirected edge-weighted graph and a real number , a subgraph is a (multiplicative) –spanner of if the lengths of shortest paths in are preserved in up to a multiplicative factor of ; that is, for all , where is the length of the shortest path from to in . We refer to as the stretch factor of . Peleg et al. [12] show that determining if there exists a –spanner of with or fewer edges is NP–complete. Further, it is NP–hard to approximate the (unweighted) –spanner problem to within a factor of , even when restricted to bipartite graphs [15].

In the pairwise spanner problem [11], distances only need to be preserved for a subset of pairs of vertices. Thus, the classical –spanner problem is a special case of the pairwise spanner problem where . The subsetwise spanner problem is a special case of the pairwise spanner problem where for some ; that is, distances need only be preserved between vertices in [11]. The case is known as the pairwise distance preserver or sourcewise distance preserver problem, respectively[10]. The subsetwise spanner problem where is arbitrarily large is known as the Steiner tree problem on graphs.

### 1.1 Multi-level graph spanners

In many network design problems, vertices or edges come with a natural notion of priority, grade of service, or level; see Fig. 1. For example, consider the case of rebuilding a transportation infrastructure network after a natural disaster. Following such an event, the rebuilding process may wish to prioritize connections between important buildings such as hospitals or distribution centers, making these higher level terminals, while ensuring that no person must travel an excessive distance to reach their destination. Such problems have been referred to by names such as hierarchical network design, grade of service problems, multi-level, multi-tier, and have applications in network routing and visualization.

Similar to other graph problems which generalize to multiple levels or grades of service [8], we extend the subsetwise spanner problem to the multi-level graph spanner (MLGS) problem:

###### Definition 1

[Multi-level graph spanner (MLGS) problem] Given a graph with positive edge weights , a nested sequence of terminals, , and a real number , compute a minimum-cost sequence of spanners , where is a subsetwise –spanner for with stretch factor for . The cost of a solution is defined as the sum of the edge weights on each graph , i.e., .

We refer to and as the terminals and the graph on level . A more general version of the MLGS problem can involve different stretch factors on each level or a more general definition of cost, but for now we use the same stretch factor for each level.

An equivalent formulation of the MLGS problem which we use interchangeably involves grades of service: given with edge weights, and required grades of service , compute a single subgraph with varying grades of service on the edges, with the property that for all , if and each have required a grade of service greater than or equal to , then there exists a path in from to using edges with a grade of service greater than or equal to , and whose length is at most . Thus, , , and so on. If denotes the grade of edge (or the number of levels appears in), then the cost of a solution is equivalently , that is, edges with a higher grade of service incur a greater cost. This interpretation makes it clear that more important vertices (e.g., hubs) are connected with higher quality edges; see example instance and solution in Fig. 2.

If is arbitrarily large, the MLGS problem reduces to the multi-level Steiner tree (MLST) problem[1]. However it is worth noting that the problem of computing or approximating spanners is significantly harder than that of computing Steiner trees, and that a Steiner tree of may be an arbitrarily poor spanner; a cycle on vertices with one edge removed is a possible Steiner tree of , but is only a -spanner of . The techniques used here have similarities to those used in the MLST problem, but more sophisticated methods are needed as well, including the use of approximate distance preservers and a new ILP formulation for the pairwise spanner problem.

### 1.2 Related work

Spanners and variants thereof have been studied for at least three decades, so we focus on results relating to pairwise or subsetwise spanners. Althöfer et al. [2] provide a simple greedy algorithm that constructs a multiplicative –spanner given a graph and a real number . The greedy algorithm sorts edges in by nondecreasing weight, then for each , computes the shortest path from to in the current spanner, and adds the edge to the spanner if the weight of is greater than . The resulting subgraph is a –spanner for . The main result of [2] is that, given a weighted graph and , there is a greedy –spanner containing at most edges, and whose weight is at most where denotes the weight of a minimum spanning tree of .

Sigurd and Zachariasen [17] present an ILP formulation for the minimum-weight pairwise spanner problem (see Section 3), and show that the greedy algorithm [2] performs well on sparse graphs of up to 64 vertices. Álvarez-Miranda and Sinnl [3] present a mixed ILP formulation for the tree –spanner problem, which asks for a spanning tree of a graph with the smallest stretch factor .

Dinitz et al. [13] provide a flow-based linear programming (LP) relaxation to approximate the directed spanner problem. Their LP formulation is similar to that in [17]; however, they provide an approximation algorithm which relaxes their ILP, whereas the previous formulation was used to compute spanners to optimality. Additionally, the LP formulation applies to graphs of unit edge cost; they later take care of it in their rounding algorithm by solving a shortest path arborescence problem. They provide a –approximation algorithm for the directed –spanner problem for , which is the first sublinear approximation algorithm for arbitrary edge lengths. Bhattacharyya et al. [6] provide a slightly different formulation to approximate –spanners as well as other variations of this problem. They provide a polynomial time –approximation algorithm for the directed –spanner problem. Berman et al. [5] provide an alternative randomized LP rounding schemes that lead to better approximation ratios. They improved the approximation ratio to where the approximation ratio of the algorithm provided by Dinitz et al. [13] was . They have also improved the approximation ratio for the important special case of directed 3–spanners with unit edge lengths.

There are several results on multi-level or grade-of-service Steiner trees, e.g., [1, 4, 8, 9, 16], while multi-level spanner problems have not been studied yet.

## 2 Approximation algorithms for MLGS

Here, we assume an oracle subroutine that computes an optimal –spanner, given a graph , subset , and . The intent is to determine if approximating MLGS is significantly harder than the subsetwise spanner problem. We formulate simple bottom-up and top-down approaches for the MLGS problem.

### 2.1 Oracle bottom-up approach

The approach is as follows: compute a minimum subsetwise –spanner of with stretch factor . This immediately induces a feasible solution to the MLGS problem, as one can simply copy each edge from the spanner to every level (or, in terms of grades of service, assign grade to each spanner edge). We then prune edges that are not needed on higher levels. It is easy to show that the solution returned has cost no worse than times the cost of the optimal solution. Let OPT denote the cost of the optimal MLGS for a graph . Let denote the cost of a minimum subsetwise –spanner for level with stretch , and let BOT denote the cost computed by the bottom-up approach. If no pruning is done, then .

###### Theorem 2.1

The oracle bottom-up algorithm described above yields a solution that satisfies .

###### Proof

We know , since the lowest-level graph is a –spanner whose cost is at least . Further, we have if no pruning is done. Then , so .

The ratio of is asymptotically tight; an example can be constructed by letting be a cycle containing vertices and all edges of cost 1. Let two adjacent vertices in appear in , while all vertices appear in , as shown in Figure 3. As , the ratio approaches . Note that in this example, no edges can be pruned without violating the –spanner requirement.

We give a simple heuristic that attempts to “prune” unneeded edges without violating the –spanner requirement. Note that any pruning strategy may not prune any edges, as a worst case example (Figure 3) cannot be pruned. Let be the –spanner computed by the bottom-up approach. To compute a –spanner using the edges from , we can compute a distance preserver of over terminals in . One simple strategy is to use shortest paths as explained below.

Even more efficient pruning is possible through the distant preserver literature [10, 7]. A well-known result of distant preservers is due to the following theorem:

###### Theorem 2.2 ([10])

Given with , and , there exists a subgraph with edges such that for all we have .

The above theorem hints at a sparse construction of simply by letting . Given , let be a distance preserver of over the terminals , for all . An example is to let be the union of all shortest paths (in ) over vertices . The result is clearly a feasible solution to the MLGS problem, as the shortest paths are preserved exactly from , so each is a –spanner of with stretch factor .

### 2.2 Oracle top-down approach

A simple top-down heuristic that computes a solution is as follows: let be the minimum-cost –spanner over terminals with stretch factor , and cost . Then compute a minimum cost –spanner over , and let be the union of this spanner and . Continue this process, where is the union of the minimum cost –spanner and . Clearly, this produces a feasible solution to the MLGS problem.

The solution returned by this approach, with cost denoted by TOP, is not worse than times the optimal. Define and OPT as before. Define to be the cost of edges on level but not level in the optimal MLGS solution, so that . Define analogously.

###### Theorem 2.3

The oracle top-down algorithm described above yields an approximation that satisfies the following:

###### Proof

Inequality (i) is true by definition, as we compute an optimal –spanner whose cost is , while is the cost of some -spanner. For (ii), note that , with equality when the minimum-cost –spanner and are disjoint. The spanner of cost is a feasible –spanner, so , which shows (ii).

To show (iii), note that (i) and (ii) imply

 TOP =ℓTOPℓ+(ℓ−1)TOPℓ−1+…+% TOP1 ≤ℓOPTℓ+(ℓ−1)(OPTℓ−1+OPTℓ)+…+(OPT1+OPT2+…+OPTℓ) =ℓ(ℓ+1)2OPTℓ+(ℓ−1)ℓ2OPTℓ−1+…+1⋅22OPT1 ≤ℓ+12OPT,

as by definition .

The ratio is tight as illustrated in Figure 3, left.

### 2.3 Combining top-down and bottom-up

Again, assume we have access to an oracle that computes a minimum weight –spanner of an input graph with given stretch factor . A simple combined method, similar to [1], is to run the top-down and bottom-up approaches for the MLGS problem, and take the solution with minimum cost. This has a slightly better approximation ratio than either of the two approaches.

###### Theorem 2.4

The solution whose cost is is not worse than times the cost OPT of the optimal MLGS.

The proof is given in Appendix 0.A.

### 2.4 Heuristic subsetwise spanners

So far, we have assumed that we have access to an optimal subsetwise spanner given by an oracle. Here we propose a heuristic algorithm to compute subsetwise spanner. The key idea is to apply the greedy spanner to an auxiliary complete graph with terminals as its vertices and the shortest distance between terminals as edge weights. Then, we apply the distance preserver discussed in Theorem 2.2 to construct a subsetwise spanner.

###### Theorem 2.5

Given graph , stretch factor , and subset , there exists a –spanner for with stretch factor and edges.

###### Proof

The spanner may be constructed as follows:

1. Construct the terminal complete graph whose vertices are , such that the weight of each edge in is the length of the shortest path connecting them in , i.e., .

2. Construct a greedy spanner of . According to [2], this graph has edges. Let .

3. Apply Theorem 2.2 to obtain a subgraph of such that for all we have . Therefore, for arbitrary we get .

4. Finally, let shortest-path be the collection of edges in the shortest path from to in , and

 E=⋃(u,v)∈P{e∈E|e∈shortest-path(u,v).}

According to Theorem 2.2, the number of edges in the constructed spanner is .

Hence, we may replace the oracle in the top-down and bottom-up approaches (Sections 2.1-2.2) with the above heuristic; we call the resulting algorithms heuristic top-down and heuristic bottom-up. We analyze the performance of all algorithms on several types of graphs.

Incorporating the heuristic subsetwise spanner in our top-down and bottom up heuristics has two implications. First, the size of the final MLGS is dominated by the size of the spanner at the bottom level, i.e., . Second, since the greedy spanner algorithm used in the above subsetwise spanner can produce spanners that are more costly than the optimal solution, the same applies to the subsetwise spanner. Our experimental results, however, indicate that the heuristic approaches are very close to the optimal solutions obtained via our ILP.

## 3 Integer linear programming (ILP) formulations

We describe the original ILP formulation for the pairwise spanner problem [17]. Let be the set of vertex pairs; recall that the –spanner problem is a special case where . Here we will use unordered pairs of distinct vertices, so in the –spanner problem we have instead of . This ILP formulation uses paths as decision variables. Given , denote by the set of paths from to of cost no more than , and denote by the union of all such paths, i.e., . Given a path and edge , let if is on path , and otherwise. Let if is an edge in the pairwise spanner , and otherwise. Given , let if path is in the spanner, and zero otherwise. An ILP formulation for the pairwise spanner problem is given below.

 \allowdisplaybreaksMinimize∑e∈Ecexe % subject to (1) ∑p∈Puvypδep ≤xe ∀e∈E;∀(u,v)∈K (2) ∑p∈Puvyp ≥1 ∀(u,v)∈K (3) xe ∈{0,1} ∀e∈E (4) yp ∈{0,1} ∀p∈P (5)

Constraint (3) ensures that for each pair , at least one –spanner path is selected, and constraint (2) enforces that on the selected - path, every edge along the path appears in the spanner. The main drawback of this ILP is that the number of path variables is exponential in the size of the graph. The authors use delayed column generation by starting with a subset of paths, with the starting condition that for each , at least one –spanner path in is in . The authors leave as an open question whether this problem admits a useful polynomial-size ILP.

We introduce a 0-1 ILP formulation for the pairwise –spanner problem based on multicommodity flow, which uses variables and constraints, where . Define , , , , and as before. Note that can be computed in advance, using any all-pairs shortest path (APSP) method.

Direct the graph by replacing each edge with two edges and of weight . Let be the set of all directed edges, i.e., . Given , and an unordered pair of vertices , let if edge is included in the selected - path in the spanner , and 0 otherwise. This definition of path variables is similar to that by Álvarez-Miranda and Sinnl [3] for the tree –spanner problem. We select a total order of all vertices so that the path constraints (8)–(9) are well-defined. This induces binary variables, or variables in the standard –spanner problem. Note that if and are connected by multiple paths in of length , we need only set for edges along some path. Given , let and denote the set of incoming and outgoing edges for in . In (7)–(11) we assume in the total order, so spanner paths are from to . An ILP formulation for the pairwise spanner problem is as follows.

 \allowdisplaybreaksMinimize∑e∈Ecexe % subject to (6) ∑(i,j)∈E′xuv(i,j)ce ≤t⋅dG(u,v) ∀(u,v)∈K;e={i,j} (7) ∑(i,j)∈Out(i)xuv(i,j)−∑(j,i)∈In(i)xuv(j,i) =⎧⎨⎩1i=u−1i=v0else ∀(u,v)∈K;∀i∈V (8) ∑(i,j)∈Out(i)xuv(i,j) ≤1 ∀(u,v)∈K;∀i∈V (9) xuv(i,j)+xuv(j,i) ≤xe ∀(u,v)∈K;∀e={i,j}∈E (10) xe,xuv(i,j) ∈{0,1} (11)

Constraint (7) requires that for all , the sum of the weights of the selected edges corresponding to the pair is not more than . Constraints (8)–(9) require that the selected edges corresponding to form a simple path beginning at and ending at . Constraint (10) enforces that, if edge or is selected on some - path, then its corresponding undirected edge is selected in the spanner; further, and cannot both be selected for some pair . Finally, (11) enforces that all variables are binary.

The number of variables is and the number of constraints is , where . Note that the variables can be relaxed to be continuous in .

### 3.1 ILP formulation for the MLGS problem

Recall that the MLGS problem generalizes the subsetwise spanner problem, which is a special case of the pairwise spanner problem for . Again, we use unordered pairs, i.e., .

We generalize the ILP formulation in (6)–(11) to the MLGS problem as follows. Recall that we can encode the levels in terms of required grades of service . Instead of 0–1 indicators , let denote the grade of edge in the multi-level spanner; that is, if appears on level but not level , and if is absent. The only difference is that for the MLGS problem, we assign grades of service to all - paths by assigning grades to edges along each - path. That is, for all with , the selected path from to has grade , which we denote by . Note that we only need to require the existence of a path for terminals , where . An ILP formulation for the MLGS problem is as follows.

 \allowdisplaybreaksMinimize∑e∈Eceye % subject to (12) ∑(i,j)∈E′xuv(i,j)ce ≤t⋅dG(u,v) ∀u,v∈T1;e={i,j} (13) ∑(i,j)∈Out(i)xuv(i,j)−∑(j,i)∈In(i)xuv(j,i) =⎧⎨⎩1i=u−1i=v0else ∀u,v∈T1;∀i∈V (14) ∑(i,j)∈Out(i)xuv(i,j) ≤1 ∀u,v∈T1;∀i∈V (15) ye ≥muvxuv(i,j) ∀u,v∈T1;∀e={i,j} (16) ye ≥muvxuv(j,i) ∀u,v∈T1;∀e={i,j} (17) xuv(i,j) ∈{0,1} (18)

Constraints (16)–(17) enforce that for each pair such that , the edges along the selected - path (not necessarily every - path) have a grade of service greater than or equal to the minimum grade of service needed to connect and , that is, . If multiple pairs , , …, use the same edge (possibly in opposite directions), then the grade of edge should be . It is implied by (16)–(17) that in an optimal solution.

###### Theorem 3.1

An optimal solution to the ILP given in (6)–(11) yields an optimal pairwise spanner of over a set .

###### Theorem 3.2

An optimal solution to the ILP given in (12)–(18) yields an optimal solution to the MLGS problem.

We give the proofs in Appendices 0.B and 0.C.

### 3.2 Size reduction techniques

We can reduce the size of the ILP using the following shortest path tests, which works well in practice and also applies to the MLGS problem. Note that we are concerned with the total cost of a solution, not the number of edges.

If , for some edge , then we can remove from the graph, as no min-weight spanner of uses edge . If is a min-cost pairwise spanner that uses edge , then we can replace with a shorter - path without violating the –spanner requirement. In particular, if some - path uses both edge as well as some edge(s) along , then this path can be rerouted to use only edges in with smaller cost.

We reduce the number of variables needed in the single-level ILP formulation ((6)–(11)) with the following test: given with and some directed edge , if , then cannot possibly be included in the selected - path, so set . If or cannot be selected on any - path, we can safely remove from .

Conversely, given some directed edge , let be the directed graph obtained by removing from (so that has edges). For each with , if , then edge must be in any - spanner path, so set . For its corresponding undirected edge , .

## 4 Experimental results

### 4.1 Setup

We use the Erdős–Rényi [14] and Watts–Strogatz [18] models to generate random graphs. Given a number of vertices,

, and probability

, the model assigns an edge to any given pair of vertices with probability . An instance of with is connected with high probability for  [14]). For our experiments we use , and .

In the Watts-Strogatz model, , initially we create a ring lattice of constant degree , and then rewire each edge with probability while avoiding self-loops and duplicate edges. The Watts-Strogatz model generates small-world graphs with high clustering coefficients [18]. For our experiments we use , , and .

An instance of the MLGS problem is characterized by four parameters: graph generator, number of vertices , number of levels , and stretch factor . As there is randomness involved, we generated 3 instances for every choice of parameters (e.g., ER, , , ).

We generated MLGS instances with 1, 2, or 3 levels (), where terminals are selected on each level by randomly sampling vertices on level so that the size of the terminal sets decreases linearly. As the terminal sets are nested, can be selected by sampling from (or from if ). We used four different stretch factors in our experiments, . Edge weights are randomly selected from .

#### 4.1.1 Algorithms and outputs

We implemented the bottom-up (BU) and top-down (TD) approaches from Section 2 in Python 3.5, as well as the combined approach that selects the better of the two (Section 2.3). To evaluate the approximation algorithms and the heuristics, we implemented the ILPs described in Section 3 using CPLEX 12.6.2. We used the same high-performance computer for all experiments (Lenovo NeXtScale nx360 M5 system with 400 nodes).

For each instance of the MLGS problem, we compute the costs of the MLGS returned using the bottom-up (BU), the top-down (TD), and the combined (min(BU, TD)) approaches, as well as the minimum cost MLGS using the ILP in Section 3.1. The three heuristics involve a (single-level) subroutine; we used both the heuristic described in Section 2.4, as well as the flow formulation described in Section 3 which computes subsetwise spanners to optimality. We compare the algorithms with and without the oracle to assess whether computing (single-level) spanners to optimality significantly improves the overall quality of the solution.

We show the performance ratio for each heuristic in the -axis (defined as the heuristic cost divided by OPT), and how the ratio depends on the input parameters (number of vertices , number of levels , and stretch factors ). Finally, we discuss the running time of the ILP. All box plots show the minimum, interquartile range and maximum, aggregated over all instances using the parameter being compared.

### 4.2 Results

We first discuss the results for Erdős–Rényi graphs. Figures 47 show the results of the oracle top-down, bottom-up, and combined approaches. We show the impact of different parameters (number of vertices , number of levels , and stretch factors ) using line plots for three heuristics separately in Figures 4-6. Figure 7 shows the performance of the three heuristics together in box plots. In Figure 4 we can see that the bottom-up heuristic performs slightly worse for increasing , while the top-down heuristic performs slightly better. In Figure 5 we see that the heuristics perform worse when increases, consistent with the ratios discussed in Section 2. In Figure 6 we show the performance of the heuristics with respect to the stretch factor . In general, the performance becomes worse as increases.

The most time consuming part of the experiment is the execution time of the ILP for solving MLGS instances optimally. The running time of the heuristics is significantly smaller compared to that of the ILP. Hence, we first show the running times of the exact solution of the MLGS instances in Figure 8. We show the running time with respect to the number of vertices , number of levels , and stretch factors . For all parameters, the running time tends to increase as the size of the parameter increases. In particular, the running time with stretch factor 4 (Fig. 8, right) was much worse, as there are many more -spanner paths to consider, and the size reduction techniques in Section 3.2 are less effective at reducing instance size. We show the running times of for computing oracle bottom-up, top-down and combined solutions in Figure 9.

The ILP is too computationally expensive for larger input sizes and this is where the heurstic can be particularly useful. We now consider a similar experiment using the heuristic to compute subsetwise spanners, as described in Section 2.4. We show the impact of different parameters (number of vertices , number of levels , and stretch factors ) using scatter plots for three heuristics separately in Figures 1012. Figure 13 shows the performance of the three heuristics together in box plots. We can see that the heuristics perform very well in practice. Notably when the heuristic is used in place of the ILP (Fig 24), the running times decrease for larger stretch factors.

We also analyzed graphs generated from the Watts–Strogatz model and the results are shown in Appendix 0.D.

Our final experiments test the heuristic performance on a set of larger graphs. We generated the graphs using the Erdős–Rényi model, with . We evaluated more levels () with stretch factors . We show the performance of heuristic bottom-up and top-down in Appendix 0.E. Here, the ratio is determined by dividing the BU or TD cost by (as computing the optimal MLGS would be too time-consuming). The results indicate that while running times increase with larger input graphs, the number of levels and the stretch factors seem to have little impact on performance.

## 5 Discussion and conclusion

We introduced a generalization of the subsetwise spanner problem to multiple levels or grades of service. Our proposed ILP formulation requires only a polynomial size of variables and constraints, which is an improvement over the previous formulation given by Sigurd and Zachariasen [17]. We also proposed improved formulations which work well for small values of the stretch factor . It would be worthwhile to consider whether even better ILP formulations can be found for computing graph spanners and their multi-level variants. We showed that both the approximation algorithms and the heuristics work well in practice on several different types of graphs, with different number of levels and different stretch factors.

We only considered a stretch factor that is the same for all levels in the multi-level spanner, as well as a fairly specific definition of cost. It would be interesting to investigate more general multi-level or grade-of-service spanner problems, including ones with varying stretch factors (e.g., in which more important terminals require a smaller or larger stretch factors), different definitions of cost, and spanners with other requirements, such as bounded diameters or degrees.

## Appendix 0.A Proof of Theorem 2.4

###### Proof

We use the simple algebraic fact that for all and . Here, we can also use the fact that , as the RHS equals the cost of , which is some subsetwise -spanner. Combining, we have

 min(TOP,BOT) ≤αℓ∑i=1i(i+1)2OPTi+(1−α)ℓℓ∑i=1OPTi =ℓ∑i=1[(i(i+1)2−ℓ)α+ℓ]ρOPTi

Since we are comparing to for some approximation ratio , we can compare coefficients and find the smallest such that the system of inequalities

 (ℓ(ℓ+1)2−ℓ)α+ℓρ ≤ℓr ((ℓ−1)ℓ2−ℓ)α+ℓρ ≤(ℓ−1)r ⋮ (2⋅12−ℓ)α+ℓρ ≤r

has a solution . Adding the first inequality to times the last inequality yields , or . Also, it can be shown algebraically that simultaneously satisfies the above inequalities. This implies that .

## Appendix 0.B Proof of Theorem 3.1

###### Proof

Let denote an optimal pairwise spanner of with stretch factor , and let OPT denote the cost of . Let denote the minimum cost of the objective in the ILP (6). First, given a minimum cost –spanner , a solution to the ILP can be constructed as follows: for each edge , set . Then for each unordered pair with , compute a shortest path from to in , and set for each edge along this path, and if is not on .

As each shortest path necessarily has cost , constraint (7) is satisfied. Constraints (8)–(9) are satisfied as is a simple - path. Constraint (10) also holds, as should not traverse the same edge twice in opposite directions. In particular, every edge in appears on some shortest path; otherwise, removing such an edge yields a pairwise spanner of lower cost. Hence .

Conversely, an optimal solution to the ILP induces a feasible –spanner . Consider an unordered pair with , and the set of decision variables satisfying . By (8) and (9), these chosen edges form a simple path from to . The sum of the weights of these edges is at most by (7). Then by constraint (10), the chosen edges corresponding to appear in the spanner, which is induced by the set of edges with . Hence .

Combining the above observations, we see that .

## Appendix 0.C Proof of Theorem 3.2

###### Proof

Given an optimal solution to the ILP with cost , construct an MLGS by letting where . This clearly gives a nested sequence of subgraphs. Let and be terminals in (not necessarily of required grade ), with , and consider the set of all variables of the form equal to 1. By (13)–(15), these selected edges form a path from to of length at most , while constraints (16)–(17) imply that these selected edges have grade at least , so the selected path is contained in . Hence is a subsetwise –spanner for with stretch factor , and the optimal ILP solution gives a feasible MLGS.

Given an optimal MLGS with cost OPT, we can construct a feasible ILP solution with the same cost in a way similar to the proof of Theorem 3.1. For each with , set . Compute a shortest path in from to , and set for all edges along this path. Then for each , consider all pairs that use either or , and set . In particular, is not larger than the grade of in the MLGS, otherwise this would imply is on some - path at grade greater than its grade of service in the actual solution.

## Appendix 0.D Experimental results on graphs generated using Watts-Strogatz

The results for graphs generated from the Watts–Strogatz model are shown in Figures 1523, which are organized in the same way as for Erdős–Rényi.

## Appendix 0.E Experimental results on large graphs using Erdős-Rényi

Figure 24 shows a rough measure of performance for the bottom-up and top-down heuristics on large graphs using the Erdős-Rényi model, where the ratio is defined as the BU or TD cost divided by min(BU, TD). Figure 25 shows the aggregated running times per instance, which significantly worsen as is large.