Table of Contents
Fetching ...

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 work studies the maximum overlap between two polygons under translation, a key problem in geometric shape matching. It presents the first improvement over the long-standing $(nm)^2$-order bound for orthogonal polygons, achieving a running time of ${\tilde{O}}((nm)^{3/2}\log(nm))$ by batching translation slabs and using 3D convex-hull extreme-point queries. In parallel, it establishes conditional $k$-SUM based lower bounds for polygon overlap and containment, including tightness results for the regime $m=O(1)$, thereby clarifying the limits of existing approaches. The results advance both algorithmic techniques for orthogonal shapes and the understanding of fine-grained hardness in geometric pattern matching, with extensions to related problems and higher dimensions. Open questions remain regarding exact optimal runtimes for broader input classes and the relative difficulty of overlap versus containment beyond the orthogonal setting.

Abstract

A fundamental problem in shape matching and geometric similarity is computing the maximum area overlap between two polygons under translation. For general simple polygons, the best-known algorithm runs in $O((nm)^2 \log(nm))$ time [Mount, Silverman, Wu 96], where $n$ and $m$ are the complexities of the input polygons. In a recent breakthrough, Chan and Hair gave a linear-time algorithm for the special case when both polygons are convex. A key challenge in computational geometry is to design improved algorithms for other natural classes of polygons. We address this by presenting an $O((nm)^{3/2} \log(nm))$-time algorithm for the case when both polygons are orthogonal. This is the first algorithm for polygon overlap on orthogonal polygons that is faster than the almost 30 years old algorithm for simple polygons. Complementing our algorithmic contribution, we provide $k$-SUM lower bounds for problems on simple polygons with only orthogonal and diagonal edges. First, we establish that there is no algorithm for polygon overlap with running time $O(\max(n^2,nm^2)^{1-\varepsilon})$, where $m\leq n$, unless the $k$-SUM hypothesis fails. This matches the running time of our algorithm when $n=m$. We use part of the above construction to also show a lower bound for the polygon containment problem, a popular special case of the overlap problem. Concretely, there is no algorithm for polygon containment with running time $O(n^{2-\varepsilon})$ under the $3$-SUM hypothesis, even when the polygon to be contained has $m=O(1)$ vertices. Our lower bound shows that polygon containment for these types of polygons (i.e., with diagonal edges) is strictly harder than for orthogonal polygons, and also strengthens the previously known lower bounds for polygon containment. Furthermore, our lower bounds show tightness of the algorithm of [Mount, Silverman, Wu 96] when $m=O(1)$.

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

TL;DR

This work studies the maximum overlap between two polygons under translation, a key problem in geometric shape matching. It presents the first improvement over the long-standing -order bound for orthogonal polygons, achieving a running time of by batching translation slabs and using 3D convex-hull extreme-point queries. In parallel, it establishes conditional -SUM based lower bounds for polygon overlap and containment, including tightness results for the regime , thereby clarifying the limits of existing approaches. The results advance both algorithmic techniques for orthogonal shapes and the understanding of fine-grained hardness in geometric pattern matching, with extensions to related problems and higher dimensions. Open questions remain regarding exact optimal runtimes for broader input classes and the relative difficulty of overlap versus containment beyond the orthogonal setting.

Abstract

A fundamental problem in shape matching and geometric similarity is computing the maximum area overlap between two polygons under translation. For general simple polygons, the best-known algorithm runs in time [Mount, Silverman, Wu 96], where and are the complexities of the input polygons. In a recent breakthrough, Chan and Hair gave a linear-time algorithm for the special case when both polygons are convex. A key challenge in computational geometry is to design improved algorithms for other natural classes of polygons. We address this by presenting an -time algorithm for the case when both polygons are orthogonal. This is the first algorithm for polygon overlap on orthogonal polygons that is faster than the almost 30 years old algorithm for simple polygons. Complementing our algorithmic contribution, we provide -SUM lower bounds for problems on simple polygons with only orthogonal and diagonal edges. First, we establish that there is no algorithm for polygon overlap with running time , where , unless the -SUM hypothesis fails. This matches the running time of our algorithm when . We use part of the above construction to also show a lower bound for the polygon containment problem, a popular special case of the overlap problem. Concretely, there is no algorithm for polygon containment with running time under the -SUM hypothesis, even when the polygon to be contained has vertices. Our lower bound shows that polygon containment for these types of polygons (i.e., with diagonal edges) is strictly harder than for orthogonal polygons, and also strengthens the previously known lower bounds for polygon containment. Furthermore, our lower bounds show tightness of the algorithm of [Mount, Silverman, Wu 96] when .

Paper Structure

This paper contains 10 sections, 22 theorems, 4 equations, 3 figures, 1 table, 1 algorithm.

Key Result

Theorem 1

Let $P$ and $Q$ be orthogonal polygons with $n$ and $m$ vertices, respectively. There is an algorithm for computing the translation $\tau$ maximizing the overlap ${\textcolor{.}{\mathrm{area}}}(P\cap (Q+\tau))$ in time ${\textcolor{.}{\mathcal{O}}}((nm)^{3/2}\log(nm))$.

Figures (3)

  • Figure 1: Illustration of the support of the function ${\textcolor{.}{\mathrm{area}}}(P\cap(Q+(x,y))$, and how it partitions into ${\textcolor{.}{\mathcal{O}}}(1)$ (half-open disjoint) rectangular regions.
  • Figure 2: Construction of the polygons $P$ and $Q$ such that maximizing ${\textcolor{.}{\mathrm{area}}}(P\cap(Q+\tau))$ amounts to solving a $(3,2)$-SUM instance. The anchor gadgets of $P$ and $Q$ are not shown.
  • Figure 3: Illustration of the correctness of the $5$-SUM lower bound with the ${\textcolor{.}{\mathrm{\varepsilon}}}$-shifts for a given translation $(d_{{\textcolor{.}{k}}}+b_{{\textcolor{.}{i}}}+(3{{\textcolor{.}{i}}}+1){\textcolor{.}{\mathrm{\varepsilon}}},e_{{\textcolor{.}{\ell}}}+c_{{\textcolor{.}{j}}}+(3{{\textcolor{.}{j}}}+1){\textcolor{.}{\mathrm{\varepsilon}}})$. The highlighted areas starting from right to left in a clock-wise order correspond (i) for no ${{\textcolor{.}{\ell}}}'\neq {{\textcolor{.}{\ell}}}$ can the ${{\textcolor{.}{\ell}}}'$th$y$-prong of $Q$ align with a $y$-prong of $P$ if ${\textcolor{.}{\mathrm{\varepsilon}}}\ll 1/n$, (ii) the ${{\textcolor{.}{\ell}}}$th$y$-prong of $Q$ aligns with the ${{\textcolor{.}{j}}}$th$y$-prong of $P$,(iii) the ${{\textcolor{.}{k}}}$th$x$-prong of $Q$ aligns with the ${{\textcolor{.}{i}}}$th$x$-prong of $P$, (iv) for no ${{\textcolor{.}{k}}}'\neq {{\textcolor{.}{k}}}$ can the ${{\textcolor{.}{k}}}'$th$x$-prong of $Q$ align with a $y$-prong of $P$ if ${\textcolor{.}{\mathrm{\varepsilon}}}\ll 1/n$, and (v) if there is an $a_{{\textcolor{.}{h}}}$ with $a_{{\textcolor{.}{h}}}=b_{{\textcolor{.}{i}}}+c_{{\textcolor{.}{j}}}+d_{{\textcolor{.}{k}}}+e_{{\textcolor{.}{\ell}}}$, then the verifier of $Q$ lies in the ${\textcolor{.}{h}}$th diagonal prong of $P$. Otherwise, if ${\textcolor{.}{\mathrm{\varepsilon}}}\ll 1/n$, then the diagonal prong of $Q$ lies outside of $P$.

Theorems & Definitions (24)

  • Theorem 1
  • Definition 2: $k$-SUM Hypothesis
  • Theorem 3
  • Theorem 4
  • Lemma 5
  • Corollary 6
  • Lemma 7
  • Lemma 8
  • Definition 9: translation slabs
  • Lemma 10
  • ...and 14 more