Table of Contents
Fetching ...

On the closest pair of points problem

Martin Hitz, Michaela Hitz

TL;DR

The paper revisits the closest-pair of points problem in the plane and introduces two deterministic algorithms, cppAPs and cppMM, rooted in packing theory and grid-based pruning, to improve practical performance over classical methods. cppMM is proven to have $O(n)$ time for uniformly distributed inputs, using a packing-bound grid to realize a deterministic, linear-time average-case algorithm, while cppAPs offers a simple but extremely fast all-pairs variant with strong empirical performance despite an $O(n^2)$ worst case. An extensive empirical study compares these methods against classical algorithms across distributions and up to $n = 2^{25}$, showing cppMM dominating for large-scale problems. The work provides practical, easy-to-implement deterministic options for CPP with notable impact on large point-cloud tasks in computational geometry.

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.

On the closest pair of points problem

TL;DR

The paper revisits the closest-pair of points problem in the plane and introduces two deterministic algorithms, cppAPs and cppMM, rooted in packing theory and grid-based pruning, to improve practical performance over classical methods. cppMM is proven to have time for uniformly distributed inputs, using a packing-bound grid to realize a deterministic, linear-time average-case algorithm, while cppAPs offers a simple but extremely fast all-pairs variant with strong empirical performance despite an worst case. An extensive empirical study compares these methods against classical algorithms across distributions and up to , showing cppMM dominating for large-scale problems. The work provides practical, easy-to-implement deterministic options for CPP with notable impact on large point-cloud tasks in computational geometry.

Abstract

We introduce two novel algorithms for the problem of finding the closest pair in a cloud of 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 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 . We embed the new algorithms in a review of the most prominent contenders and empirically demonstrate their runtime behavior for problem sizes up to 33,554,432 points observed in our C++ test environment. For large , cppMM dominates the other algorithms under study.
Paper Structure (8 sections, 2 theorems, 16 equations, 8 figures, 3 tables, 8 algorithms)

This paper contains 8 sections, 2 theorems, 16 equations, 8 figures, 3 tables, 8 algorithms.

Key Result

Theorem 3.2

The maximum of the minimal distance is not greater than with where and

Figures (8)

  • Figure 1: Number of iterations $I_2(n)$ of the nested for-loop of cppAP and cppAPs for $n$ points divided by $I_2(n/2)$. Log scale on the abscissa.
  • Figure 2: For $n = 100$ points in the unit square, the upper bound for the minimum distance is $\bar{\delta}=0.117$. Since $1/\bar{\delta}=8.523$, we construct a $9\times9$ grid with smaller residual grid cells on the right and bottom border of the square. A closest pair of points must either lie entirely in one of the grid cells, or one point resides in a cell and the other point in one of the eight neighbouring cells. Due to symmetry, it suffices to check only four of its neighbours of each cell, as illustrated for the case of cell $G_{2,4}$.
  • Figure 3: Typical test-sets with 1024 pseudo-random points: uniform distribution (left) and truncated normal distribution with $\mu = (0.5, 0.5)^\top$ and $\sigma = 0.2$ (right).
  • Figure 4: Running times of Algorithms 1-7 with uniformly distributed points (microseconds, log scales).
  • Figure 5: Running times of Algorithms 1-7 with truncated normally distributed points ($\mu = (0.5, 0.5)^\top$, $\sigma = 0.2$, microseconds, log scales).
  • ...and 3 more figures

Theorems & Definitions (3)

  • Theorem 3.2: SzaboEtAl2001
  • Theorem 5.1
  • proof