Convex Polygon Containment: Improving Quadratic to Near Linear Time
Timothy M. Chan, Isaac M. Hair
TL;DR
This work advances convex polygon containment by breaking the long-standing quadratic barrier: it achieves near-linear time for finding the largest similar copy of a triangle inside a convex polygon and extends the framework to general constant k with $O(k^{O(1/\varepsilon)} n^{1+\varepsilon})$ time for any $\varepsilon>0$. The key ideas center on exploiting 3-contact (and 4-contact) contact patterns, partitioning the boundary of Q into arcs, and using monotone pairings plus ellipse-range data structures to enable near-linear or subquadratic subproblems without resorting to parametric search. A notable contribution is a new near-linear bound $O(k^{O(1)} n polylog n)$ on the number of 4-contact copies, which disproves a prior conjecture and informs the enumeration strategy. Overall, the paper provides a direct, scalable approach to maximizing contained copies and reveals deep structural properties of contact configurations that enable substantial time savings in polygon containment problems.
Abstract
We revisit a standard polygon containment problem: given a convex $k$-gon $P$ and a convex $n$-gon $Q$ in the plane, find a placement of $P$ inside $Q$ under translation and rotation (if it exists), or more generally, find the largest copy of $P$ inside $Q$ under translation, rotation, and scaling. Previous algorithms by Chazelle (1983), Sharir and Toledo (1994), and Agarwal, Amenta, and Sharir (1998) all required $Ω(n^2)$ time, even in the simplest $k=3$ case. We present a significantly faster new algorithm for $k=3$ achieving $O(n$polylog $n)$ running time. Moreover, we extend the result for general $k$, achieving $O(k^{O(1/\varepsilon)}n^{1+\varepsilon})$ running time for any $\varepsilon>0$. Along the way, we also prove a new $O(k^{O(1)}n$polylog $n)$ bound on the number of similar copies of $P$ inside $Q$ that have 4 vertices of $P$ in contact with the boundary of $Q$ (assuming general position input), disproving a conjecture by Agarwal, Amenta, and Sharir (1998).
