Document Open Access Logo

Improved Algorithms for Distance Selection and Related Problems

Authors Haitao Wang, Yiming Zhao

Thumbnail PDF


  • Filesize: 0.67 MB
  • 14 pages

Document Identifiers

Author Details

Haitao Wang
  • School of Computing, University of Utah, Salt Lake City, UT, USA
Yiming Zhao
  • Department of Computer Science, Utah State University, Logan, UT, USA

Cite AsGet BibTex

Haitao Wang and Yiming Zhao. Improved Algorithms for Distance Selection and Related Problems. In 31st Annual European Symposium on Algorithms (ESA 2023). Leibniz International Proceedings in Informatics (LIPIcs), Volume 274, pp. 101:1-101:14, Schloss Dagstuhl - Leibniz-Zentrum für Informatik (2023)


In this paper, we propose new techniques for solving geometric optimization problems involving interpoint distances of a point set in the plane. Given a set P of n points in the plane and an integer 1 ≤ k ≤ binom(n,2), the distance selection problem is to find the k-th smallest interpoint distance among all pairs of points of P. The previously best deterministic algorithm solves the problem in O(n^{4/3} log² n) time [Katz and Sharir, 1997]. In this paper, we improve their algorithm to O(n^{4/3} log n) time. Using similar techniques, we also give improved algorithms on both the two-sided and the one-sided discrete Fréchet distance with shortcuts problem for two point sets in the plane. For the two-sided problem (resp., one-sided problem), we improve the previous work [Avraham, Filtser, Kaplan, Katz, and Sharir, 2015] by a factor of roughly log²(m+n) (resp., (m+n)^ε), where m and n are the sizes of the two input point sets, respectively. Other problems whose solutions can be improved by our techniques include the reverse shortest path problems for unit-disk graphs. Our techniques are quite general and we believe they will find many other applications in future.

Subject Classification

ACM Subject Classification
  • Theory of computation → Computational geometry
  • Theory of computation → Design and analysis of algorithms
  • Geometric optimization
  • distance selection
  • Fréchet distance
  • range searching


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


  1. Pankaj K. Agarwal, Boris Aronov, Micha Sharir, and Subhash Suri. Selecting distances in the plane. Algorithmica, 9(5):495-514, 1993. Google Scholar
  2. Pankaj K. Agarwal, Rinat B. Avraham, Haim Kaplan, and Micha Sharir. Computing the discrete Fréchet distance in subquadratic time. SIAM Journal on Computing, 43:429-449, 2014. Google Scholar
  3. Helmut Alt and Michael Godau. Computing the Fréchet distance between two polygonal curves. International Journal of Computational Geometry and Applications, 5:75-91, 1995. Google Scholar
  4. Rinat B. Avraham, Omrit Filtser, Haim Kaplan, Matthew J. Katz, and Micha Sharir. The discrete and semicontinuous Fréchet distance with shortcuts via approximate distance counting and selection. ACM Transactions on Algorithms, 11(4):Article No. 29, 2015. Google Scholar
  5. Kevin Buchin, Maike Buchin, and Yusu Wang. Exact algorithms for partial curve matching via the Fréchet distance. In Proceedings of the 20th Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 645-654, 2009. Google Scholar
  6. Maike Buchin, Anne Driemel, and Bettina Speckmann. Computing the Fréchet distance with shortcuts is NP-hard. In Proceedings of the 30th Annual Symposium on Computational Geometry (SoCG), pages 367-376, 2014. Google Scholar
  7. Timothy M. Chan. On enumerating and selecting distances. International Journal of Computational Geometry and Application, 11:291-304, 2001. Google Scholar
  8. Timothy M. Chan and Dimitrios Skrepetos. All-pairs shortest paths in unit-disk graphs in slightly subquadratic time. In Proceedings of the 27th International Symposium on Algorithms and Computation (ISAAC), pages 24:1-24:13, 2016. Google Scholar
  9. 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. Full version with new results available at URL:
  10. Bernard Chazelle. New techniques for computing order statistics in Euclidean space. In Proceedings of the 1st Annual Symposium on Computational Geometry (SoCG), pages 125-134, 1985. Google Scholar
  11. Bernard Chazelle. Cutting hyperplanes for divide-and-conquer. Discrete and Computational Geometry, 9(2):145-158, 1993. Google Scholar
  12. Anne Driemel and Sariel Har-Peled. Jaywalking your dog: computing the Fréchet distance with shortcuts. SIAM Journal on Computing, 42(5):1830-1866, 2013. Google Scholar
  13. Michael T. Goodrich. Geometric partitioning made easier, even in parallel. In Proceedings of the 9th Annual Symposium on Computational Geometry (SoCG), pages 73-82, 1993. Google Scholar
  14. Matthew J. Katz and Micha Sharir. An expander-based approach to geometric optimization. SIAM Journal on Computing, 26(5):1384-1408, 1997. Google Scholar
  15. Matthew J. Katz and Micha Sharir. Efficient algorithms for optimization problems involving semi-algebraic range searching. arXiv, 2021. URL:
  16. Alexander Lubotzky, Ralph Phillips, and Peter Sarnak. Explicit expanders and the Ramanujan conjectures. In Proceedings of the 18th Annual ACM Symposium on Theory of Computing (STOC), pages 240-246, 1986. Google Scholar
  17. Jiří Matoušek. Randomized optimal algorithm for slope selection. Information Processing Letters, 39:183-187, 1991. Google Scholar
  18. Haitao Wang. Unit-disk range searching and applications. In Proceedings of the 18th Scandinavian Symposium and Workshops on Algorithm Theory (SWAT), pages 32:1-32:17, 2022. Google Scholar
  19. Haitao Wang and Jie Xue. Near-optimal algorithms for shortest paths in weighted unit-disk graphs. Discrete and Computational Geometry, 64:1141-1166, 2020. Google Scholar
  20. Haitao Wang and Yiming Zhao. Reverse shortest path problem for unit-disk graphs. Journal of Computational Geometry, 14(1):14-47, 2023. Google Scholar
  21. Andrew Chi-Chih Yao. On constructing minimum spanning trees in k-dimensional spaces and related problems. SIAM Journal on Computing, 11(4):721-736, 1982. Google Scholar
Questions / Remarks / Feedback

Feedback for Dagstuhl Publishing

Thanks for your feedback!

Feedback submitted

Could not send message

Please try again later or send an E-mail