๐ค AI Summary
This work addresses the problem of efficiently finding the closest pair of points in large-scale point clouds by introducing, for the first time, the mathematical theory of optimal sphere packing into this domain. Two deterministic algorithms, cppMM and cppAPs, are proposed, with cppMM achieving linear time complexity on uniformly distributed point sets and offering straightforward implementation. Through a high-performance C++ implementation and extensive large-scale experiments, cppMM demonstrates superior empirical performance, significantly outperforming existing methods on datasets containing up to 33,554,432 points. The algorithm achieves the best observed running times in practice, highlighting its dual advantages of theoretical novelty and practical efficiency.
๐ Abstract
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.