CS Paper Radar

Deterministic Distance Selection in $O(n^{4/3})$ Time

Haitao Wang

cs.CG cs.DS ·submitted 2026-10-07 18:34 UTC · v1
top venue

Abstract

Let $P$ be a set of $n$ points in the plane. Given an integer $K$ with $1\le K\le {n\choose 2}$, the distance selection problem asks for the $K$-th smallest distance among all pairwise distances of the points of $P$. The problem has been studied extensively over the past four decades. Recently, Chan and Zheng (2023) gave a randomized algorithm with $O(n^{4/3})$ expected running time, while the best known deterministic algorithm runs in $O(n^{4/3}\log n)$ time. In this paper, we present a deterministic $O(n^{4/3})$-time algorithm for the problem, matching the best known randomized complexity. We also consider the more general bichromatic version of the problem, where two point sets $A$ and $B$ are given, with $m=|A|$ and $n=|B|$, and the goal is to find the $K$-th smallest distance among the $mn$ distances between points of $A$ and points of $B$. For this problem, the best previously known algorithm runs in $O((m\log n+n\log m+m^{2/3}n^{2/3})\log(m+n))$ time. We present a new deterministic algorithm with running time $O(m\log^2 n+n\log^2 m+m^{2/3}n^{2/3})$.

Comment
To appear in SODA 2027

Closest papers

Nearest neighbours by meaning across the whole index.

Improved Bounds on Distance Preservers

cs.DS ·2026-11-04 ·Yanyu Chen, Yu Chen, Zihan Tan, Mingyang Yang
theory similarity 0.68
Abstract

Given an undirected unweighted graph $G$ on $n$ vertices and a set $P$ of $p$ pairs of its vertices, a distance preserver is a sparse subgraph of $G$ that exactly preserves the shortest-path distances between all pairs in $P$. In this paper, we prove a new upper bound of $O(n^{8/9} p^{4/9})$ for distance preservers when $p\in [n^{1/2}, n]$. Our result improves the previous bound of $O\big(n^{2/3}p^{2/3}+np^{1/3}\big)$ by Bodwin and Vassilevska Williams and $O(\min\{n+n^{1/2}p,\,np^{1/2}\})$ by Coppersmith and Elkin, particularly in the regime $p\in [n^{7/10}, n]$, and narrows the gap toward the conjectured $O(n^{2/3}p^{2/3}+n)$ bound. Using the techniques developed for distance preservers, we are also able to obtain pairwise additive $+2$ spanners with $O(n+n^{9/10}p^{2/5})$ edges, pairwise additive $+4$ spanners with $O(n+n^{24/25}p^{8/25})$ edges, and new bounds for sourcewise spanners, improving upon previous results in certain parameter regimes.

0.27

Approximation Algorithm for the Min-Cost Bipartite Matching with Penalties

cs.CG cs.DS ·2026-09-22 ·Eunjin Oh, Seongbin Park, Chanho Song
similarity 0.67
Abstract

In this paper, we study the minimum-cost bipartite matching with penalties problem in metric spaces with bounded doubling dimension: Given two disjoint sets $R, B$ in a metric space $\mathcal{M}$ with $|R|+|B|=n$ and a penalty function $p \colon R \cup B \to \mathbb{R}_{\ge 0}$, the goal is to select a set of pairs in $R\times B$ so that every point belongs to at most one pair and the sum of the distances of the selected pairs and the penalties of the points not belonging to any pair is minimized. While near-linear time approximation algorithms are known for the minimum-cost perfect matching problem in geometric settings, no such algorithm was previously known for the penalty setting. We present a randomized algorithm that computes a $(1+\varepsilon)$-approximate minimum-cost bipartite matching with penalties in $O(n \mathrm{poly}(\log n, 1/\varepsilon))$ time with high probability. To the best of our knowledge, this is the first near-linear time approximation algorithm for the problem in the penalty setting.

0.11

Avoiding Distances

cs.CG cs.DMmath.CO ·2026-10-17 ·Adrian Dumitrescu, Zsolt Lángi
similarity 0.66
Abstract · 14 pages, two figures

Given a finite planar point set $X=\{x_1,\ldots,x_n\}$, let $a_1<a_2< \cdots < a_s$ denote the $s \leq {n \choose 2}$ different (Euclidean) distances between points in $X$. The aim is to retain as many of the points as possible such that certain imposed inter-pair distances are avoided. For example, we show that: (A) Given a set $X$ of $n$ points in the plane, an independent set of size $0.2293 n$ in the unit distance graph determined by $X$ can be found in $O(n^2)$ time. For any fixed $k \in \mathbf{N}$ there exists a constant $c_k>0$ such that for any set $X$ of $n$ points in the plane, and set $D$ of size $k$, there exists a subset $X' \subseteq X$ of size $|X'| \geq c_k |X|$ in which no pair of points is at some distance in $D$ (we say that $X'$ avoids distances in $D$). Such a set can be found efficiently. (B) (i) There is a subset of $X$ of size $n/2$ that avoids the maximum distance; this bound cannot be improved. (ii) There is a subset of $X$ of size $8n/47$ that avoids both the minimum and maximum distance; on the other hand, there exists $X$ such that at most $5n/16$ points can be retained with this property. (iii) There is a subset of $X$ of size $n/7$ whose diameter is at most half the original diameter; on the other hand, there exists $X$ such that at most $n/6$ points can be retained with this property. (C) (i) For any $\varepsilon>0$, a $(1-\varepsilon)$-approximation for \textsc{MIS} in the minimum distance graph of $n$ points in the plane can be found in $2^{O(1/\varepsilon)} n^{O(1)}$ time. (ii) Given a set $X$ of $n$ points in the plane, a maximum independent set in the graph of diameters can be computed in $O(n^2)$ time. The techniques used to handle the planar case can be extended to $\mathbf{R}^d$ for any fixed dimension $d$.

0.28

Upper and Lower Bounds on the Complexity of Unit-Distance Graph Realization in $\mathbb{Z}^d$

cs.CC ·2026-10-27 ·Eric Binnendyk
theory similarity 0.66
Abstract

It is known that the problem of recognizing the existence of a unit-distance realization in $\mathbb{Z}^d$ for a graph $G$ is NP-complete. Here, assuming ETH, we give a sub-exponential lower bound of $2^{Ω(\sqrt{n})}$ for this problem in $\mathbb{Z}^2$ and $2^{Ω(n^{2/3})}$ in $\mathbb{Z}^3$, and give an upper bound of $2^{O(n^{(d-1)/d} (\log n)^2)}$ for the time complexity with an explicit divide-and-conquer algorithm. This approach beats naive exhaustive search by a factor of $\tildeΩ(n^{1/d})$ in the exponent. For 2 and 3 dimensions, our upper and lower bounds match to within a logarithmic factor.

0.27

Shaving Two Logs for Discrete and Continuous Fréchet Distance

cs.CG ·2026-10-12 ·Timothy M Chan, Isaac M Hair
similarity 0.66
Abstract

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).

0.27

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

cs.CG ·2026-10-12 ·Chih-Hung Liu
top venuetheory similarity 0.66
Abstract · 78 pages. A conference version will appear in the Proceedings of the ACM-SIAM Symposium on Discrete Algorithms (SODA 2027)

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.

0.42

Improved Approximation and Hardness Results for the Monitoring Edge-Geodetic Set Problem

cs.DS ·2026-10-20 ·Davide Bilò, Giordano Colli, Stefano Leucci
theory similarity 0.65
Abstract · 18 pages, 4 figures

We study the \emph{Monitoring Edge-Geodetic Set} problem (MEG-Set), which asks for a minimum-cardinality set $M$ of vertices of an undirected graph $G$ of $n$ vertices such that every edge of $G$ belongs to all shortest paths between some pair of vertices in $M$. We present new approximation and hardness results for MEG-Set. On the positive side, we design a deterministic polynomial-time $O(n^{1/3}\log^{2/3}n)$-approximation algorithm, improving upon the previously best-known $O(\sqrt{n\log n})$ approximation ratio. On the negative side, for every constant $\varepsilon \in (0,1)$, we prove that the problem admits no polynomial-time $\big(2^{\log^{1-\varepsilon} n}\big)$-approximation algorithm, unless $\mathsf{NP}\subseteq \mathsf{DTIME}(n^{\operatorname{polylog} n})$. This substantially improves upon the previously known logarithmic inapproximability bound. We also prove that \megset is $\mathsf{NP}$-hard on planar $2$-degenerate graphs, whereas $\mathsf{NP}$-hardness was previously known for $1$-apex $2$-degenerate graphs. We conclude by observing a connection between monitoring edge-geodetic sets and subsetwise distance preservers, i.e., subgraphs that preserve distances between all pairs of vertices in $S\subseteq V(G)$. Specifically, we show that any upper bound on the size of the latter yields a lower bound on the size of the former.

0.23

Deterministic Streaming Lower Bounds for Approximate Maximum Clique and Maximum Independent Set

cs.DS ·2026-09-16 ·Adithya Diddapur
theory similarity 0.64
Abstract · 25 pages, 1 figure

We study the canonical \textsf{Maximum Clique} and \textsf{Maximum Independent Set} problems in the one-pass edge-arrival graph streaming setting. Here, the edges of some input graph $G = (V,E)$ are presented one at a time (possibly including deletions), before an algorithm needs to produce either a large clique or independent set at the end of the stream, with the focus being on space complexity. We are interested in finding $β$-approximate solutions, for any $β\geq 1$. Previous work gave an algorithm using $\tilde{O}\left(n^2/β^2\right)$ bits of space, together with a corresponding $\tildeΩ\left(n^2/β^2\right)$ two-party communication lower bound [Halldórsson et al., ICALP'12], seeming to resolve the problem. However, their algorithm crucially relies on randomness, and the best known deterministic algorithm remains a folklore derandomisation using $O\left(n^2/β\right)$ bits of space, leaving a (deterministic) gap of size $\tilde{O}(β)$. We make progress towards this gap with a strong lower bound for a restricted range of $β$: whenever $β\leq \sqrt{n}/36\log n$, any deterministic algorithm for either problem must use $Ω\left(\frac{n^2}{β\cdot\log n}\right)$ bits of space. Our proof is via a two-party one-way communication lower bound, and highlights the power of randomness when approaching either of these problems.

0.30