TOPICS
Search

Relative Neighborhood Graph


A relative neighborhood graph is an undirected graph on a finite set of points in a metric space. Two distinct vertices u and v are joined by an edge iff no third point of the set is strictly closer to both u and v than they are to each other. Thus, with metric d, a third point w rules out the edge exactly when

 max(d(u,w),d(v,w))<d(u,v).

For points in the Euclidean plane with Euclidean distance, this gives the original construction of Toussaint (1980). The relative neighborhood graph contains every Euclidean minimum spanning tree on the same point set and is a subgraph of the Gabriel graph. Drawing its edges as line segments therefore gives a plane graph.

Under the Manhattan distance, the four points (1,0), (-1,0), (0,1), and (0,-1) all have pairwise distance 2. Every pair therefore forms an edge, giving the complete graph K_4. Although K_4 is a planar graph, the horizontal and vertical edges cross at the origin in this straight-line drawing (Böltz 2026).

Zzyzek (2026) reports a Lean formalization of an algorithm that constructs the relative neighborhood graph for points in the half-open cube [0,1)^3 with Euclidean distance. It bins the points in a grid and searches outward from each point, using nearby points to exclude candidates beyond the search region. For n independently and uniformly distributed points, the formal model has an expected operation count of O(n), where O denotes big-O notation. Zzyzek reports that Claude produced the model and proofs. The correctness and cost results concern the model over the real numbers, while the separate C++ implementation uses floating-point arithmetic.


See also

Gabriel Graph, Metric Space, Minimum Spanning Tree, Plane Graph

Explore with Wolfram|Alpha

References

Böltz, L. M. Verification of Graph Algorithms in the Context of Wireless Networks. Koblenz, Germany: University of Koblenz, 2026. https://doi.org/10.82549/opus4-2740.Toussaint, G. T. "The Relative Neighbourhood Graph of a Finite Planar Set." Pattern Recognit. 12, 261-268, 1980. https://doi.org/10.1016/0031-3203(80)90066-7.Zzyzek, Z. "Expected Linear Time for the Relative Neighborhood Graph of Uniform Points in the Unit Cube." Palomar Registry, Nov. 22, 2026. https://palomar-registry.org/entry.html?id=PALOMAR-2026-11-22-000014&version=1.

Cite this as:

Weisstein, Eric W. "Relative Neighborhood Graph." From MathWorld--A Wolfram Resource. https://mathworld.wolfram.com/RelativeNeighborhoodGraph.html

Subject classifications