Table of Contents
Fetching ...

The Contiguous Art Gallery Problem is in Θ(n log n)

Sarita de Berg, Jacobus Conradi, Ivor van der Hoog, Eva Rotenberg

TL;DR

This work resolves the Contiguous Art Gallery problem on simple polygons by achieving near-linear time in the real RAM model. It introduces a streamlined framework built around the next-function, a linear-size witness set X, and a sweeping, dominance-based decomposition of guards into good, bad, and ugly categories, enabling efficient computation of optimal guarding sequences. The authors establish a matching $\Omega(n\log n)$ lower bound for comparison-based models and present an $O(n\log n)$-time algorithm with linear space, substantially improving over prior high-degree polynomial-time solutions. The result provides the first near-linear-time algorithm for a natural Art Gallery variant, highlighting that such running times may be intrinsic when structural constraints are leveraged through sweep-line and geometric-data-structure techniques.

Abstract

Recently, a natural variant of the Art Gallery problem, known as the \emph{Contiguous Art Gallery problem} was proposed. Given a simple polygon $P$, the goal is to partition its boundary $\partial P$ into the smallest number of contiguous segments such that each segment is completely visible from some point in $P$. Unlike the classical Art Gallery problem, which is NP-hard, this variant is polynomial-time solvable. At SoCG~2025, three independent works presented algorithms for this problem, each achieving a running time of $O(k n^5 \log n)$ (or $O(n^6\log n)$), where $k$ is the size of an optimal solution. Interestingly, these results were obtained using entirely different approaches, yet all led to roughly the same asymptotic complexity, suggesting that such a running time might be inherent to the problem. We show that this is not the case. In the real RAM-model, the prevalent model in computational geometry, we present an $O(n \log n)$-time algorithm, achieving an $O(k n^4)$ factor speed-up over the previous state-of-the-art. We also give a straightforward sorting-based lower bound by reducing from the set intersection problem. We thus show that the Contiguous Art Gallery problem is in $Θ(n \log n)$.

The Contiguous Art Gallery Problem is in Θ(n log n)

TL;DR

This work resolves the Contiguous Art Gallery problem on simple polygons by achieving near-linear time in the real RAM model. It introduces a streamlined framework built around the next-function, a linear-size witness set X, and a sweeping, dominance-based decomposition of guards into good, bad, and ugly categories, enabling efficient computation of optimal guarding sequences. The authors establish a matching lower bound for comparison-based models and present an -time algorithm with linear space, substantially improving over prior high-degree polynomial-time solutions. The result provides the first near-linear-time algorithm for a natural Art Gallery variant, highlighting that such running times may be intrinsic when structural constraints are leveraged through sweep-line and geometric-data-structure techniques.

Abstract

Recently, a natural variant of the Art Gallery problem, known as the \emph{Contiguous Art Gallery problem} was proposed. Given a simple polygon , the goal is to partition its boundary into the smallest number of contiguous segments such that each segment is completely visible from some point in . Unlike the classical Art Gallery problem, which is NP-hard, this variant is polynomial-time solvable. At SoCG~2025, three independent works presented algorithms for this problem, each achieving a running time of (or ), where is the size of an optimal solution. Interestingly, these results were obtained using entirely different approaches, yet all led to roughly the same asymptotic complexity, suggesting that such a running time might be inherent to the problem. We show that this is not the case. In the real RAM-model, the prevalent model in computational geometry, we present an -time algorithm, achieving an factor speed-up over the previous state-of-the-art. We also give a straightforward sorting-based lower bound by reducing from the set intersection problem. We thus show that the Contiguous Art Gallery problem is in .

Paper Structure

This paper contains 27 sections, 13 theorems, 9 figures.

Key Result

Lemma 2

Let $(g, [u,v])$ be a guard where, for the fixed vertex $u$, $v$ is maximal. Then either $v$ is a reflex vertex of $P$ or $\overline{v \,g}$ contains a reflex vertex of $P$ in its interior.

Figures (9)

  • Figure 1: A simple polygon $P$ and five contiguous guards that guard the entire boundary of $P$.
  • Figure 2: The lower-bound construction. Black points belong to $A$, and red points to $B$.
  • Figure 3: Flowchart illustrating how a guard is dominated. We prove the green block in \ref{['lem:singleDominator']} and the red block in \ref{['lem:dominated_by_baddom']}.
  • Figure 4: The visibility core $\mathcal{E}[i-1,j+1]$ in green and the segment-intersecting dominator $(g,[u_\text{max},v_\text{max}])$ for $(i,j)$.
  • Figure 5: The visibility core $\mathcal{E}[i-1,j+1]$ in green and the angle-maximizing dominator $(g,[u_\text{max},v_\text{max}])$ for $(i,j)$.
  • ...and 4 more figures

Theorems & Definitions (34)

  • Definition 1
  • Definition 2
  • Lemma 2
  • proof
  • Lemma 3
  • proof
  • proof
  • Definition 3
  • Definition 4
  • Lemma 5
  • ...and 24 more