For a real value , a -spanner of an edge-weighted graph is a subgraph such that where and denote the shortest path distance functions for vertex pairs in and , respectively. In this work, we study -spanners of a metric space; more precisely, we study -spanners of the corresponding metric graph which is the complete graph on the set of points in the metric where the weight of each edge denotes the metric distance between and . When we refer to metric spaces in the following, we assume them to be finite.
Spanners have been used in many applications including distributed systems, communication networks, robotics and more [1, 15]. In this work, we are interested in -spanners (herein referred to simply as spanners) of geometric and metric graphs where denotes a fixed constant. One way to measure the quality of spanners is by their lightness which is the ratio of the weight of spanner’s edges to the weight of a minimum spanning tree of . One prominent application of spanners with constant lightness is in designing faster polynomial time approximation schemes111A polynomial-time approximation scheme is an algorithm which, for a fixed error parameter , finds a solution whose value is within of optimal in polynomial time. (PTAS) for the TSP problem [16, 11, 13, 4, 5]. A classical spanner algorithm  constructs a -spanner of a graph by considering edges in non-decreasing order of weight and adding the current edge to the spanner if there is not already a -to- path of weight at most times the weight of ; the resulting spanner is called the greedy -spanner of .
The greedy -spanner of a metric space of doubling dimension has lightness .
Geometric spanners have a rich history. In 2-dimensional Euclidean space, -spanners of lightness have been known since the late 80s [1, 14]. Das, Heffernan and Narasimhan  sketched an intricate argument showing that -spanners for any fixed in 3-dimensional Euclidean space have lightness . Their main contribution is an analysis of the leap-frog property of the spanner edges found by the greedy algorithm. Later, Das, Narasimhan and Salowe  sketched a generalization of the proof by Das, Heffernan and Narasimhan  to show that -spanners for any fixed in -dimensional Euclidean space have lightness . However, the dependency of the lightness on and was not explicitly computed. Rao and Smith  redid the analysis of Arya, Das, Mount, Salowe and Smid  to show that the constant in the work of Das, Heffernan and Narasimhan  is . Narasimhan and Smid  devoted a -page chapter of Geometric Spanner Networks to give full details of the analysis of the lightness of greedy spanners. They show that greedy spanners for -dimensional Euclidean space have lightness ; their proof heavily relies on the geometry of Euclidean space. Our Theorem 1 immediately implies a simpler proof for the same lightness bound in Euclidean space; it is well-known that a point set in -dimensional Euclidean metric has doubling dimension . Instead of relying on the leap-frog property as in previous works, which is not easy to analyze in doubling metrics, we only use the simple packing property of the doubling metrics where Euclidean space is a special case.
Spanners in doubling metrics were first considered by Gao, Guibas and Nguyen  who showed that a -point set in doubling dimension has a spanner of edges. By analyzing the greedy algorithm, Smid  showed that greedy spanners have edges and lightness. Beating the lightness bound of Smid  had been an important open problem until the recent work by Gottlieb , who showed that a metric of doubling dimension has a spanner of lightness . We note that the construction of Gottlieb  is non-greedy, conceptually involved and takes time. However, two questions remain open. First, can we design a spanner of lightness to match the bound in Euclidean space? Second, is there a more refined analysis of the greedy algorithm to achieve the bound ? Gottlieb  asked the first question in his paper. The second question was partially addressed by Filtser and Solomon , who showed that greedy spanners in doubling metrics (as well as graph classes closed under edge removal) are existentially optimal: if there is a spanner construction of lightness bound , then greedy spanners have lightness . Combined with Gottlieb’s results , the existential optimality implies that greedy spanners have lightness. In this paper, we resolve both questions affirmatively by presenting a refined and comparatively simple analysis of the greedy algorithm. Our result, in combination with the result of Filtser and Solomon , implies an time algorithm to find a spanner of lightness .
Our analysis is built primarily upon our result  in minor-free graphs which in turn is based on the techniques of Chechick and Wulff-Nilsen  for general graphs. We briefly review the -minor-free techniques  here, highlighting new ideas required for doubling metrics. The first step is to reduce the problem on the input graph to the same problem on graphs that have unit-edge-weight minimum spanning trees (MSTs), by rounding small-weight edges and subdividing large-weight edges. Then the greedy algorithm is applied to this slightly modified graph making the construction non-greedy as a whole. However, in the setting of doubling metrics, we cannot use the same simplification since rounding changes the metric. We instead directly analyze the greedy spanner of the input.
To analyze the spanner of an -minor free graph,  uses iterative clustering. Spanner edges are partitioned into sets222Here, denotes the base logarithm., and then the total weight of each set is bounded separately; this induces the factor in the lightness. Each set consists of spanner edges in an exponential scale of many levels. First, a non-negative credit is assigned to each edge of unit weight; is also the lightness of the spanner. In each level, clusters are constructed iteratively from clusters of the previous level; level- clusters are constructed directly from the . An invariant is maintained that each cluster must have some amount of credit to pay for spanner edges in their level. Credits of level- clusters are taken directly from edges. Credits of level- clusters are taken from credits of clusters of level and edges connecting those lower-level clusters. However, to pay for the spanner edges, level- clusters cannot take all credits from level- clusters. Instead, it is guaranteed that on average, each level- cluster has a non-trivial amount of credit left to pay for spanner edges. The minor-free property is then used to argue that each cluster on average must pay for only a constant number of spanner edges in each level.
Our new argument is also based on our earlier iterative cluster construction. However, we rely on the packing property of doubling metrics (defined below) to show that each cluster needs to pay for a constant number of spanner edges in the same level. This property of doubling metric spanners allows us in fact to simplify the cluster construction that was used for -minor free graphs.
Let be the graph representing a metric of doubling dimension . For each edge , we define the weight function to be the distance between its endpoints in the metric. Let and . We directly analyze the spanner produced by the greedy algorithm. For a review of the greedy spanner algorithm, see Appendix B. Let be the greedy spanner of . Smid  showed (in two pages) that:
The following packing property of doubling metric is well-known (see ):
Lemma 3 (Packing property).
A point set of a metric of doubling dimension that is contained in a ball of radius and for every , , has .
2 Assigning credits to edges
Let be the average weight of an edge. We first bound the total weight of edges that have weight at most .
Let be the set of edges of of weight at most . Then, .
We now focus on bounding the total weight of edges of weight at least in . We subdivide and allocate credits to edges such that every edge has weight at most and at least credits where is a constant that only depends on and will be specified later. We will guarantee that the total allocated credit is where is also the lightness of the spanner. First, we subdivide every edge of weight more than into new edges with equal weights summing up to ; note that each new edge has weight at most . Letting be the new graph, we have . We then allocate credits to each edge of .
The total credit allocated to the edges of is at most .
The total credits assigned to edges of is:
3 Iterative Clustering
Let . We first bound the weight of and pay for edges in separately. The purpose is to simplify the base case in the inductive amortized argument that we present below.
Let and . Note that the longest distance between any two vertices in is at most . We partition the spanner edges (of weight at least ) of into sets where each edge has weight in the range . For each , let
For each , there is a set of spanner edges such that and .
It is not hard to see that Lemma 7 directly implies Theorem 1. Thus, we only focus on proving Lemma 7 for a fixed . We refer to edges of as edges in level (Equation 2). Let . Similar to our analysis for -minor free graphs , we construct a set of clusters, which are subgraphs of , for each level and guarantee inductively two diameter-credits invariants:
A cluster of level of diameter has at least credits.
A cluster of level has diameter at most for some constant (specified later).
A cluster of level , say , is the union of a subset of clusters in level connected by and level- spanner edges. Clusters of level are referred to as -clusters. To satisfy DC1, we assign the credits from -clusters in and the edges connecting the -clusters to . However, we need to group -clusters in such a way that there are some extra -clusters whose credits are not needed to maintain DC1 for . We will use credits of these extra -clusters to pay for level- spanner edges incident to every -cluster in . The credit lower bound (DC1) helps us achieve the goal.
To guarantee the diameter-credit invariants for level , we greedily break the into components (level-0 clusters) of diameter at least and at most . Recall . To guarantee DC1, we use the credits of edges in the longest path of each cluster. Since the credit of each edge is at least its length, DC1 is satisfied. Invariant DC2 follows directly from the construction. Note that we have already accounted for the weight of spanner edges of in Claim 6.
3.1 Constructing higher level clusters
We construct clusters of level from the -clusters of level . We assume that the stretch of the spanner is for some constant (independent of ) that we will pick sufficiently big to make our claims below hold. Furthermore, we assume that is bounded from above by a sufficiently small positive constant. We call vertices of virtual vertices. We call a cluster virtual of it only contains virtual vertices and non-virtual otherwise. Let be the multigraph obtained by taking the subgraph of consisting of -clusters and spanner edges in and contracting each -cluster into a single vertex. Let .
is a simple graph of degree .
We leave the details of the proof that is simple to Appendix C. To show the degree bound, first note that virtual clusters are isolated vertices in since virtual vertices are subdividing vertices incident to edges of weight at most . For each non-virtual -cluster, we designate a non-virtual vertex to be its center. Assuming w.l.o.g. that and picking , we get the following claim:
Let be three -clusters that have as centers. Suppose that are neighbors of in . Then, for any .
Suppose and are two level- spanner edges such that . We assume, w.l.o.g, that . Recall .
We only present the proof showing that since a similar but simpler proof holds for and . We assume that . Let be the -to- path that consists of: (i) a shortest -to- subpath in , (ii) edge , (iii) a shortest -to- subpath in , (iv) a shortest -to- path in and (v) a shortest -to- subpath in . Since in the greedy spanner, edges are added by increasing weight, by the time is added, . Thus, we have:
Since , we have and hence . But then ; contradicting that is a spanner edge. ∎
Let be an -cluster with neighbors in . Let where is the center of . We show below that for every when is sufficiently small. Thus, is contained in a ball centered at of radius at most . By Claim 9, for every . Thus, by Lemma 3, .
We now show that for a fixed with . Let be the spanner edge in connecting and in . Then the -to- path consisting of an -to- shortest path in , edge and a -to- shortest path in has length at most when is smaller than . ∎
Let be a tree of -clusters connected by edges. We say an -cluster of is branching if it is incident to at least three edges in . Let be a path of . We define the diameter of , denoted by , to be the diameter of the subgraph of formed by edges inside -clusters and edges connecting -clusters of . We define effective diameter of , denoted by , to be the diameters of -clusters in . Since -clusters have diameter at least (by construction of the base case) which is at least the weight of edges connecting them in , we have:
We define the effective diameter of a subtree of to be the effective diameter of the diameter path of . We construct clusters in four phases:
Phase 1: Branching -clusters.
We have two steps. Since our construction is recursive, we update the set branching vertices of after each recursive step. (Step 1) Let be a subtree of of effective diameter at least and at most that contains a branching vertex and its neighbors so that is still branching in . We group -clusters and edges of as a new level- cluster. We remove from and repeat until every component of either has effective diameter less than or is a path of -clusters, called a cluster path, of effective diameter at least .
(Step 2) Let be a cluster path of diameter at least . Let be the set of internal -clusters of such that has at least one edge, say , to a level- cluster, say , formed in Step 1. Observe that is branching before execution of Step 1 and the removal of subtrees of in Step 1 reduces degree of to 2. We augment with and . We then remove from and repeat until every cluster path of effective diameter at least only has edges to level- clusters incident to its endpoint -clusters.
Phase 2: -clusters in high diameter paths.
Let be a spanner edge in whose endpoints, and are in high-diameter cluster paths, and , respectively, where it may be that . Let and be the -clusters containing and , respectively. We only proceed with this phase if the two affix cluster subpaths of ending at have effective diameter at least (likewise for ). Let and be the two minimal subpaths of ending at that have effective diameter at least . Likewise define and . We group -clusters and edges of and as a new level- cluster. See Figure 1 for an illustration of the different forms this cluster can take.
Phase 3: Low diameter components.
Let be the set of trees (and paths) remaining of effective diameter at most . By construction, each component of has a edge, say , to a level- cluster constructed in previous phases, say . We augment by and .
Phase 4: Remaining high diameter paths.
Let be a cluster path of effective diameter at least . We greedily break into subpaths of effective diameter at least and at most . If any affix of , say , has a edge, say , to a level- cluster constructed in previous phases, say , we augment with and . We then make each remaining cluster subpath of into a new level- cluster.
This completes the cluster construction for level .
3.2 Showing diameter-credit invariant DC2
By construction, each level- cluster constructed in Phase 4 is a cluster path of effective diameter at most . By Observation 10, we have:
Level- clusters constructed in Phase 4 have diameter at most .
Level- clusters have diameter at most when is smaller than .
Let be a level- cluster that is initially formed in Phase 1 or 2. By construction, may be augmented in Phases 3 and 4. Let and be the augmented clusters of after Phase 3 and Phase 4, respectively. It could be that . is obtained from by attaching trees of effective diameter at most via edges. is obtained from by attaching trees of effective diameter at most via edges. Recall each edge has length at most . By Observation 10, we have:
If is constructed in Phase 1, by Observation 10, after Step 1, . Since in Step 2, is augmented by -clusters via edges, after Step 2, ( by construction of the base case). If is constructed in Phase 2, we have:
Since are minimal, each has effective diameter at most . Thus, . Thus, in both cases, . By Equation (3), . ∎
Thus, by Claim 12, we can choose .
3.3 Showing diameter-credit invariant DC1
Let be the maximum degree of the cluster graph . By Lemma 8, . We define to be the total credits of a set of -clusters .
3.3.1 Clusters originating in Phase 4
Let be a level- cluster formed in Phase 4. We call a long cluster if it has at least -clusters and a short cluster otherwise. We have:
A long cluster can both maintain invariant DC1 and pay for its incident spanner edges when .
Let be a set of any -clusters of . By invariant DC1 for level , we have:
which is at least since as shown in Claim 11 (since ). Thus, credits of are enough to maintain DC1 for .
Since is a long cluster, there is at least one -cluster, say , not in . By DC1 for level , has at least credits. Since there are at most:
level- spanner edges incident to -clusters in , ’s credits are enough to pay for those spanner edges when .
For each -cluster , we use ’s credit to pay for the spanner edges incident to . By Lemma 8 and invariant DC1 for level , this amount of credit is sufficient when . ∎
The credits of -clusters and edges connecting -clusters of each short cluster are enough to maintain invariant DC1 for .
We abuse notation by letting be the set of edges in that connects its -clusters. Since is a cluster path, we have:
By invariant DC1 for level , and since each MST edge has credit at least times its length, the claim follows. ∎
A short cluster may need to use all the credits of -clusters and edges to maintain DC1, hence, it many not have extra credit to pay for any incident level- spanner edges. In this case, we need to use credits of other level- clusters to pay for those spanner edges. We call a short cluster internal if it is not an affix of a long path in Phase 4.
There is no level- spanner edge that has both endpoints in internally short clusters.
If there is such an edge , it would be grouped into a level- cluster in Phase 2. ∎
Thus, a level- spanner edge incident to an internally short cluster can be paid by the level- cluster that contains the other endpoint of . However, if a short cluster is not internal, we must find a way to pay for its incident spanner edges. Recall after Phase 1, every cluster path of effective diameter at least must have an edge from one of its endpoint -clusters to a level- cluster. By construction in Phase 4, if a short cluster is an affix of , called a short affix cluster, the other affix of , called the sibling affix, must have an edge to a cluster originating in the first two phases and thus augments it. (The only exception is when there is no level- clusters after the first two phases and we will handle this case at the end of this paper.) Thus, we can use the credit of -clusters of the sibling affices to pay for incident spanner edges of affix short clusters. To that end, we analyze clusters originally constructed in the first two phases.
3.3.2 Clusters originating in Phase 1+2
Let be a level- cluster constructed in Phase 1 or 2. Let and be the augmentations of in Phase 3 and 4, respectively. Let be the diameter path of the spanner given by edges and vertices in . Let be the walk obtained from by contracting each maximal subpath of that is inside an -cluster of to a single vertex.
Definition 16 (Canonical pair).
Let be a subset of -clusters of such that and the credits of -clusters in and edges of are sufficient to maintain invariant DC1 for . Let be an -cluster of that is not in . We call a canonical pair of .
Note that we do not claim the existence of canonical pairs. Indeed, the main goal of this subsection is to prove that a canonical pair exists for since its existence implies that . Thus, we can use credits of -clusters in to pay for level- spanner edges incident to -clusters of and -clusters of short affix clusters hat have sibling affices in .
If has a canonical pair , we then can pay for every level- spanner edge that is incident to -clusters of and -clusters of short affix clusters that have sibling affices in using credits of -clusters in when .
Let be a set of -clusters that contains every -cluster in and affix short clusters in Phase 4 whose sibling affices contain an -cluster of . Recall that is augmented by attaching paths of -clusters via edges. Thus, contains at most two short clusters as a result of Phase 4 (see Figure 2). Since and each short cluster has at most -clusters, . Since each -cluster is incident to at most level- spanner edges by Lemma 8, -clusters in are incident to at most level- spanner edges. Recall that each level- spanner edge has length at most . By invariant DC1 for level , has at least credits. Thus, by choosing , ’s credit is sufficient to pay for every spanner edge incident to -clusters in .
For each -cluster in , the credit of is sufficient to pay for incident level- spanner edges incident to . However, we also need to pay for short affix clusters in Phase 4, whose siblings augment in Phase 4. To afford this, we use half the credit of each -cluster in (of value at least by invariant DC1 for level ) to pay for level- spanner edges incident to it. Since each -cluster is incident to at most level- spanner edges by Lemma 8, this credit is sufficient when .
Since is augmented by attaching cluster paths via edges, an affix cluster not in has its sibling in a subset of . For each short affix cluster (see Figure 2) whose sibling affix, say , is in , we use the remaining half of the credits of the -clusters of to pay for the level- spanner edges incident to . By Lemma 8, is incident to at most level- spanner edges. Since , by invariant DC1 for level . Thus, half the credit of is sufficient when . ∎
By Claim 17, it remains to show that has a canonical pair . Let be a set of -clusters. We define a subset of as follows:
If is constructed in Phase 1, then has a canonical pair.
Recall is a tree of -clusters. That implies is also a tree of -clusters that are connected by edges. Thus, is a simple path. Since contains a branching -cluster , there must be at least one neighbor -cluster of that is not in . Let be an arbitrary neighbor -cluster in of and . By definition, .
It remains to show that credits of -clusters of and edges of is sufficient to guarantee invariant DC1 for . Suppose that contains at least -clusters. By invariant DC1 for level , which is enough to maintain invariant DC1. Thus, we can assume that contains every -cluster of . Since consists of -clusters and edges only, we have:
Thus, credits of -clusters of and edges of are sufficient to maintain DC1. ∎
We now consider the case when is constructed in Phase 2. Recall consists of four paths that are not necessarily distinct and a single spanner edge (see Figure 1).
If the four paths are distinct, then has a canonical pair.
Let . By construction in Phase 2, is an acyclic graph of -clusters connected by edges and a single spanner edge . Thus, is a simple path. That implies at most two paths, say and , among four paths in share -clusters with . Let other two paths of be and . Let be an arbitrary -cluster of and
If , then by invariant DC1 for level . Hence, credits of -clusters in are sufficient to maintain DC1 for since as shown in the previous section.
Thus, we can assume that . In this case, . If does not contain the spanner edge , using the same argument in Claim 18, we can show that credits of -clusters and edges of are sufficient to maintain invariant DC1 for . Otherwise, we assign credits of to . Since , by invariant DC1 for level , . Thus is assigned credit of at least times its length. We then use credits of -clusters and edges of to maintain DC1. The rest of the proof is similar to Claim 18. ∎
We assume that . In this case, contains a unique cycle, which is . We first prove that is a path when is sufficiently small.
is a path if is smaller than .
If is not simple, it contains a cycle . Let and be two vertices of the same -cluster, say , such that enters and leaves at and , respectively. Then, the subpath between and of must contain edge of length at least . However, we can shortcut through by a path of length at most by DC2. For , the shortcut has length smaller than , contradicting that is a shortest path. ∎
For otherwise, could be shortcut through at a cost of
This change in cost is negative for . ∎
has a canonical pair.
Let be an -cluster of . exists by Observation 21. We define:
If , then the total credit of -clusters in is at least by invariant DC1 for level . Thus credits of -clusters in is sufficient to maintain invariant DC1 for . That implies has a canonical pair.
Otherwise, . If does not contain the spanner edge , then by the same argument in Claim 18, we can argue that credits of -clusters and edges in is enough to maintain invariant DC1 for . Thus, we can assume that contains . We consider two cases:
contains an internal -cluster of . Since is a path by Claim 20, its does not contain any internal -cluster of at least one of two paths , w.l.o.g., say . Since , by invariant DC1 for level , the total credit of -clusters in is at least which is at least . Thus, by assigning credits of to , every edge of has credit at least times it length. Thus, credits of -clusters and edges of are enough to maintain DC1 for .
does not contain any internal -cluster of . We have:
The credit of the edges and -clusters of is at least:
Since by invariant DC2 for level , the total credit of -clusters of and edges of is at least . Thus, by assigning this credit to , we can argue that credits of -clusters and edges of are enough to maintain DC1 for .
3.3.3 No Phase 1 or 2 clusters
We now deal with the case when there are no level- clusters formed in Phase 1 and 2.
There is no level- cluster formed in Phase 1 and 2 if and only if (i) the tree of -clusters is a path and (ii) every spanner edge is incident to an -cluster in an affix of having effective diameter at most .
By Claim 13, we only need to pay for spanner edges incident to short affix clusters of . Since short clusters have at most -clusters, there are at most such spanner edges, that we assign to set (Lemma 7). Below, we show that across all levels, implying Lemma 7.