Let be the set of alarms monitoring window . If only window is open, exactly the alarms in are on.
An unmonitored window has . It must be locked, because opening it produces the same alarm states as leaving every window closed.
If two windows have the same nonempty set , they cannot both remain unlocked: their openings are indistinguishable. Thus we can keep at most one window for each distinct nonempty alarm set.
This bound is attainable. Keep one representative of every distinct nonempty set and lock all other windows. Every possible opening now has its own alarm pattern, and the all-off pattern identifies the situation with no open window. Locking other windows does not change any representative's alarm set.
Therefore, if there are distinct nonempty sets, the minimum number of locked windows is .
Constructing all the sets explicitly can take space and time. To avoid that, we need to understand how a set changes as we move along the windows.