Improved Algorithms for Distance Selection and Related Problems

Haitao Wang, Yiming Zhao

TL;DR

Researchers have developed a new deterministic algorithm for the "distance selection problem," finding the $k$-th smallest distance between $n$ points in $O(n^{4/3} \log n)$ time. This breaks a 30-year-old performance ceiling and introduces a "Partial Batched Range Searching" technique that also speeds up calculations for curve similarity (Fréchet distance) and network routing (unit-disk graphs).

What Problem Does This Paper Address?

At its heart, this paper tackles a fundamental question in computational geometry: Given a cloud of $n$ points in a 2D plane, how do you efficiently find the $k$-th smallest distance between any two of them?

While a brute-force approach (checking every pair) takes $O(n^2)$ time, researchers have spent decades trying to push this into "subquadratic" territory. The previous gold standard for a deterministic (non-randomized) algorithm was established in the mid-90s at $O(n^{4/3} \log^2 n)$. For nearly 30 years, that extra $\log$ factor remained an immovable obstacle.

The authors also extend their solutions to related "geometric optimization" problems, such as the Discrete Fréchet Distance (DFD)—used to measure how similar two moving paths are—and Reverse Shortest Path problems in unit-disk graphs, which are often used to model wireless sensor networks.

Methods

The breakthrough relies on a clever relaxation of a standard tool called Batched Range Searching (BRS).

  1. Partial Batched Range Searching (Partial BRS): Traditionally, BRS aims to find all pairs of points within a specific distance interval. This is computationally expensive. The authors introduce "Partial BRS," which resolves most pairs but allows a small number of "uncertain" pairs to remain. By accepting this bit of uncertainty, they can process the points much faster.
  2. Hierarchical Cuttings: To manage the point sets, the authors use hierarchical cuttings to partition the plane into manageable cells (pseudo-trapezoids). This allows them to recursively narrow down where the $k$-th distance might be.
  3. Expander Graphs (LPS-expanders): In the final stages of the algorithm, the authors use expander graphs—highly connected but sparse graphs—to sample distances. This allows them to estimate the distribution of distances without checking every single one.
  4. Cole-like Optimization: They employ a "Cole-like" technique (named after computer scientist Richard Cole) to reduce the number of expensive "decision" steps needed during their binary search for the optimal distance.

Datasets

As a theoretical paper in computational geometry, this work does not use empirical datasets or benchmarks. Instead, it provides mathematical proofs of time complexity for arbitrary sets of $n$ points in a Euclidean plane.

Key Insights and Ideas

  • The Power of Uncertainty: The most significant "aha moment" is that you don't need a perfect range search to solve the global distance selection problem. Resolving the "easy" pairs quickly and handling a small number of "uncertain" pairs separately is more efficient than trying to be perfect at every step.
  • Algorithmic Frameworks: The authors don't just solve one problem; they provide two general frameworks (one deterministic and one randomized). These frameworks can be applied to any geometric optimization problem where the optimal value is defined by the distance between two points in a set.
  • Automatic Sorting: For the Fréchet distance problem, they realized they could bake the sorting of points (by their index along a curve) directly into the range-searching construction, eliminating a major bottleneck in previous algorithms.

Key Results

  • Distance Selection: Improved the deterministic bound from $O(n^{4/3} \log^2 n)$ to $O(n^{4/3} \log n)$.
  • Two-sided Fréchet Distance: Improved the previous best result by roughly a factor of $\log^2(m+n)$.
  • One-sided Fréchet Distance: Achieved an expected time of $O((m+n)^{6/5} \log^{7/5}(m+n))$, a polynomial improvement over previous randomized approaches.
  • Unit-Disk Graphs: Provided new randomized algorithms for the reverse shortest path problem that are faster than existing state-of-the-art methods by reducing "subpolynomial" overhead.

Limitations and Future Work

While this paper represents the first deterministic progress in decades, it is worth noting that randomized algorithms for distance selection are still slightly faster, reaching $O(n^{4/3})$ in some cases. The authors' deterministic version is $O(n^{4/3} \log n)$, so a small gap remains between the best randomized and deterministic approaches.

The authors suggest that their "Partial BRS" technique is quite general. Future work could involve applying this technique to other spatial problems, such as 3D distance selection or more complex curve-matching scenarios in higher dimensions.

Summary updated

BibTeX
@inproceedings{wang2023improved,
  author = {Haitao Wang and Yiming Zhao},
  title = {{Improved Algorithms for Distance Selection and Related Problems}},
  booktitle = {Algorithmica},
  year = {2023},
}
Figure