Case 02 · constraint · Medium · About 8–12 minutes
The observatory needs a quiet signal before opening its roof. Only lamps A and C should shine. Six switches control overlapping groups of lamps, and the keeper wants the fewest possible switch presses.
The apparatus is fictional. Its complete behavior is defined below, so you do not need electrical knowledge.

Five lamps, A through E, begin off. Pressing a switch reverses every lamp listed for it: off becomes on, and on becomes off. Unlisted lamps do not change.
| Switch | Lamps reversed |
|---|---|
| P | A, B, E |
| Q | A, C, D |
| R | C, D, E |
| S | E |
| T | B, C, D, E |
| U | A, B, C |
You may press each switch at most once. Press order does not matter. The final state must have A and C on, with B, D, and E off.
Which switches should you press to achieve that state using the fewest presses? Find the minimum, not merely a working combination.
One useful notation is a tick beside a lamp for each reversal. An even number of ticks returns it to off. An odd number leaves it on.
Hint 1 - reveal when you want a nudge
A lamp that is reversed twice ends where it began. Count odd and even reversals rather than following press order.
Hint 2 - reveal when you want a nudge
Try combining T with R. Their shared lamps cancel, leaving only B changed; then look for a switch that completes the target.
Reveal the solution and explanation
Press R, T, and U, in any order. This is the unique three-press solution.
R reverses C, D, E. T reverses B, C, D, E. Together they reverse B once and each of C, D, E twice. Their combined effect is therefore just B.
Adding U reverses A, B, C. The two reversals of B cancel, leaving exactly A and C on.
Notice that E is reversed twice, while A is reversed once. Checking individual lamps helps catch mistakes hidden inside the larger groups.
To check minimality, compare every single switch and every pair with the target. None works. Checking the remaining subsets produces only one other working choice: P, Q, R, U, which requires four presses. Thus the three-press answer is both minimal and unique. A four-press result would produce the right lamps, but it would not meet the keeper's request.
Solve another: The Cabinet of Fifty Mysteries · Browse all 50 cases