arXiv:2610.39521cs.CGOct 2026

Manuscript Offprint

arXiv:2610.39521

Certified Small Well-Separated Pair Decompositions in Practice

Guilherme D. da Fonseca

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Given nn points and ε>0\varepsilon > 0, a well-separated pair decomposition (WSPD) is a collection of dumbbells {X,Y}\{X, Y\}, where XX and YY have diameter at most ε\varepsilon times their distance, such that every pair of points has one point in XX and the other in YY for some dumbbell. In a partition WSPD every pair is covered by exactly one dumbbell, while a cover WSPD allows a pair to be covered by several. Callahan and Kosaraju give a partition WSPD with O(n/εd)O(n/\varepsilon^d) dumbbells in Rd\mathbb{R}^d, but many point sets have far smaller WSPDs of both kinds. For d≥2d \geq 2, the known O(1)O(1)-approximations of the minimum size WSPD that preserve the separation ε\varepsilon have unspecified factors, above 10710^7 for d=2d = 2 by our estimates.

For cover WSPDs, we give an O(n2log⁡n)O(n^2 \log n)-time sweep approximation algorithm with a factor 40 in the plane for ε≤1/16\varepsilon \leq 1/16. It extends to Rd\mathbb{R}^d with a factor 2O(d)2^{O(d)}. The sweep is also a lower-bound tool: its number of steps is a lower bound on the WSPD size. For partition WSPDs, we analyze quadtree and fair split tree constructions: in the plane and for ε≤1/5\varepsilon \leq 1/5, they give constant approximation factors, the smallest of which is 252 for a randomly shifted and scaled quadtree.

In experiments with ε=1/20\varepsilon = 1/20, the number of sweep steps is at least 0.91 OPT for n=500n = 500, where the optimum OPT is known, and a local search raises it to a lower bound of 0.99 OPT. A greedy variant of the sweep, which is still a certified 40-approximation, is at most 1.28 times the lower bound for n=10000n = 10000. Followed by a new local-search heuristic that shrinks the WSPD, it is within 0.02% of the optimum on every instance with n=500n = 500, and at most 1.10 times the lower bound for n=10000n = 10000. We then show how to convert the cover WSPDs into partition WSPDs. For n=10000n = 10000, the conversion gives on average 1.13 times the lower bound, against 1.05 for the cover WSPD itself and 1.55 for the Callahan–Kosaraju partition WSPD.

2012 ACM Subject Classification Theory of computation →\to Computational geometry; Theory of computation →\to Approximation algorithms analysis

Keywords and phrases Well-separated pair decomposition, approximation algorithm, local search, set cover, algorithm engineering

Supplementary Material Software: https://github.com/gfonsecabr/small-wspd-experiments

Acknowledgements Use of AI: This paper was prepared with substantial help from the AI assistant Claude (Anthropic). It took part in developing the algorithms and proofs, writing the code and running the experiments, checking the references, and writing the text. The author checked all results and is responsible for the content.

1 Introduction

Let PP be a set of nn points in fixed dimension dd, and let ε∈(0,1)\varepsilon \in (0,1). We write ∥pq∥\|pq\| for the Euclidean distance between points pp and qq, diam(X)\text{diam}(X) for the diameter of a set X⊆PX \subseteq P, and dist(X,Y)=min⁡x∈X,y∈Y∥xy∥\text{dist}(X,Y) = \min_{x \in X, y \in Y} \|xy\|. A dumbbell {X,Y}\{X, Y\} consists of two disjoint nonempty sets X,Y⊆PX, Y \subseteq P, its sides, and it is ε\varepsilon-separated if max⁡{diam(X),diam(Y)}≤ε⋅dist(X,Y)\max\{\text{diam}(X), \text{diam}(Y)\} \leq \varepsilon \cdot \text{dist}(X,Y).

An ε\varepsilon-WSPD of PP is a collection W\mathcal{W} of ε\varepsilon-separated dumbbells that together cover all (n2)\binom{n}{2} pairs of points, and ∣W∣|\mathcal{W}| is its size. A partition WSPD covers every pair exactly once, and we use the term cover WSPD to stress that pairs may be covered by multiple dumbbells.

WSPDs were introduced in [7] and are now a standard tool in computational geometry [17, 19]. The Callahan–Kosaraju (CK) construction [7] computes a partition ε\varepsilon-WSPD of size O(n/εd)O(n/\varepsilon^d) in O(nlog⁡n+n/εd)O(n \log n + n/\varepsilon^d) time, with dumbbells given as pairs of tree nodes. Several

Certified Small WSPDs in Practice

applications of WSPDs only use that every pair is covered at least once, so they work with cover WSPDs. Choosing one edge per dumbbell gives a tt-spanner with ∣W∣|\mathcal{W}| edges [6, 17, 19], and hence an approximate minimum spanning tree [6, 19]; such sparse edge sets also speed up solvers for geometric tour problems [12]. The approximate diameter [19, 14] is found by inspecting every dumbbell once. Other applications, such as the computation of nn-body potential fields [7], approximate distance selection [3, 19], and the approximation of the sum of all pairwise distances [14], need a partition WSPD.

The bound O(n/εd)O(n/\varepsilon^d) is a worst-case bound, and many point sets have much smaller WSPDs. For example, the nn points pi=(i,(4/ε)i)p_i = (i, (4/\varepsilon)^i) have an ε\varepsilon-WSPD with only n−1n-1 dumbbells even in the partition version [5]. Since spanners and many other structures built from a WSPD inherit its size, a WSPD that is as small as possible is desirable.

The input of MINWSPD consists of PP and ε\varepsilon, and the goal is a cover ε\varepsilon-WSPD of PP of minimum size, which we denote by OPTε\mathrm{OPT}_{\varepsilon}, or by OPT if ε\varepsilon is clear from the context. A partition WSPD is in particular a cover WSPD. Therefore, every approximation factor with respect to OPTε\mathrm{OPT}_{\varepsilon} also holds with respect to the partition optimum.

Previous work. MINWSPD was introduced in [5]. It is NP-hard in the plane when ε\varepsilon may depend on nn, and in general metric spaces no polynomial-time algorithm achieves a factor ncn^c, for some constant c>0c > 0, unless P=NPP = \mathrm{NP} [5]. Table 1 lists the known approximation algorithms. For d≥2d \geq 2, the only one stated for the separation ε\varepsilon is based on the net-tree WSPD [15], and its factor 2O(d)2^{O(d)} is unspecified; our rough estimate from its proof is 101110^{11} for d=2d = 2. Greedy set cover over all maximal ε\varepsilon-separated dumbbells keeps the separation and gives an O(log⁡n)O(\log n)-approximation whenever their number is polynomial in nn, which holds on the line but is not known for d≥2d \geq 2 [5]. The constant-factor algorithm of [16] works in every metric space but relaxes the separation (the constants 7 and 33 follow from its proof, see also [5]). In Rd\mathbb{R}^d, the relaxation can be undone: a grid cuts each side of a cεc\varepsilon-separated dumbbell into at most ⌈cd⌉d\lceil c\sqrt{d} \rceil^d pieces whose diameter is at most 1/c1/c times the larger diameter of the two sides, and the pieces form ε\varepsilon-separated dumbbells. For d=2d = 2 and ε<1/33\varepsilon < 1/33, the factor becomes 7⋅474≈3.4⋅1077 \cdot 47^4 \approx 3.4 \cdot 10^7. For d≥2d \geq 2, the question of a (1+δ)(1+\delta)-approximation, or a simple O(1)O(1)-approximation, was raised in [5]. A bicriteria approximation scheme, which computes a (1+δ)ε(1+\delta)\varepsilon-WSPD of size at most (1+δ)OPTε(1+\delta)\mathrm{OPT}_{\varepsilon} in Rd\mathbb{R}^d and in doubling metrics, is given in [8], but its running time is doubly exponential in d/δd/\delta.

Our results. Table 1 places our algorithms among the known approximation results.

  1. Improved cover WSPD approximation factors (Theorem 3). For points in the plane and ε≤1/16\varepsilon \leq 1/16, a sweep algorithm computes a 40-approximation in O(n2log⁡n)O(n^2 \log n) time and O(n2)O(n^2) space. It extends to Rd\mathbb{R}^d for every fixed dd (Theorem 11) with the same time and space bounds, with a factor 2048 for d=3d = 3 and 2O(d)2^{O(d)} in general. It generalizes the 3-approximation of [5] for d=1d = 1 and is a simple O(1)O(1)-approximation, as asked there.

  2. Improved partition WSPD approximation factors (Section 7). For points in the plane and ε≤1/5\varepsilon \leq 1/5, the CK construction on a fair split tree [7] outputs at most 1024 OPT dumbbells in O(nlog⁡n+OPT)O(n \log n + \mathrm{OPT}) time. The same size bound holds for the two variants of our experiments: CK box accepts two tree nodes if their bounding boxes are ε\varepsilon-separated, and CK exact, or just CK, if their point sets are. In the same time, the maximal separated pairs of same-level quadtree cells, with separation tested on the cells, form a partition ε\varepsilon-WSPD of size at most 529 OPT, and of expected size at most 252 OPT for a randomly shifted and scaled quadtree. The deterministic bounds extend to Rd\mathbb{R}^d.

  3. Small cover WSPD in practice (Section 5). A greedy variant of the sweep keeps the approximation factor 40 and runs in O(n3)O(n^3) time (Theorem 7). The number of steps of the sweep is a lower bound on OPT. A local search on the anchors of the steps enlarges it to a lower bound LB (Section 3.3), which certifies the quality of any WSPD. For ε=1/20\varepsilon = 1/20 and n=500n = 500, where OPT is known, the greedy sweep is on average 1.03 OPT, against 1.17 OPT for the CK WSPD, and the lower bound is at least 0.99 OPT. For n=10000n = 10000, where OPT is out of reach, the greedy sweep and the CK WSPD are on average 1.22 LB and 1.55 LB. We present a local-search heuristic (Section 3.2) that post-processes any given WSPD with a single move, reshape, never increasing its size. For n=500n = 500, it brings the sweep to within 0.02% of OPT, and it reaches OPT on 13 of the 22 instances. For n=10000n = 10000, the sweep followed by local search is at most 1.10 LB and on average 1.05 LB.

  4. Small partition WSPD in practice (Section 5). Converting the cover WSPD of the sweep followed by local search into a partition WSPD gives on average 1.006 OPT for n=500n = 500 and 1.13 LB for n=10000n = 10000, against 1.17 OPT and 1.55 LB for CK.

Table 1 Approximation algorithms for MINWSPD. Both: outputs a partition WSPD. ∗*: expected.

SettingProblemSizeSeparationTimeReference
R1\mathbb{R}^1cover(1+δ)OPTε(1+\delta)\text{OPT}_\varepsilonε\varepsilonnO(1/δ2)n^{O(1/\delta^2)}[5]
R1\mathbb{R}^1cover3OPTε3\text{OPT}_\varepsilonε\varepsilonO(nlog⁡n)O(n \log n)[5]
R1\mathbb{R}^1both10OPTε10\text{OPT}_\varepsilonε\varepsilonpolynomial[5]
Rd\mathbb{R}^dboth2O(d)OPTε2^{O(d)}\text{OPT}_\varepsilonε\varepsilon2O(d)(nlog⁡n+OPT)∗2^{O(d)}(n \log n + \text{OPT})^*[5, 15]
Rd\mathbb{R}^dcover(1+δ)OPTε(1+\delta)\text{OPT}_\varepsilon(1+δ)ε(1+\delta)\varepsilonf(d,δ)n6f(d,\delta)n^6[8]
Any metriccover7OPTε7\text{OPT}_\varepsilon33ε33\varepsilonpolynomial[16]
R2,ε≤1/16\mathbb{R}^2, \varepsilon \leq 1/16cover40OPTε40\text{OPT}_\varepsilonε\varepsilonO(n2log⁡n)O(n^2 \log n)Theorem 3
R2,ε≤1/5\mathbb{R}^2, \varepsilon \leq 1/5both1024OPTε1024\text{OPT}_\varepsilonε\varepsilonO(nlog⁡n+OPT)O(n \log n + \text{OPT})[7], Section 7
R2,ε≤1/5\mathbb{R}^2, \varepsilon \leq 1/5both529OPTε529\text{OPT}_\varepsilonε\varepsilonO(nlog⁡n+OPT)O(n \log n + \text{OPT})Section 7
R2,ε≤1/5\mathbb{R}^2, \varepsilon \leq 1/5both252OPTε∗252\text{OPT}_\varepsilon^*ε\varepsilonO(nlog⁡n+OPT)O(n \log n + \text{OPT})Section 7
Rd,ε≤1/16\mathbb{R}^d, \varepsilon \leq 1/16cover2O(d)OPTε2^{O(d)}\text{OPT}_\varepsilonε\varepsilonO(n2log⁡n)O(n^2 \log n)Theorem 11

Section 2 presents the sweep and its analysis, Section 3 a greedy variant of the sweep and the local search for smaller WSPDs and larger lower bounds, and Section 4 the extension of the sweep to higher dimensions. Section 5 reports the experiments, in the plane and, in Section 5.3, in R3\mathbb{R}^3. Section 6 extends the sweep to larger ε\varepsilon. The partition WSPD constructions are analyzed in Section 7.