DeepAI

# Weighted Additive Spanners

An α-additive spanner of an undirected graph G=(V, E) is a subgraph H such that the distance between any two vertices in G is stretched by no more than an additive factor of α. It is previously known that unweighted graphs have 2-, 4-, and 6-additive spanners containing O(n^3/2), O(n^7/5), and O(n^4/3) edges, respectively. In this paper, we generalize these results to weighted graphs. We consider α=2W, 4W, 6W, where W is the maximum edge weight in G. We first show that every n-node graph has a subsetwise 2W-spanner on O(n |S|^1/2) edges where S ⊆ V and W is a constant. We then show that for every set P with |P| = p vertex demand pairs, there are pairwise 2W- and 4W-spanners on O(np^1/3) and O(np^2/7) edges respectively. We also show that for every set P, there is a 6W-spanner on O(np^1/4) edges where W is a constant. We then show that every graph has additive 2W- and 4W-spanners on O(n^3/2) and O(n^7/5) edges respectively. Finally, we show that every graph has an additive 6W-spanner on O(n^4/3) edges where W is a constant.

• 14 publications
• 17 publications
• 10 publications
• 45 publications
• 10 publications
03/17/2021

### On additive spanners in weighted graphs with local error

An additive +β spanner of a graph G is a subgraph which preserves distan...
03/04/2019

### An FPT Algorithm for Minimum Additive Spanner Problem

For a positive integer t and a graph G, an additive t-spanner of G is a ...
05/04/2019

### New Notions and Constructions of Sparsification for Graphs and Hypergraphs

A sparsifier of a graph G (Benczúr and Karger; Spielman and Teng) is a s...
09/14/2017

### Embedded-Graph Theory

In this paper, we propose a new type of graph, denoted as "embedded-grap...
01/21/2020

### Near-Additive Spanners and Near-Exact Hopsets, A Unified View

Given an unweighted undirected graph G = (V,E), and a pair of parameter...
07/26/2019

### New (α,β) Spanners and Hopsets

An f(d)-spanner of an unweighted n-vertex graph G=(V,E) is a subgraph H ...
03/22/2021

### Continuous mean distance of a weighted graph

We study the concept of the continuous mean distance of a weighted graph...

## 1 Introduction

A spanner of a given graph is a subgraph which approximately preserves lengths of shortest paths in , up to some prescribed error (e.g., multiplicative or additive). Given an undirected graph with vertices and , a subgraph is an -additive spanner of if for every pair of vertices , where denotes the length of the shortest - path in . This problem has been widely studied for unweighted graphs [3]. Aingworth et al. [4] show that all graphs have -additive spanners containing edges. Chechik [7] and Baswana et al. [5] show that all graphs have 4-additive and 6-additive spanners containing and edges, respectively. More recently, Abboud and Bodwin [1] show that the tradeoff between the size of a spanner and the allowed error cannot be extended - specifically, for , one cannot even compress graphs into bits so that distances can be recovered with additive error.

Similarly, a subgraph is called a pairwise -additive spanner of with respect to vertex pairs if distances are approximately additively preserved for all vertex pairs in , that is, for every pair of vertices . If for some , then is called a subsetwise -additive spanner of with respect to . Cygan et al. [8] give polynomial time algorithms to compute subsetwise and pairwise additive spanners for unweighted graphs, and show that there exists a pairwise -spanner of size . They also show how to construct size subsetwise 2-additive spanners. Abboud et al. [2] improved this result by showing how to construct size subsetwise 2-additive spanners. Kavitha [9] shows that there is a polynomial time algorithm which constructs pairwise spanners of size and for and , respectively.

### 1.1 Our Contributions

In Section 2, we first show that every subset of demands in an -vertex graph has a additive spanner on edges where is a constant. We then show that for every set with vertex demand pairs, there are pairwise - and -spanners on and edges respectively. We also show that for every set , there is a -spanner on edges where is a constant. We then show that every graph has additive - and -spanners on and edges respectively. Finally, in Section 3, we show that every graph has an additive -spanner on edges where is a constant.

## 2 Pairwise and Subsetwise Additive Spanners

To prove the results of pairwise spanners we rely on some properties of monotone circuits and monotone constraint satisfaction problems. Hence, we first provide the definitions of these objects from [6].

###### Definition 1 ([6, page 1])

(Monotone Circuits). A satisfiable monotone circuit with input wires and a single output wire is one with the following properties. We say satisfies if the output is true when inputs are set to true and to false.

• (Monotone) If and satisfies , then also satisfies .

• (Satisfiable) satisfies .

###### Definition 2 ([6, page 1])

(Monotone Constraint Satisfaction Problems (MCSPs)). A monotone constraint satisfaction problem (MCSP) is a finite set of satisfiable monotone circuits (called constraints), all with the same number of input wires labeled with . We say that satisfies if it satisfies every .

We now use the definition of the energy cost of MCSP from [6] as follows:

###### Definition 3 ([6, page 1])

(Energy Cost). The energy cost of an MCSP is the quantity

 ec(Σ)=minY⊆XY satisfies Σ|Y|.

To discuss extremal problems, we also need the definition of MCSP Complex:

###### Definition 4 ([6, page 1])

(MCSP Complex). An MCSP complex is a nonempty set of MCSPs closed under subsets; that is, if and , then .

###### Definition 5 ([6, page 1])

(eec). The extremal energy cost of an MCSP complex is the function

 eecC(k)=maxΣ∈C,|Σ|=kec(Σ).

where is a non-negative integer.

Let us relate the above framework with the weighted additive spanner problem we discuss in this paper. There are input wires corresponding to the possible edges of an -node graph. In the pairwise spanner problem, we are given demand pairs, and we want to preserve the distance between each pair with a given error bound (e.g. ). There are constraints, where each one encodes the condition for one demand pair . Here is the subgraph that has an edge iff the corresponding input wire is turned on and also that edge is present in . The energy cost of this MCSP is exactly the least possible number of edges in a pairwise spanner. We use the following lemma of MCSP complex in our results, which provides a bound for .

###### Lemma 1 ( [6, page 2])

Let be an MCSP complex, let be parameters, and let be an absolute constant. Suppose that for , there exist inputs satisfying either of the following two properties:

1. satisfies at least a constant fraction of the constraints in and , or

2. satisfies and .

Then

 eecC(k)=O(α1|Σ|c+α2).

The following auxiliary lemma will be useful. Define a -initialization of an unweighted graph to be a subgraph obtained by arbitrarily choosing edges incident to each vertex in and including them in , or choosing all edges incident to a vertex if its degree is at most (this simplifying technique was first used in [10]).

###### Lemma 2 ([7])

If is a -initialization of an undirected unweighted graph , and there is a shortest path in that is missing edges in , then there are total vertices adjacent in to any vertex in .

For weighted graphs, we have to choose the edges in increasing order to get a useful bound from the -initialization. Define a -initialization of a weighted graph similarly, with the additional rule that the edges chosen incident to each vertex are the lightest (least weight) edges. We now have the following lemma which provides a similar bound as in Lemma 2 for weighted graphs.

###### Lemma 3

If is a -initialization of an undirected weighted graph , and there is a shortest path in that is missing edges in , then there are total vertices adjacent in to any vertex in .

###### Proof

Let be a shortest path, let be the set of edges in currently missing in the spanner, and let us consider these edges to be oriented, so in means that and . Suppose a node in is adjacent to two first nodes of edges in respectively. Let be the edges in that come between in . Then we prove the inequality . (Here denotes the weight of the edge .)

The length of the subpath is . The length of the subpath of the shortest path is at least (since by definition it includes the edges ). Hence, we have the inequality since is a shortest path. We then observe that and , because in the initialization step we apparently chose to add edges to the spanner but not the edges . Hence, .

Let us say that an edge in is pre-heavy if its weight is greater than or equal to the sum of the previous two edges in , or post-heavy if its weight is greater than or equal to the sum of the following two edges in . We now show that either a constant (greater than zero) fraction of the edges in are not pre-heavy, or a constant (greater than zero) fraction of the edges in are not post-heavy (or both). If there are ever two pre-heavy edges in a row, this implies a rising sequence of length 3 of edges of increasing weight (when the edges in M are considered in order of their appearance in ). Thus these edges do not define two post-heavy edges in a row. Hence, at least of the edges in M are not both pre-heavy and post-heavy, and thus by an intersection bound we can’t have greater than or equal tp 5/6 fraction of the edges being pre-heavy and simultaneously a greater than or equal to 5/6 fraction of the edges being post-heavy.

Let us assume without loss of generality that a constant fraction of edges in are not pre-heavy; call this subset (in the other case, just reverse the roles of s and t). If there does not exist a node adjacent to more than one first nodes in , then there are greater than or equal to nodes in the spanner adjacent to the first node of . Note that a node can not be adjacent to more than two first nodes in . The reason is because, if a node is adjacent to greater than or equal to three nodes in , then the inequality implies that the last such node in fact belongs to a pre-heavy edge.

Cygan et al. [8] provided a subsetwise 2-additive spanner for unweighted graphs. Unfortunately there is no straightforward extension of the algorithm for weighted graphs. The algorithm has two steps: clustering phase and path buying phase. In the clustering phase, we continuously select a vertex with at least neighbors. Then we form a cluster with vertices and add all the edges in the spanner that are between two vertices in the cluster of between a vertex of the cluster and the center of the cluster. When there are no more vertices with at least neighbors, we add all the unclustered vertices and adjacent edges to the spanner. This clustering phase has two properties:

• (missing-edge property) If an edge is absent in the spanner, then and belong to two different clusters.

• (cluster-diameter property) The distance in the spanner between any two vertices of the same cluster is at most .

The reason why the trivial extension does not work for the weighted case is because it relies on the following lemma.

###### Lemma 4 ([8, page 4])

If the shortest path in between any two nodes contains edges that are absent in the clustered graph, then there are at least clusters having at least one vertex on .

The claim is true for unweighted scenario, because a shortest path can go through a cluster at most two times. If it visits a cluster more than two times then it can not be a shortest path. However for the weighted scenario a shortest path can visit a cluster more than twice. For the weighted scenario we have the following lemma:

###### Lemma 5

If the shortest path in between any two nodes contains edges that are absent in the clustered graph, then there are at least clusters having at least one vertex on .

###### Proof

If we take an edge form these absent edges, then we know that is connected to two vertices of different clusters by the missing-edge property. We generate two pairs for each absent edge and say that the pair is associated with a cluster if . We can generate exactly pairs from edges. We now count the minimum number of clusters that can be associated with these pairs. We first notice that can not traverse a cluster more than times. Because every time enters and exits, it has to use at least two edges. For traversing times it needs at least edges. It can not take more than edges because according the cluster-diameter property if it takes more than edges then it can not be a shortest path. Hence, a cluster can be associated with at most pairs and the number of clusters that has at least one vertex of is at least .

We now take the graph from the clustering phase and add some additional edges to make it a -additive spanner. We consider all the shortest paths among all pairs of vertices in the subset. We than add the edges (that are not already in ) of a shortest path if we find that shortest path useful. By useful we mean that the added edges will increase the connectivity among the clusters with out paying that much cost. We now formally define the cost of a path and the benefit/value we gain by adding that path. We define as the number of missing edges in . And we define equal to the number of clusters that have two properties. The first property is has at least one vertex in the considered cluster. Let be the endpoints of . The second property is the cluster has to contribute pairs like such that where . The total number of such pairs is denoted by . We consider each shortest path among the pairs of vertices in the subset and add it in if .

For any .

###### Proof

Let be the shortest path between and . The claim is trivially true if . If , then let the number of edges absent in from be equal to . Then there is at least clusters traversed by . Note that all of these clusters can not contribute to because then . But if there is at least one cluster that does not contribute to then by the cluster-diameter property the claim is true.

###### Theorem 1

For such that and is a constant, the graph contains edges.

###### Proof

The clustering phase does not give us more than edges. Hence, we count the number of edges we get from the path-buying phase. Let be the set of shortest paths that we added in the later phase. The number of edges added is equal to . However, is no more than . We now count the number of pairs that contributes in for some . For each pair we take at most edges in the path-buying phase. According to the obervation of Cygan et al. [8], if is a constant, a cluster can not contribute more than times because of the cluster diameter property. The total number of pairs is equal to since, the vertex and the number of cluster is . Hence, total number of edges added is equal to .

###### Corollary 1

Every subset of demands in an -node graph has a additive spanner on edges where is a constant.

We now provide another way to compute additive spanner which has the slightly larger size bound compared to the above algorithm. However, it does not assume that is a constant.

###### Theorem 2

Every set of demand pairs in an -node graph has a pairwise spanner on edges.

###### Proof

We apply Lemma 1 with . Let be parameters, and let the spanner be a -initialization of . Hence, has less than or equal to edges. We say that a demand pair is short if its shortest path is currently missing less than or equal to edges in the spanner, or long otherwise.

• To handle the short pairs , we add the missing edges of a shortest path to the spanner. The number of edges added in this phase is no more than .

• To handle the long pairs , randomly sample a set of nodes

by including each node independently with probability

. Add to the spanner a shortest path tree rooted at each . The expected number of edges added in this phase is . By Lemma 3 there are nodes adjacent to the shortest path, so with constant probability or higher, we sample a node adjacent to a node on this shortest path. In this event, we compute:

 dH(s,t) ≤dH(s,r)+dH(r,t) triangle inequality =dG(s,r)+dG(r,t) shortest path tree at r ≤dG(s,u)+dG(u,t)+2W triangle inequality =dG(s,t)+2W u on shortest s⇝t path

Letting denote the final spanner, which satisfies at least a constant fraction of all demand pairs in expectation, setting and we have

 |E(H)|=O(nd+ℓp+n2/(ℓd))=O(np1/3).

Kavitha [9] shows that there is a polynomial time algorithm which constructs pairwise 4 additive spanners of size . We now show that there is a polynomial time algorithm which constructs pairwise additive spanners of size .

###### Theorem 3

Every set of demand pairs in an -node graph has a additive spanner on edges.

###### Proof

We apply Lemma 1 with . Let be parameters, and let the spanner be a -initialization of . Hence, the number of edges is less than or equal to . This time there are three cases: a demand pair is short if its shortest path is missing less than or equal to edges, it is medium if it is not short but its shortest path is missing less than or equal to edges, or it is long otherwise.

• To handle the short pairs , add the missing edges of the shortest path to the spanner. The number of edges added is less than or equal to .

• To handle the long pairs , randomly sample a set of nodes by including each node independently with probability , and add the edges of a BFS tree rooted at each to the spanner. The total number of edges added is equal to . By Lemma 3 there are nodes adjacent to the shortest path, so with constant probability or higher we sample a node adjacent to a node on this path. In this event, we compute:

 dH(s,t) ≤dH(s,r)+dH(r,t) triangle inequality =dG(s,r)+dG(r,t) shortest path tree at r ≤dG(s,u)+dG(u,t)+2W triangle inequality =dG(s,t)+2W u on shortest s⇝t path
• There are two steps to handle the medium pairs . First, add the first and last missing edges in the shortest path to a spanner. The total number of edges added in this step is no more than . Then, randomly sample a set of nodes by including each node independently with probability . For each pair of nodes , check to see if there exist nodes adjacent to (respectively) in the current spanner such that the shortest path is missing less than or equal to edges. If so, then choose nodes with this property minimizing , and add all missing edges in the shortest path to the spanner. If not, do nothing. This part costs

 O(|R2|2⋅nd2)=O(n2ℓ2d2⋅nd2)=O(n3ℓ2d4)

edges in total. For a medium demand pair , by Lemma 3 there are nodes adjacent to the added prefix, suffix respectively, so with constant probability or higher we sample nodes adjacent to nodes on the added prefix, suffix respectively. In this event, note that there are less than or equal to missing edges on the shortest path, since are on the shortest path and is a medium pair (this step implicitly uses that shortest path tie breaking is consistent, so the shortest path is contained in the shortest path). Thus we do indeed add a shortest path corresponding to the pair , instead of the case where we do nothing. Say this added path is between nodes adjacent to respectively. Then we compute:

 dH(s,t) ≤dH(s,x)+dH(x,x′)+dH(x′,t) x,x′ on shortest s⇝t path =dG(s,x)+dH(x,x′)+dG(x′,t) x,x′ on added prefix, suffix ≤dG(s,x)+(dH(u,u′)+4W)+dG(x′,t) triangle inequality =dG(s,x)+dG(u,u′)+dG(x′,t)+4W shortest u⇝u′ path added =dG(s,x)+dG(x,x′)+dG(x′,t)+4W dG(u,u′) is minimal =dG(s,t)+4W x,x′ on shortest s⇝t path

Letting denote the final spanner, which satisfies a constant fraction of all demand pairs, setting and we have

 |E(H)|=O(nd)+pℓ+(n3/(ℓ2d4))=O(np2/7)

which completes the proof.

###### Theorem 4

Every set of demand pairs in an -node graph has a additive spanner on edges where is a constant.

###### Proof

We apply Lemma 1 with (second case not used). The proof is similar to that of previous theorems. Let be parameters, and let the spanner be a -initialization of . Hence, the number of edges is less than or equal to . A demand pair is short if the shortest path is missing less than or equal to edges in the spanner, or long otherwise.

• To handle the short pairs , add the missing edges of the shortest path to the spanner. The number of edges added is less than or equal to .

• To handle the long demand pairs , there are two steps. First, add the first and last missing edges of the shortest path to the spanner. The number of edges added is less than or equal to . Then, randomly sample a set by including each node with probability and using Theorem 1 add a pairwise spanner on demand pairs ; this costs

 O(n√R)=O(n3/2/√ℓd)

edges. By Lemma 3 the added prefix and suffix of the shortest path each have adjacent nodes. Thus, with constant probability or higher, we sample such that is adjacent to in the added prefix and is adjacent to in the added suffix. In this event we can compute:

 dH(s,t) ≤dH(s,r1)+dH(r1,r2)+dH(r2,t) triangle inequality ≤dH(s,r1)+(dG(r1,r2)+2W) +dH(r2,t) R×R+2W pairwise spanner ≤(dH(s,u1)+W)+(dG(r1,r2)+2W) +(dH(u2,t)+W) triangle inequality =dG(s,u1)+dG(r1,r2)+dG(u2,t)+4W added prefix/suffix ≤dG(s,u1)+dG(u1,u2)+dG(u2,t)+6W triangle inequality =dG(s,t)+6W u1,u2 on shortest s⇝t path

Letting denote the final spanner, which satisfies at least a constant fraction of all demand pairs in expectation, setting and we have

 |E(H)|=O(nd+pℓ+n3/2/√ℓd)=O(np1/4)

which completes the proof.

## 3 All-pairs Additive Spanners

All-pairs additive spanners have been studied for unweighted graphs. There exists algorithms to compute 2, 4, and 6 additive spanners on and edges respectively [4, 7, 5]. In this section, we prove analogs for weighted graphs. To prove these results we use the following lemma from [6].

###### Lemma 7 ([6, page 3])

For an MCSP complex , let

 k∗:=max{k|eecC(K)k}

Then for all we have .

In other words the value of increases as increases. And after that, the value does not increase anymore. The parameter range where is called the saturated regime. Lemma 7 provides a way to relate the pairwise spanners with all-pairs spanners. For example, the pairwise bound of provided in Theorem 2 for additive spanners enters the saturated regime when  [4]. Hence, Lemma 7 implies the bound of edges for all-pairs spanners. We can provide similar arguments for and additive all-pairs spanners. Hence, we have the following theorems.

###### Theorem 1

Every -node graph has a additive spanner on edges.

###### Proof

in 2, we have shown that every set of demand pairs in an -node graph has a pairwise spanner on edges. If we set then the edge bound is as well. Hence, by Lemma 7, every graph has a all-pairs additive spanner on edges.

###### Theorem 2

Every -node graph has a additive spanner on edges.

###### Proof

in 3, we have shown that every set of demand pairs in an -node graph has a pairwise spanner on edges. If we set then the edge bound is as well. Hence, by Lemma 7, every graph has a all-pairs additive spanner on edges.

###### Theorem 3

Every -node graph has a additive spanner on edges where is a constant.

###### Proof

in 4, we have shown that every set of demand pairs in an -node graph has a pairwise spanner on edges. If we set then the edge bound is as well. Hence, by Lemma 7, every graph has a all-pairs additive spanner on edges.

## 4 Conclusions and Open Problems

We have shown that every -node graph has a subsetwise -spanner on edges where and is a constant. We then show that for every set with vertex demand pairs, there are pairwise - and -spanners on and edges respectively. We have also shown that for every set , there is a -spanner on edges where is a constant. We then showed that every graph has additive - and -spanners on and edges respectively. Finally, we have shown that every graph has an additive -spanner on edges where is a constant. One natural question is: are the results tight (when is constant or not)? Another point is, the bound we have given is about the number of edges, but not how close to optimal solution it is. Finally, can the results be generalized to the multilevel version?

## References

• [1] A. Abboud and G. Bodwin (2015) The 4/3 additive spanner exponent is tight. External Links: arXiv:1511.00700 Cited by: §1.
• [2] A. Abboud and G. Bodwin (2016) Lower bound amplification theorems for graph spanners. In Proceedings of the 27th ACM-SIAM Symposium on Discrete Algorithms (SODA), pp. 841–856. Cited by: §1.
• [3] R. Ahmed, G. Bodwin, F. D. Sahneh, K. Hamm, M. J. L. Jebelli, S. Kobourov, and R. Spence (2019) Graph spanners: a tutorial review. arXiv preprint arXiv:1909.03152. Cited by: §1.
• [4] D. Aingworth, C. Chekuri, P. Indyk, and R. Motwani (1999-04)

Fast estimation of diameter and shortest paths (without matrix multiplication)

.
SIAM J. Comput. 28, pp. 1167–1181. External Links: Document Cited by: §1, §3, §3.
• [5] S. Baswana, T. Kavitha, K. Mehlhorn, and S. Pettie (2010) Additive spanners and (, )-spanners. ACM Transactions on Algorithms (TALG) 7 (1), pp. 5. Cited by: §1, §3.
• [6] G. Bodwin (2020) Some general structure for extremal sparsification problems. arXiv preprint arXiv:2001.07741.
• [7] S. Chechik (2013) New additive spanners. In Proceedings of the twenty-fourth annual ACM-SIAM symposium on Discrete algorithms, pp. 498–512. Cited by: §1, §3, Lemma 2.
• [8] M. Cygan, F. Grandoni, and T. Kavitha (2013) On pairwise spanners. In 30th International Symposium on Theoretical Aspects of Computer Science (STACS 2013), N. Portier and T. Wilke (Eds.), Leibniz International Proceedings in Informatics (LIPIcs), Vol. 20, Dagstuhl, Germany, pp. 209–220. External Links: ISBN 978-3-939897-50-7, ISSN 1868-8969, Link, Document Cited by: §1, §2, Lemma 4, Proof.
• [9] T. Kavitha (2017-11-01) New pairwise spanners. Theory of Computing Systems 61 (4), pp. 1011–1036. External Links: ISSN 1433-0490, Document, Link Cited by: §1, §2.
• [10] M. B. T. Knudsen (2014) Additive spanners: a simple construction. In Scandinavian Workshop on Algorithm Theory, pp. 277–281. Cited by: §2.