English

Rectilinear Matching to the Integer Grid in Nearly-Linear Time

Computational Geometry 2026-07-12 v1 Data Structures and Algorithms

Abstract

Rectilinear matching to the integer grid asks to assign each of nn points in R2\mathbb R^2 to a distinct point of Z2\mathbb Z^2, minimizing total 1\ell_1 movement. The main difficulty is that the target set is infinite: one must first identify a finite set of relevant grid points without losing optimality. We prove a geometric compression theorem for this infinite-target problem. In O(nlog2n)O(n\log^2 n) time, we construct a set C\mathcal{C} of asymptotically optimal size O(n)O(n) such that, simultaneously for every p[1,]p\in[1,\infty], some optimal p\ell_p assignment uses only points of C\mathcal{C}. The construction is independent of the subsequent optimization algorithm and of the coordinate spread. For the rectilinear case, we combine this candidate set with a linear-size sparse network representation of 1\ell_1 distances. In the word-RAM model with O(1)O(1)-word dyadic coordinates and O(logn)O(\log n) fractional bits, a nearly-linear time minimum-cost flow algorithm then gives a randomized exact algorithm with expected running time O~(n)\widetilde O(n). This improves the standard O~(n2)\widetilde O(n^2) approach. Combined with existing finite geometric matching algorithms, the same candidate set also gives an O~(nnlog(1/ε))\widetilde O(n\sqrt n\log(1/\varepsilon))-time (1+ε)(1+\varepsilon) approximation for every fixed integer p1p\ge1.

Cite

@article{arxiv.2607.10703,
  title  = {Rectilinear Matching to the Integer Grid in Nearly-Linear Time},
  author = {Yu Gao},
  journal= {arXiv preprint arXiv:2607.10703},
  year   = {2026}
}