The purple figure below is the floor plan of a gallery, and an example is shown of what could be seen by a single guard who cannot see through walls but who can look around.
Your job is to position some number of guards in the gallery such that every location in this gallery is in view of at least one of the guards.
What is the fewest number of guards that you can use to guard the entire gallery?
You can assume any sub-region of the gallery that appears to be a rectangle is, in fact, a rectangle.
This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try
refreshing the page, (b) enabling javascript if it is disabled on your browser and,
finally, (c)
loading the
non-javascript version of this page
. We're sorry about the hassle.
The fields of vision coming from the three red points do not overlap. This implies that there must be at least three guards (one to cover each red point). If a guard is situated at each black square, then all points will be covered.