Imagine there is a 5x5 grid of lights, and only the middle light in the grid is on.
The lights are wired such that when you flip the switch for one light (from on to off or off to on) the others right next to it (not diagonally) flip as well.
Using this weird wiring of lights, what is the fewest number of switch changes it takes to turn all the lights off, and which lights should you switch? (Assume all the switches work in the manner explained, and there is 1 switch for each of the lights.)
(In reply to re(2): Brute Force
Looked at another way, any configuration that has a solution also has a solution based on exclusively ORing it with any one of three null configurations of clicks.
The following are shown in part of the solution description, off of the main URL for this puzzle . Clicking on any of these three sets has no net effect on the lights:
Note that each is the exclusive OR of the other two.
So for example, the first (leftmost) transformation shown above, applied to the first solution in my Brute Force post, produces the third solution shown in that post. The second (middle) transformation turns my first solution into my fourth solution, and the last (rightmost) transformation converts my first into my second solution. (By exclusively oring and considering the c's as 1's)
These null transformations will convert any set of clicks into an equivalent but different set, so indeed only 1/4 of the states are attainable.
Posted by Charlie
on 2003-11-04 00:39:10