A little puzzle for an unhurried moment
Nine Lanterns,
One Small Night
The night has nine lanterns. Touch one, and it changes its own light and the lights immediately beside it. The ring wraps around: 1 and 9 are neighbors.
Choose your night
Three lights
Lanterns 1, 3, and 5 are lit. Can you turn them all off?
Hints & the little theorem (spoilers)
A hint
For the three-lights night, try three neighboring switches.
A shortest path
Press 2, 3, and 4, in any order. Three presses are minimal: each press changes the parity (odd or even) of the total number of lights, so the odd starting state needs an odd number of presses. One press cannot do it, because 1, 3, and 5 are not three consecutive lanterns.
One light cannot go out alone
Split the ring into groups: {1, 4, 7}, {2, 5, 8}, and {3, 6, 9}. Every press changes one light in each group, so it flips all three group parities together. Whether two group parities match never changes. One light starts with parities odd, even, even; all off would have even, even, even. So the one-light night cannot be cleared.
A tiny theorem
Matching group parities are not just necessary; they are sufficient. Over bits, the toggle map has a four-element kernel: any sequence of presses that changes nothing must repeat a three-step pattern determined by its first two bits. Thus the map has 29 / 4 = 27 outputs. Exactly 27 states have matching group parities, and every output is among them. So those are precisely the clearable states.
What if the ring were a different size?
For any ring of at least three lanterns, a no-effect press pattern has bits satisfying xi+1 = xi−1 + xi (with addition modulo 2). This recurrence repeats every three positions. If the ring length is a multiple of three, all four three-periodic patterns fit, so exactly one quarter of starting states can be cleared. Otherwise, the wraparound forces the three-periodic pattern to be constant; the recurrence then forces it to be all zero. In that case every starting state can be cleared, in exactly one set of switches pressed an odd number of times.
For example, on a ring of ten, one light can be put out: press 1, 2, 4, 5, 7, 8, and 10. The extra lantern changes the whole question.