Score: 0

On the closest pair of points problem

Published: January 9, 2026 | arXiv ID: 2601.05681v1

By: Martin Hitz, Michaela Hitz

Potential Business Impact:

Finds closest points faster in huge groups.

Business Areas:
A/B Testing Data and Analytics

We introduce two novel algorithms for the problem of finding the closest pair in a cloud of $n$ points based on findings from mathematical optimal packing theory. Both algorithms are deterministic, show fast effective runtimes, and are very easy to implement. For our main algorithm, cppMM, we prove $O(n)$ time complexity for the case of uniformly distributed points. Our second algorithm, cppAPs, is almost as simple as the brute-force approach, but exhibits an extremely fast empirical running time, although its worst-case time complexity is also $O(n^2)$. We embed the new algorithms in a review of the most prominent contenders and empirically demonstrate their runtime behavior for problem sizes up to $n =$ 33,554,432 points observed in our C++ test environment. For large $n$, cppMM dominates the other algorithms under study.

Page Count
18 pages

Category
Computer Science:
Data Structures and Algorithms