English

Dynamic Data Structures for $k$-Nearest Neighbor Queries

Computational Geometry 2022-12-02 v2

Abstract

Our aim is to develop dynamic data structures that support kk-nearest neighbors (kk-NN) queries for a set of nn point sites in the plane in O(f(n)+k)O(f(n) + k) time, where f(n)f(n) is some polylogarithmic function of nn. The key component is a general query algorithm that allows us to find the kk-NN spread over tt substructures simultaneously, thus reducing an O(tk)O(tk) term in the query time to O(k)O(k). Combining this technique with the logarithmic method allows us to turn any static kk-NN data structure into a data structure supporting both efficient insertions and queries. For the fully dynamic case, this technique allows us to recover the deterministic, worst-case, O(log2n/loglogn+k)O(\log^2n/\log\log n +k) query time for the Euclidean distance claimed before, while preserving the polylogarithmic update times. We adapt this data structure to also support fully dynamic \emph{geodesic} kk-NN queries among a set of sites in a simple polygon. For this purpose, we design a shallow cutting based, deletion-only kk-NN data structure. More generally, we obtain a dynamic planar kk-NN data structure for any type of distance functions for which we can build vertical shallow cuttings. We apply all of our methods in the plane for the Euclidean distance, the geodesic distance, and general, constant-complexity, algebraic distance functions.

Keywords

Cite

@article{arxiv.2109.11854,
  title  = {Dynamic Data Structures for $k$-Nearest Neighbor Queries},
  author = {Sarita de Berg and Frank Staals},
  journal= {arXiv preprint arXiv:2109.11854},
  year   = {2022}
}

Comments

21 pages, 7 figures

R2 v1 2026-06-24T06:17:27.613Z