Algorithms and Lower Bounds for the Maximum Overlap of Two Polygons Under Translation

Mikkel Abrahamsen, Sujoy Bhore, Maike Buchin, Jacobus Conradi, Ce Jin, André Nusser, Carolin Rehs

TL;DR

This paper breaks a nearly 30-year-old algorithmic bottleneck in computational geometry by introducing a new $O((nm)^{3/2} \log(nm))$ time algorithm for finding the maximum area overlap of two orthogonal polygons under translation. The authors also provide fine-grained lower bounds, proving that adding even a single diagonal edge direction makes the problem significantly harder, likely requiring near-quadratic time.

What Problem Does This Paper Address?

In fields like computer vision, robotics, and medical imaging, a core task is "shape matching"—determining how similar two objects are. A standard mathematical measure for this is the Maximum Area Overlap: given two polygons, $P$ and $Q$, find the translation (shifting $Q$ without rotating it) that maximizes the area where they intersect.

For simple polygons with $n$ and $m$ vertices, the gold-standard algorithm since 1996 has been $O((nm)^2 \log(nm))$. While the case for convex polygons was recently solved in linear time, a massive gap remained for other common shapes. This paper targets orthogonal polygons (where every edge is horizontal or vertical), which are ubiquitous in architecture, VLSI design, and pixel-based graphics.

Methods

The authors move beyond the traditional "sweep-line" approach that explicitly calculates every piece of the overlap function. Their method involves two main components:

  1. Batching and 3D Geometry: The overlap function is a piecewise polynomial surface. Instead of evaluating all $O((nm)^2)$ possible "pieces" of this surface, the authors group events into $O(\sqrt{nm})$ windows. Within each window, they transform the algebraic problem of finding a maximum into a geometric one: performing extreme-point queries on a 3D convex hull. By using efficient data structures for 3D hulls, they can find the maximum overlap in a window much faster than checking every individual intersection.
  2. Fine-Grained Reductions: To prove how hard the problem is, the authors use reductions from the $k$-SUM problem (a classic problem in complexity theory where you must find if $k$ numbers in a set sum to a target). They design "comb-like" polygons with specifically spaced "prongs" to encode numerical instances of 5-SUM into the geometric coordinates of the polygons.

Datasets

As a theoretical paper in computational geometry, no empirical datasets or benchmarks were used. The results are mathematical proofs of algorithmic upper bounds (efficiency) and lower bounds (inherent difficulty).

Key Insights and Ideas

  • Breaking the Complexity Barrier: The overlap function for orthogonal polygons can have a complexity of $\Omega((nm)^2)$. The "aha moment" here is realizing that you don't actually need to construct the entire function to find its highest point.
  • The "Diagonal" Penalty: One of the most striking findings is that the problem's difficulty is highly sensitive to edge orientation. While orthogonal polygons can be handled in $O((nm)^{3/2})$, adding just one diagonal edge direction (creating "octolinear" polygons) jumps the lower bound to near-quadratic time ($O(n^2)$ when $n=m$).
  • Coupling Translations: To prove hardness in 2D, the authors introduced a novel "diagonal comb" gadget. This forces the $x$ and $y$ components of a translation to be interdependent, allowing them to encode complex 5-SUM logic into a simple 2D shift.

Key Results

  • New Algorithm: An $O((nm)^{3/2} \log(nm))$ time algorithm for the maximum overlap of orthogonal polygons. This is the first improvement for this class of polygons in three decades.
  • Conditional Lower Bound (Overlap): For polygons with orthogonal and diagonal edges, no algorithm can run in $O(\max(n^2, nm^2)^{1-\epsilon})$ time unless the $k$-SUM Hypothesis is false.
  • Conditional Lower Bound (Containment): For the simpler problem of checking if $Q$ can fit inside $P$, they proved a 3-SUM lower bound of $O(n^{2-\epsilon})$ even when the inner polygon $Q$ has a constant number of vertices ($m = O(1)$), provided diagonal edges are allowed.

Limitations and Future Work

  • The Orthogonal Gap: While the new algorithm is faster than the old one, there is still a gap between the $O((nm)^{3/2})$ upper bound and the $O(nm)$ lower bound for purely orthogonal polygons. The authors suggest it might be possible to reach $O(nm \text{ polylog } nm)$.
  • Simple Polygons: The $O((nm)^2)$ barrier still stands for general simple polygons (those with edges at any angle). It remains an open question if the 3D convex hull technique can be adapted for non-orthogonal edges.
  • Overlap vs. Containment: The paper notes we still don't know for sure if finding the maximum overlap is strictly harder than just checking if one polygon can be contained in another for all classes of polygons.

Summary updated

BibTeX
@inproceedings{abrahamsen2026algorithms,
  author = {Mikkel Abrahamsen and Sujoy Bhore and Maike Buchin and Jacobus Conradi and Ce Jin and André Nusser and Carolin Rehs},
  title = {{Algorithms and Lower Bounds for the Maximum Overlap of Two Polygons Under Translation}},
  booktitle = {SODA},
  year = {2026},
  doi = {10.1137/1.9781611978971.200},
}
Figure