Jump to content

Closest pair of points problem

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by David Eppstein (talk | contribs) at 02:05, 20 October 2021 (improve 1 ref, more to come). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
Closest pair of points shown in red

The closest pair of points problem or closest pair problem is a problem of computational geometry: given n points in metric space, find a pair of points with the smallest distance between them. The closest pair problem for points in the Euclidean plane[1] was among the first geometric problems that were treated at the origins of the systematic study of the computational complexity of geometric algorithms.

Randomized algorithms that solve the problem in linear time are known,[2][3] significantly more quickly than the O(n2) time that would be obtained by a naive algorithm of finding distances between all pairs of points in a space of dimension d and selecting the minimum.

In restricted models of computation that disallow the use of the floor function, it is nevertheless possible to solve the problem in near-linear O(n log log n) time.[4] In even more restricted models of computation, such as the algebraic decision tree, the problem can be solved in the somewhat slower O(n log n) time bound, using either plane sweep or geometric divide and conquer methods,[5][6] and this is optimal for this model, by a reduction from the element uniqueness problem.

Dynamic closest-pair problem

The dynamic version for the closest-pair problem is stated as follows:

  • Given a dynamic set of objects, find algorithms and data structures for efficient recalculation of the closest pair of objects each time the objects are inserted or deleted.

If the bounding box for all points is known in advance and the constant-time floor function is available, then the expected O(n) space data structure was suggested that supports expected-time O(log n) insertions and deletions and constant query time. When modified for the algebraic decision tree model, insertions and deletions would require O(log2 n) expected time.[7] It is worth noting, though, that the complexity of the dynamic closest pair algorithm cited above is exponential in the dimension d, and therefore such an algorithm becomes less suitable for high-dimensional problems.

An algorithm for the dynamic closest-pair problem in d dimensional space was developed by Sergey Bespamyatnikh in 1998.[8] Points can be inserted and deleted in O(log n) time per point (in the worst case).

See also

Notes

  1. ^ Shamos, Michael Ian; Hoey, Dan (1975). "Closest-point problems". 16th Annual Symposium on Foundations of Computer Science, Berkeley, California, USA, October 13-15, 1975. IEEE Computer Society. pp. 151–162. doi:10.1109/SFCS.1975.8.
  2. ^ S. Khuller and Y. Matias. A simple randomized sieve algorithm for the closest-pair problem. Inf. Comput., 118(1):34—37,1995
  3. ^ Richard Lipton (24 September 2011). "Rabin Flips a Coin".
  4. ^ S. Fortune and J.E. Hopcroft. "A note on Rabin's nearest-neighbor algorithm." Information Processing Letters, 8(1), pp. 20—23, 1979
  5. ^ K. L. Clarkson, "Fast algorithms for the all nearest neighbors problem", FOCS 1983.
  6. ^ Thomas H. Cormen, Charles E. Leiserson, Ronald L. Rivest, and Clifford Stein. Introduction to Algorithms, Second Edition. MIT Press and McGraw-Hill, 2001. ISBN 0-262-03293-7. Pages 957–961 of section 33.4: Finding the closest pair of points.
  7. ^ Mordecai Golin, Rajeev Raman, Christian Schwarz, Michiel Smid, "Randomized Data Structures For The Dynamic Closest-Pair Problem", SIAM J. Comput., vo. 27, no. 4, 1998, preliminary version reported at the 4th Annu. ACM-SIAM Symp. on Discrete Algorithms, pp. 301–310 (1993)
  8. ^ Sergey Bespamyatnikh, An Optimal Algorithm for Closest-Pair Maintenance. Discrete Comput. Geom., 19:175-195, 1998.

Further reading