In computational geometry, a greedy geometric spanner is an undirected graph whose distances approximate the Euclidean distances among a finite set of points in a Euclidean space. The vertices of the graph represent these points. The edges of the spanner are selected by a greedy algorithm that includes an edge whenever its two endpoints are not connected by a short path of shorter edges. The greedy spanner was first described in the PhD thesis of Gautam Das and conference paper and subsequent journal paper by Ingo Althöfer et al. These sources also credited Marshall Bern (unpublished) with the independent discovery of the same construction.
Greedy geometric spanners have bounded degree, a linear total number of edges, and total weight close to that of the Euclidean minimum spanning tree. Although known construction methods for them are slow, fast approximation algorithms with similar properties are known.
The greedy geometric spanner is determined from an input consisting a set of points and a parameter
t\ge1
t
(u,v)
u
v
t ⋅ d(u,v)
uv
d(u,v)
t
A naive implementation of this method would take time
O(n3logn)
n
O(n2)
O(n)
O(n2)
O(n2logn)
O(n)
O(nlogn)
The same greedy construction produces spanners in arbitrary metric spaces, but in Euclidean spaces it has good properties some of which do not hold more generally.
The greedy geometric spanner in any metric space always contains the minimum spanning tree of its input, because the greedy construction algorithm follows the same insertion order of edges as Kruskal's algorithm for minimum spanning trees. If the greedy spanner algorithm and Kruskal's algorithm are run in parallel, considering the same pairs of vertices in the same order, each edge added by Kruskal's algorithm will also be added by the greedy spanner algorithm, because the endpoints of the edge will not already be connected by a path. In the limiting case when
t
t>n
n
In Euclidean spaces of bounded dimension, for any constant
t
t
n
O(n)
O(n)
Greedy geometric spanners in bounded-dimension Euclidean spaces also have total weight at most a constant times the total weight of the Euclidean minimum spanning tree.This property remains true in spaces of bounded doubling dimension.