---
title: Contiguous Art Gallery Problem
url: https://www.emergentmind.com/topics/contiguous-art-gallery-problem
type: topic
---

# Contiguous Art Gallery Problem

The contiguous art gallery problem is a boundary-guarding optimization problem on a simple polygon \(P\): the boundary \(\partial P\) must be partitioned into the minimum number of contiguous chains such that each chain is completely visible from some guard point in \(P\). Guards may be placed anywhere in the polygon, and each guard is assigned exactly one contiguous visible portion of the boundary. Introduced as an open problem by Thomas C. Shermer at CCCG 2024, the problem became notable because, unlike many classical art-gallery variants, it admits polynomial-time algorithms for simple polygons without holes [2412.15567][2412.13938].

## 1. Problem statement and geometric model

In the standard formulation, the input is a simple polygon \(P \subseteq \mathbb{R}^2\) with boundary \(\partial P\) given in counterclockwise order. A guard is any point \(g \in P\). A point \(x \in P\) is visible from \(g\) if the closed segment \([g,x]\) is contained in \(P\). If \(V(g)\) denotes the visibility set of \(g\), then the boundary-visible set is \(B(g)=V(g)\cap \partial P\). A contiguous guard is a pair \((g,I_g)\) where \(I_g \subseteq B(g)\) and \(I_g\) is a connected boundary arc; the objective is to choose guards and assigned arcs so that the union of the arcs equals \(\partial P\), each assigned arc is contiguous, and the number of guards is minimized [2508.09734].

The boundary is commonly parameterized either by arc length, \(\gamma:[0,L)\to\partial P\), or by a normalized cyclic parameterization \(\gamma:[0,1)\to\partial P\). In either representation, an assigned interval is interpreted cyclically, so wrap-around at the base point is allowed. This circle viewpoint is central in later algorithmic reductions, especially when the problem is reformulated as a covering problem on \(S^1\) [2412.15567].

A basic subtlety is that contiguity is imposed on the *assignment*, not on the full visible boundary set of a guard. A guard may see several disjoint portions of the boundary, but in a feasible solution it is responsible for exactly one contiguous interval. Another important point is that optimal guards need not be polygon vertices; non-vertex positions can be essential [2412.15567].

## 2. Why contiguity changes the complexity landscape

The classical art gallery problem asks for the minimum number of guards whose visibility polygons cover the interior of \(P\). For simple polygons, that problem is NP-hard and \(\exists\mathbb{R}\)-complete; even many boundary-covering formulations with arbitrary guard positions remain hard. By contrast, the contiguous variant requires only boundary coverage and restricts each guard to a single contiguous responsibility interval [2511.02960][2412.15567].

This distinction is structurally important. Hardness proofs for non-contiguous boundary guarding often exploit the fact that one guard can “skip around” and cover multiple disjoint boundary portions. The contiguous formulation forbids that behavior. This suggests that the problem acquires a one-dimensional interval or circle-arc structure that is absent in general art-gallery formulations, and that this structural restriction is the reason polynomial-time algorithms become possible [2412.15567].

The problem’s rapid development reflects that change in difficulty. After being posed as an open problem in 2024, multiple independent polynomial-time solutions appeared. By SoCG 2025, three distinct approaches were known, and subsequent work reduced the running time dramatically, culminating in a tight \(\Theta(n\log n)\) bound in the real RAM model [2508.09734][2511.02960].

## 3. Initial polynomial-time resolutions

One early solution is a greedy “revolution” algorithm. For a boundary point \(x\), define \(G(x)\) to be the farthest boundary point reachable clockwise from \(x\) such that the chain \([x,G(x)]\) is visible from some guard. Starting at \(x_0\), the algorithm repeatedly computes \(x_{i+1}=G(x_i)\). A single revolution around the boundary yields a solution with at most \(k^*+1\) chains, where \(k^*\) is optimal; if the starting point is an optimal endpoint, one revolution is already optimal. The analysis proves that after polynomially many revolutions the greedy sequence must hit an optimal configuration, giving an algorithm running in \(O(k^* n^6 \log n)\) arithmetic operations on a real RAM [2412.13938].

The geometric core of that analysis is a feasible-region view of each greedy step. For a current chain \([y_i,z_i]\), the feasible region \(F([y_i,z_i])\) consists of guard positions that see the whole chain, and it remains connected. Maximality of the chain is explained by either a horizon event or a blockage event at a polygon vertex. Pivot points, pivot lines, repetitions, and “positive fingerprint” events are then used to certify eventual optimality of the greedy sequence [2412.13938].

A second, more algebraic resolution reduces the problem to the “Analytic Arc Cover” problem on the unit circle. For each boundary parameter \(t\), one defines a next-generator
\[
g(t)=\sup\{s:\exists y\in P \text{ with } [t,s)\subseteq \gamma^{-1}(\mathrm{VisB}(y))\},
\]
so \(g(t)\) is the farthest counterclockwise endpoint reachable from \(t\) by some guard assigned a contiguous interval containing \(t\). The contiguous art gallery problem then becomes: find the minimum \(k\) such that, for some start \(x\), the arcs
\[
[x,g(x)),\ [g(x),g^{(2)}(x)),\ \ldots,\ [g^{(k-1)}(x),g^{(k)}(x))
\]
cover the circle [2412.15567].

The decisive technical fact is that, for simple polygons, the resulting next-generator is piecewise linear rational (PLR) with polynomially many pieces, rational coefficients, and first-order radical breakpoints. PLR functions are closed under max/min and under composition with controlled growth, and existential threshold tests for \(g^{(k)}\) can be performed in polynomial time. This yields a Turing-machine polynomial-time algorithm with explicit bit-complexity control, establishing that the contiguous art gallery problem is in \(\textsf{P}\) for simple polygons with rational coordinates [2412.15567].

## 4. Structural discretization and faster algorithms

A later simplification replaced heavy algebraic machinery with a more combinatorial geometry of guard types. In this framework, a contiguous guard \((g,[u,v])\) is classified as *good* or *bad* according to four conditions involving whether \((u,v)\) contains a polygon vertex, whether \(u\) or \(v\) coincides with \(g\), whether \(\angle(v,g,u)>\pi\), and whether the shortest path from \(u\) to \(v\) inside \(P\) is a single edge. A crucial snapping lemma shows that every good guard can be replaced by a guard at a vertex of the arrangement \(C_P\) of supporting lines of polygon edges, without losing its interval [2508.09734].

This leads to a finite candidate structure. There are \(O(n^2)\) canonical guards and \(O(n^2)\) candidate start points \(U\), and a seed theorem shows that every optimal solution with more than one guard can be transformed so that at least one guard begins at some \(u\in U\). Starting the greedy algorithm from such a seed is optimal. The main algorithmic burden is then to compute, for a given start \(u\), the farthest reachable endpoint \(v(u)\). This is done by combining shortest-path queries, ray shooting, visibility cores of contiguous edge blocks, and a binary search over edges, yielding an \(O(\log^2 n)\) query for the maximal guard interval from \(u\). Trying all seeds gives an \(O(k n^2 \log^2 n)\)-time algorithm and \(O(n^2)\) space bound [2508.09734].

The main milestones are summarized below.

| Paper | Main idea | Complexity / model |
|---|---|---|
| [2412.13938] | Greedy revolutions with feasible-region and pivot-line analysis | \(O(k^* n^6 \log n)\) arithmetic operations on a real RAM |
| [2412.15567] | Reduction to Analytic Arc Cover with a PLR next-generator | Polynomial time on a Turing machine |
| [2508.09734] | Good/bad guard classification, snapping to arrangement vertices, fast `MaxGuard` | \(O(k n^2 \log^2 n)\) time, \(O(n^2)\) space |
| [2511.02960] | Linear-size dominator structure and piecewise Möbius advance function | \(\Theta(n\log n)\) time in the real RAM model |

These advances also clarified a common misconception. The problem does not reduce to trying polygon vertices as guards. The 2025 simplification obtains a finite search space only after snapping *good* guards to vertices of a supporting-line arrangement and handling *bad* guards through a separate “almost-snap” analysis [2508.09734].

## 5. Tight real-RAM complexity

The current fastest result gives a tight \(\Theta(n\log n)\) bound in the real RAM model. Its central object is the advance function
\[
\mathrm{next}(u)=\max\{v\in [u,2n+1): \exists g\in P \text{ with } [u,v]\subseteq V(g)\},
\]
which is the greedy frontier from start point \(u\). The algorithm develops a structural classification into reduced good dominators, reduced bad dominators, and ugly dominators. Reduced good and bad dominators compress to linear size, and together with polygon vertices they yield a linear-size start set \(X\) such that some \(x\in X\) starts an optimal greedy run [2511.02960].

Efficient evaluation of \(\mathrm{next}(\cdot)\) relies on a conforming sliding sequence of index pairs, dynamic maintenance of visibility cores \(C(i-1,j+1)\), time-windowed convex hull data structures, and a stabbing-max segment tree over dominator intervals. This gives batched evaluation of \(\mathrm{next}(x)\) for all \(x\in X\) in \(O((n+|X|)\log n)\) time. An initial \(O(k n\log n)\) algorithm follows by repeated application of this batched evaluation [2511.02960].

The dependence on \(k\) is then removed by showing that \(\mathrm{next}(\cdot)\) has only \(O(n)\) pieces. On some intervals it is constant, realized by good or bad dominators; on the remaining intervals it is fractional-linear,
\[
\mathrm{next}(u)=\frac{A+Bu}{C+Du},
\]
realized by ugly dominators. A lazy segment-tree composition technique then computes the minimum \(k\) such that \(\mathrm{next}^k(u)\ge u+n\) for some \(u\), leading to an \(O(n\log n)\)-time, \(O(n)\)-space algorithm. A comparison-based lower bound via reduction from Set Disjointness gives \(\Omega(n\log n)\), so the problem is in \(\Theta(n\log n)\) in the real RAM model [2511.02960].

This result also sharpens the model-theoretic picture. In the real RAM, arithmetic on fractional-linear pieces is unit cost. The same paper notes that in bit-complexity models the \(k\)-fold composition can accumulate \(\Theta(k)\) bits in coefficients, suggesting that \(\Omega(kn)\) time may be inherent there. A plausible implication is that “polynomial-time solvable” for this problem is now model-sensitive: near-linear optimality is established for the real RAM, while explicit Turing-model control is obtained by the PLR-based analytic-arc-cover approach [2511.02960][2412.15567].

## 6. Scope, variants, and related formulations

All of the main polynomial-time results treat simple polygons without holes. Extending them to polygons with holes remains open. The 2024 PLR-based approach notes that holes would require redefining visibility regions and blocking sets; the 2025 structural algorithms state that holes disrupt the convex-core and shortest-path arguments on which their analyses depend [2412.15567][2508.09734][2511.02960].

Several restricted variants are easier. If guards are restricted to polygon vertices, all visible boundary arcs induced by each vertex can be generated in \(O(n^2)\) total time, and the resulting minimum circle-cover problem can be solved in \(O(n^2\log n)\) time. If chain endpoints are restricted to polygon vertices, dynamic feasible-region maintenance yields an \(O(n^3\log n)\) algorithm [2412.13938].

The current literature also distinguishes the modern contiguous art gallery problem from several neighboring notions. One older orthogonal result studies mobile guards that patrol non-intersecting line segments inside a simply connected orthogonal polygon; there, “contiguity” refers to each patrol being a single segment, not to partitioning \(\partial P\) into visible chains [1509.05227]. Another graph-theoretic relaxation asks only that at least one of every \(k+2\) consecutive corners be visible to some guard; this is a corner-coverage problem rather than a boundary-partition problem [2002.06014]. In static LiDAR viewpoint planning, “contiguous/connected art gallery” may refer to selecting viewpoints that form a connected overlap graph for scan registration, again a different formulation from contiguous boundary partitioning [2503.01562].

Open directions in the contiguous boundary-partition problem include polygons with holes, weighted or cost-aware guards, limited-range guards, and higher-dimensional analogues. The 2024 and 2025 papers also highlight robustness issues around degeneracies, symbolic perturbation, and the distinction between real-RAM and Turing-machine complexity [2412.15567][2508.09734][2511.02960].

In computational-geometry terms, the contiguous art gallery problem is now understood as a rare art-gallery variant in which a natural geometric restriction collapses a hard two-dimensional covering problem into a tractable one-dimensional cyclic covering problem. The sequence of results from 2024 to 2025 shows that the key object is the farthest-visible advance function along the boundary: first as a greedy map \(G(x)\), then as a PLR next-generator on \(S^1\), and finally as an \(O(n)\)-piece mixture of constants and Möbius transformations. That progression turned an open problem into a solved one, and then into a problem with a tight near-linear complexity theory [2412.13938][2412.15567][2511.02960].

Source: https://www.emergentmind.com/topics/contiguous-art-gallery-problem