Introduction

Picture a museum whose floor plan is a single, oddly-shaped polygon — full of alcoves and jutting corners, the kind an architect draws to make a building interesting. You must place security guards who never move, and every point on the walls has to be visible to at least one guard. Fewer guards means fewer salaries. How many do you need?

If the room were a plain rectangle, one guard in a corner would see everything. But real floor plans zigzag: a guard tucked into one alcove is blind to whatever is around the next corner. Add enough zigzags and it starts to feel like you might need a guard for practically every nook.

Remarkably, that fear is unfounded. No matter how bizarre the polygon, no matter how many corners it has, a surprisingly small number of guards is always enough — and there's a proof so visual you can literally color it in.

Place the Guards

Below is a jagged gallery, already cut into triangles (a triangulation). Click 3-color the corners to see every corner painted with one of three colors so that no triangle repeats a color — always possible for a triangulated polygon. Then click Guard with the smallest color to place a guard on every corner of the least-used color and watch their visibility fans light up the whole room.

Watch the guard count. With nn corners split three ways, some color is used at most n/3\lfloor n/3 \rfloor times — and that's exactly the guarantee Chvátal's theorem makes: n/3\lfloor n/3 \rfloor guards always suffice, for any simple polygon whatsoever.

The Real Complexity

The result is precisely stated as: any simple polygon with nn vertices can always be guarded by n/3\lfloor n/3 \rfloor guards, and some polygons need exactly that many.

  • Upper bound (sufficiency). Václav Chvátal proved it in 1975 with a case-heavy argument; two years later Steve Fisk found the gem of a proof used here. Triangulate the polygon (always possible, into n2n-2 triangles). The "dual graph" of shared edges between triangles is a tree, which makes the corners 3-colorable: no two corners joined by a triangulation edge ever share a color. Every triangle then has all three colors on its corners, so any single color class already sees every triangle — including the color used least, which appears at most n/3\lfloor n/3 \rfloor times.
  • Lower bound (tightness). A "comb" polygon with prongs forces one guard per prong, and a comb with nn vertices needs exactly n/3\lfloor n/3 \rfloor of them — so the bound cannot be improved in general.
  • Finding the true minimum is NP-hard. The coloring argument gives a fast guard placement that's never more than the worst case, but computing the smallest possible number of guards for a specific polygon is NP-hard, and even approximating it well is hard. That mirrors the split we keep meeting in P vs NP: a good-enough answer can be cheap even when the optimal one is out of reach.

So the elegance here is a bit like the guarantee behind the four color theorem: a clean coloring statement caps the worst case beautifully, even though pinning down the exact best answer for one specific instance stays hard.

Where It Matters

"Cover every point of a region with as few watchers as possible" is a template that shows up well beyond actual art galleries:

  • Sensor and camera placement: security systems, cell towers, and Wi-Fi access points all face the same coverage-with-fewest-units question.
  • Robotics: a robot mapping or patrolling a room needs to know which vantage points let its sensors see the whole space.
  • Computer graphics: visibility and occlusion computations — deciding what a virtual camera can "see" through a scene — build on the same triangulation and visibility-graph machinery.
  • Path and motion planning: guaranteeing an agent can always observe a target links directly to guard-set arguments.

Learn the triangulate-and-color trick here and you've picked up a tool that reappears anywhere "coverage" meets "geometry," including neighbors like triangulation and the four color theorem.

Conclusion

The Art Gallery Problem turns a vague architectural worry into a clean guarantee: cut the room into triangles, three-color the corners, post a guard on the smallest color — and you have never used more than n/3\lfloor n/3 \rfloor guards, no matter how twisted the walls.

The catch is the usual one in this field: a beautiful, cheap bound on the worst case doesn't hand you the exact minimum for your particular gallery — that part is NP-hard, just like so many close cousins living near P vs NP. Sometimes the honest, useful answer is "good enough and provably close," not "optimal."

Share this article

Pick a channel — or use your device's native share sheet.

Comments

Loading comments...

https://www.kipuhub.com/en/article/art-gallery-problem/Content licensed under CC BY-NC 4.0.