Algorithms for Computing Closest Points for Segments

Author Haitao Wang

Thumbnail PDF


  • Filesize: 0.8 MB
  • 17 pages

Document Identifiers

Author Details

Haitao Wang
  • Kahlert School of Computing, University of Utah, Salt Lake City, UT, USA

Cite AsGet BibTex

Haitao Wang. Algorithms for Computing Closest Points for Segments. In 41st International Symposium on Theoretical Aspects of Computer Science (STACS 2024). Leibniz International Proceedings in Informatics (LIPIcs), Volume 289, pp. 58:1-58:17, Schloss Dagstuhl – Leibniz-Zentrum für Informatik (2024)


Given a set P of n points and a set S of n segments in the plane, we consider the problem of computing for each segment of S its closest point in P. The previously best algorithm solves the problem in n^{4/3}2^{O(log^*n)} time [Bespamyatnikh, 2003] and a lower bound (under a somewhat restricted model) Ω(n^{4/3}) has also been proved. In this paper, we present an O(n^{4/3}) time algorithm and thus solve the problem optimally (under the restricted model). In addition, we also present data structures for solving the online version of the problem, i.e., given a query segment (or a line as a special case), find its closest point in P. Our new results improve the previous work.

Subject Classification

ACM Subject Classification
  • Theory of computation → Design and analysis of algorithms
  • Theory of computation → Computational geometry
  • Closest points
  • Voronoi diagrams
  • Segment dragging queries
  • Hopcroft’s problem
  • Algebraic decision tree model


  • Access Statistics
  • Total Accesses (updated on a weekly basis)
    PDF Downloads


  1. Pankaj K. Agarwal. Partitioning arrangements of lines II: Applications. Discrete and Computational Geometry, 5:533-573, 1990. Google Scholar
  2. Pankaj K. Agarwal and Micha Sharir. Applications of a new space-partitioning technique. Discrete and Computational Geometry, 9:11-38, 1993. Google Scholar
  3. Boris Aronov, Mark de Berg, Jean Cardinal, Esther Ezra, John Iacono, and Micha Sharir. Subquadratic algorithms for some 3Sum-Hard geometric problems in the algebraic decision tree model. In Proceedings of the 32nd International Symposium on Algorithms and Computation (ISAAC), pages 3:1-3:15, 2021. Google Scholar
  4. Reuven Bar-Yehuda and Sergio Fogel. Variations on ray shootings. Algorithmica, 11:133-145, 1994. Google Scholar
  5. Michael A. Bender and Martin Farach-Colton. The LCA problem revisited. In Proceedings of the 4th Latin American Symposium on Theoretical Informatics, pages 88-94, 2000. Google Scholar
  6. Sergei Bespamyatnikh. Computing closest points for segments. International Journal of Computational Geometry and Application, 13:419-438, 2003. Google Scholar
  7. Sergei Bespamyatnikh and Jack Snoeyink. Queries with segments in Voronoi diagrams. Computational Geometry: Theory and Applications, 16:23-33, 2000. Google Scholar
  8. Timothy M. Chan. Geometric applications of a randomized optimization technique. Discrete and Computational Geometry, 22:547-567, 1999. Google Scholar
  9. Timothy M. Chan. Optimal partition trees. Discrete and Computational Geometry, 47:661-690, 2012. Google Scholar
  10. Timothy M. Chan and Da Wei Zheng. Hopcroft’s problem, log-star shaving, 2D fractional cascading, and decision trees. In Proceedings of the 33rd Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 190-210, 2022. Google Scholar
  11. Timothy M. Chan and Da Wei Zheng. Simplex range searching revisited: How to shave logs in multi-level data structures. In Proceedings of the 34th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 1493-1511, 2023. Google Scholar
  12. Bernard Chazelle. An algorithm for segment-dragging and its implementation. Algorithmica, 3:205-221, 1988. Google Scholar
  13. Bernard Chazelle. Cutting hyperplanes for divide-and-conquer. Discrete and Computational Geometry, 9:145-158, 1993. Google Scholar
  14. Bernard Chazelle and Leonidas J. Guibas. Fractional cascading: I. A data structuring technique. Algorithmica, 1:133-162, 1986. Google Scholar
  15. Bernard Chazelle, Leonidas J. Guibas, and D.T. Lee. The power of geometric duality. BIT, 25:76-90, 1985. Google Scholar
  16. Siu Wing Cheng and Ravi Janardan. Algorithms for ray-shooting and intersection searching. Journal of Algorithms, 13:670-692, 1992. Google Scholar
  17. Richard Cole and Chee-Keng Yap. Geometric retrieval problems. In Proceedings of the 24th Annual Symposium on Foundations of Computer Science (FOCS), pages 112-121, 1983. Google Scholar
  18. Ovidiu Daescu, Ningfang Mi, Chan-Su Shin, and Alexander Wolff. Farthest-point queries with geometric and combinatorial constraints. Computational Geometry: Theory and Applications, 33:174-185, 2006. Google Scholar
  19. James R. Driscoll, Neil Sarnak, Daniel D. Sleator, and Robert E. Tarjan. Making data structures persistent. Journal of Computer and System Sciences, 38:86-124, 1989. Google Scholar
  20. Herbert Edelsbrunner, Leonidas J. Guibas, and Micha Sharir. The complexity and construction of many faces in arrangement of lines and of segments. Discrete and Computational Geometry, 5:161-196, 1990. Google Scholar
  21. Jeff Erickson. New lower bounds for Hopcroft’s problem. Discrete and Computational Geometry, 16:389-418, 1996. Google Scholar
  22. Michael L. Fredman. How good is the information theory bound in sorting? Theoretical Computer Science, 1:355-361, 1976. Google Scholar
  23. Jacob E. Goodman and Richard Pollack. Multidimensional sorting. SIAM Journal on Computing, 12:484-507, 1983. Google Scholar
  24. Jacob E. Goodman and Richard Pollack. Upper bounds for configurations and polytopes in R^d. Discrete and Computational Geometry, pages 219-227, 1986. Google Scholar
  25. Partha P. Goswami, Sandip Das, and Subhas C. Nandy. Triangular range counting query in 2D and its application in finding k nearest neighbors of a line segment. Computational Geometry: Theory and Applications, 29:163-175, 2004. Google Scholar
  26. Dov Harel and Robert E. Tarjan. Fast algorithms for finding nearest common ancestors. SIAM Journal on Computing, 13:338-355, 1984. Google Scholar
  27. David G. Kirkpatrick. Efficient computation of continuous skeletons. In Proceedings of the 20th Annual Symposium on Foundations of Computer Science (FOCS), pages 18-27, 1979. Google Scholar
  28. D. T. Lee and Y. T. Ching. The power of geometric duality revisited. Information Processing Letters, 21:117-122, 1985. Google Scholar
  29. Jiří Matoušek. Efficient partition trees. Discrete and Computational Geometry, 8:315-334, 1992. Google Scholar
  30. Jiří Matoušek. Range searching with efficient hierarchical cuttings. Discrete and Computational Geometry, 10:157-182, 1993. Google Scholar
  31. Pinaki Mitra and Bidyut B. Chaudhuri. Efficiently computing the closest point to a query line. Pattern Recognition Letters, 19:1027-1035, 1998. Google Scholar
  32. Asish Mukhopadhyay. Using simplicial paritions to determine a closest point to a query line. Pattern Recognition Letters, 24:1915-1920, 2003. Google Scholar
  33. Mark H. Overmars and Jan van Leeuwen. Maintenance of configurations in the plane. Journal of Computer and System Sciences, 23:166-204, 1981. Google Scholar
  34. Neil Sarnak and Robert E. Tarjan. Planar point location using persistent search trees. Communications of the ACM, 29:669-679, 1986. Google Scholar
  35. Haitao Wang. Algorithms for subpath convex hull queries and ray-shooting among segments. In Proceedings of the 36th International Symposium on Computational Geometry (SoCG), pages 69:1-69:14, 2020. Google Scholar