Skip to main content
Log in

An optimal algorithm for the on-line closest-pair problem

  • Published:
Algorithmica Aims and scope Submit manuscript

Abstract

We give an algorithm that computes the closest pair in a set ofn points ink-dimensional space on-line, inO(n logn) time. The algorithm only uses algebraic functions and, therefore, is optimal. The algorithm maintains a hierarchical subdivision ofk-space into hyperrectangles, which is stored in a binary tree. Centroids are used to maintain a balanced decomposition of this tree.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Institutional subscriptions

Similar content being viewed by others

References

  1. J. L. Bentley and M. I. Shamos. Divide-and-conquer in multidimensional space.Proc. 8th Annual ACM Symp. on Theory of Computing, 1976, pp. 220–230.

  2. B. Chazelle. A theorem on polygon cutting with applications.Proc. 23rd Annual IEEE Symp. on Foundations of Computer Science, 1982, pp. 339–349.

  3. M. T. Dickerson and R. S. Drysdale. Enumeratingk distances forn points in the plane.Proc. 7th ACM Symp. on Computational Geometry, 1991, pp. 234–238.

  4. L. Guibas, J. Hershberger, D. Leven, M. Sharir, and R. E. Tarjan. Linear time algorithms for visibility and shortest path problems inside triangulated simple polygons.Algorithmica 2 (1987), 209–233.

    Google Scholar 

  5. J. Hershberger. Efficient Algorithms for Shortest Path and Visibility Problems. Report No. STAN-CS-87-1163, Stanford University, Stanford, CA, 1987.

    Google Scholar 

  6. M. H. Overmars.The Design of Dynamic Data Structures. Lecture Notes in Computer Science, Vol. 156. Springer-Verlag, Berlin, 1983.

    Google Scholar 

  7. F. P. Preparata and M. I. Shamos.Computational Geometry, An Introduction. Springer-Verlag, New York, 1985.

    Google Scholar 

  8. J. S. Salowe. Enumerating interdistances in space.Internat. J. Comput. Geom. Appl. 2 (1992), 49–59.

    Google Scholar 

  9. C. Schwarz and M. Smid. AnO(n logn log logn) algorithm for the on-line closest pair problem.Proc. 3rd Annual ACM-SIAM Symp. on Discrete Algorithms, 1992, pp. 280–285.

  10. M. I. Shamos and D. Hoey. Closest-point problems.Proc. 16th Annual IEEE Symp. on Foundations of Computer Science, 1975, pp. 151–162.

  11. M. Smid. Maintaining the minimal distance of a point set in less than linear time.Algorithms Rev. 2 (1991), 33–44.

    Google Scholar 

  12. M. Smid. Rectangular point location and the dynamic closest pair problem. Proc. 2nd Annual Internat. Symp. on Algorithms. Lecture Notes in Computer Science, Vol. 557. Springer-Verlag, Berlin, 1991, pp. 364–374.

    Google Scholar 

  13. M. Smid. Maintaining the minimal distance of a point set in polylogarithmic time.Discrete Comput. Geom. 7 (1992), 415–431.

    Google Scholar 

  14. K. J. Supowit. New techniques for some dynamic closest-point and farthest-point problems.Proc. 1st Annual ACM-SIAM Symp. on Discrete Algorithms, 1990, pp. 84–90.

  15. P. M. Vaidya. AnO(n logn) algorithm for the all-nearest-neighbors problem.Discrete Comput. Geom. 4 (1989), 101–115.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Additional information

Communicated by Kurt Mehlhorn.

These authors were supported by the ESPRIT II Basic Research Actions Program, under Contract No. 3075 (project ALCOM).

This author was supported in part by the National Science and Engineering Research Council of Canada.

Rights and permissions

Reprints and permissions

About this article

Cite this article

Schwarz, C., Smid, M. & Snoeyink, J. An optimal algorithm for the on-line closest-pair problem. Algorithmica 12, 18–29 (1994). https://doi.org/10.1007/BF01377181

Download citation

  • Received:

  • Revised:

  • Issue Date:

  • DOI: https://doi.org/10.1007/BF01377181

Key words

Navigation