Finding a Largest-Area Triangle in a Terrain in Near-Linear Time
Sergio Cabello, Arun Kumar Das, Sandip Das, Joydeep Mukherjee
TL;DR
This paper tackles the problem of finding a triangle of maximum area contained in an $x$-monotone terrain with a base segment. It presents a deterministic $O(n \log n)$-time algorithm that improves the previous $O(n^2)$ bound by completing the interior-apex case through a combination of shortest-path trees, forward prolongations, and a hereditary segment tree to implicitly handle a potentially quadratic set of apex candidates, with the SMAWK algorithm exploiting total-monotonicity in derived matrices. The approach unifies two key interactions—standard-standard and standard-hereditary list pairings—across a hereditary segment-tree structure, yielding amortized linear-time processing per node and an overall near-linear time. This advance enhances geometric optimization in terrains with potential applications in robotics, stock cutting, and related planning problems, while leaving open the possibility of a linear-time solution in the future.
Abstract
A terrain is an $x$-monotone polygon whose lower boundary is a single line segment. We present an algorithm to find in a terrain a triangle of largest area in $O(n \log n)$ time, where $n$ is the number of vertices defining the terrain. The best previous algorithm for this problem has a running time of $O(n^2)$.
