Skip to content

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

Chih-Hung Liu

cs.CGarXiv:2610.17430

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( n+k) query time and O(n 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 n) space, O( n+k) query time and expected O(n n) preprocessing time. An open question is the existence of an optimal data structure with O(n) space and O( 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( n + k) query time and expected O(n 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 Lp 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.

Create a lesson