arXiv Science⌕ Search

arXiv · 2610.17430

Optimal Planar $k$ Nearest Neighbors Queries for Additively Weighted Euclidean Distances and Convex Metrics

Abstract

Given a set $P$ of $n$ point sites in the plane, the $k$ nearest neighbors problem is to build a data structure that, for a query point $v$ and a query integer $k$, reports the $k$ nearest point sites of $v$ in $P$ efficiently. For the Euclidean metric, after four decades of efforts, an optimal data structure has been developed with $O(n)$ space, $O(\log n+k)$ query time and $O(n\log n)$ preprocessing time [Mat92b, Cha00, AC09, CT16]. In contrast, for a family of distance functions, the state-of-the-art data structure [AES99, KMR+20, Liu22] attains $O(n\log\log n)$ space, $O(\log n+k)$ query time and expected $O(n\log n)$ preprocessing time. An open question is the existence of an optimal data structure with $O(n)$ space and $O(\log n + k)$ query time for distance functions more general than the Euclidean metric. Such an optimal data structure also remains unknown for non-point sites in the Euclidean metric, even for disk sites or, more generally, additively weighted Euclidean distances. We develop an optimal $k$-nearest-neighbors data structure for additively weighted Euclidean distances with $O(n)$ space, $O(\log n + k)$ query time and expected $O(n\log n)$ preprocessing time. Since this data structure can be adjusted to disk sites, it serves as an initial result toward optimality for non-point sites. We also adapt our data structure to point sites under a family of convex metrics, including commonly used $L_p$ metrics and uniform orientation metrics. The data structure can be further extended to distance functions that satisfy certain axioms. Thus, we demonstrate the existence of optimal $k$-nearest-neighbors data structures for distance functions more general than point sites in the Euclidean metric. Our main technical advance is to generalize Matoušek's shallow partition theorem for hyperplanes [Mat92b] to these settings, while achieving a logarithmic crossing number.

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Chih-Hung Liu. 2026-10-12. Optimal Planar $k$ Nearest Neighbors Queries for Additively Weighted Euclidean Distances and Convex Metrics. https://arxiv.org/abs/2610.17430

Cite the original work for its findings. Save a collection to share your selection of sources.

KEEP EXPLORING

Related papers

Symbolic Constraints in Polyhedral Enclosure and Tetrahedral Decomposition in Genus-0 Polyhedra

I present an exploratory, coordinate-free framework for organizing two related problems in polyhedral combinatorics: screening polygonal face multisets for genus-zero enclosure and examining tetrahedral decompositions that preserve the original boundary vertex set. The boundary is summarized using a face-degree excess measure that records how far the surface departs from full triangulation, while standard Euler and incidence relations provide exact constraints and parity-dependent bounds on the external structure. For tetrahedral decompositions, standard incidence relations for a triangulated 3-ball are separated from the additional patterns generated by a restricted boundary-driven decomposition procedure. Within the manually constructed examples, bipyramidal configurations provide an extremal reference class, and departures from bipyramidal structure are associated with changes in attainable tetrahedral states. The examples also suggest a contraction of the realized internal state space as boundary face-degree excess increases, motivating the notions of S-flexibility and incidence-gated transitions. These patterns are presented as empirical structural observations and conjectural directions rather than general classification theorems. The resulting framework provides a symbolic pre-screening workflow that can reject some impossible polygonal face multisets before explicit graph construction or geometric realization, and is implemented in the open-source R package polyenclose.

cs.CG↗

Updating zigzag representatives efficiently

Computation of zigzag persistence has progressed in recent years, with results showing that complexities of many problems closely align with those in the non-zigzag setting. The major efficiency gap now lies in the updating of zigzag representatives. In this paper, we propose efficient algorithms for updating zigzag representatives based on a recent algorithm for extracting zigzag representatives from a $R=DV$ decomposition of a constructed non-zigzag. The main difficulty for designing our update algorithms lies in the adjacency change occurring in two operations that lengthen or shorten a filtration. Despite the adjacency change, we find that the update can still be done efficiently in quadratic time.

cs.CG↗

Shaving Two Logs for Discrete and Continuous Fréchet Distance

We revisit the classical computational geometry problem of computing the exact (discrete or continuous) Fréchet distance between two given polygonal curves with $n$ vertices in a constant dimension $d$. 1. We present an $O((n^2/\log^2n)\log^2\log n)$-time deterministic algorithm for the discrete Fréchet distance problem, improving the previous $O((n^2/\log n)\log\log n)$ result by Agarwal, Ben Avraham, Kaplan, and Sharir [SODA'13]. 2. We present an $O((n^2/\log^2n)\log^2\log n)$-time deterministic algorithm for the decision version of the continuous Fréchet distance problem, improving the previous $O((n^2/\log n)\log^2\log n)$ result by Buchin, Buchin, Meulemans, and Mulzer [SODA'14] and the recent $O(n^2/\log^{1+μ}n)$ randomized result by Cheng and Huang [SODA'25] for a small unspecified constant $μ>0$ (which converges to 0 as $d$ increases). 3. Finally, we present an $O((n^2/\log^2 n)\log^{O(1)}\log n)$-time Las Vegas randomized algorithm for the continuous Fréchet distance problem, improving the previous $O(n^2\log^2\log n)$ randomized result by Buchin, Buchin, Meulemans, and Mulzer [SODA'14] and the recent $O(n^2/\log^μn)$-time randomized result claimed by Cheng and Huang [SODA'25]. Since these problems have near-quadratic OV-based conditional lower bounds and shaving of two log factors is the best that is known for similar, simpler problems such as longest common subsequence and edit distance, our results reach the natural limit of the current state of the art (up to $\log\log$ factors).

cs.CG↗