Reporting Neighbors in High-Dimensional Euclidean Space

Dror Aiger, Haim Y. Kaplan, Micha Sharir · SIAM Journal on Computing · 2014

We consider the following problem, which arises in many database and web-based applications: Given a set $P$ of $n$ points in a high-dimensional space $\mathbb{R}^d$ and a distance $r$, we want to report all pairs of points of $P$ at Euclidean distance at most $r$. We present two randomized algorithms, one based on randomly shifted grids, and the other on randomly shifted and rotated grids. The running time of both algorithms is of the form $C(d)(n+k)\log n$, where $k$ is the output size and $C(d)$ is a constant that depends on the dimension $d$. The $\log n$ factor is needed to guarantee, with high probability, that all neighbor pairs are reported and can be dropped if it suffices to report, in expectation, an arbitrarily large fraction of the pairs. When only translations are used, $C(d)$ is of the form $(a\sqrt{d})^d$ for some (small) absolute constant $a\approx 0.484$; this bound is worst-case tight, up to an exponential factor of about $2^d$. When both rotationsand translations are used, $C(d)$ can be improved to roughly $6.74^d$, getting rid of the superexponential factor $\sqrt{d}^d$. When the input set (lies in a subset of $d$-space that) has low doubling dimension $\delta$, the performance of the first algorithm improves to $C(d,\delta)(n+k)\log n$ (or to $C(d,\delta)(n+k)$), where $C(d,\delta) = O((ed/\delta)^\delta)$ for $\delta \le \sqrt{d}$. Otherwise, $C(d,\delta) = O( e^{\sqrt{d}} \sqrt{d}^\delta )$. We also present experimental results on several large data sets, demonstrating that our algorithms run significantly faster than all the leading existing algorithms for reporting neighbors.

Read the paper · More papers on PaperTik