Article

Discrete & Computational Geometry

, Volume 4, Issue 2, pp 101-115

First online:

AnO(n logn) algorithm for the all-nearest-neighbors Problem

  • Pravin M. VaidyaAffiliated withDepartment of Computer Science, University of Illinois at Urbana-Champaign

Rent the article at a discount

Rent now

* Final gross prices may vary according to local VAT.

Get Access

Abstract

Given a setV ofn points ink-dimensional space, and anL q -metric (Minkowski metric), the all-nearest-neighbors problem is defined as follows: for each pointp inV, find all those points inV−{p} that are closest top under the distance metricL q . We give anO(n logn) algorithm for the all-nearest-neighbors problem, for fixed dimensionk and fixed metricL q . Since there is an Θ(n logn) lower bound, in the algebraic decision-tree model of computation, on the time complexity of any algorithm that solves the all-nearest-neighbors problem (fork=1), the running time of our algorithm is optimal up to a constant factor.