D21. Light Chase


Figure 1: The Light Chase toy. Pushing the button that is currently glowing red to change it to green will also change the two yellow buttons to red.

You have a puzzle toy which consists of a ring of lit buttons, each of which can glow red, yellow, or (bluish-)green, as illustrated in Figure 1. When you push a button, its color cycles in the order red green yellow red. The catch is, the lights two positions away in each direction also simultaneously cycle their color in the same way. The goal is get all of the lights to glow green. Suppose they all start red. Is it possible to solve the puzzle? For a bonus challenge, describe a quick way to determine whether or not a given starting position can be solved.

(This problem was based on a paper by Martin Kreh, University of Hildesheim.)

This problem originally appeared in the Prisoner’s Dilemma in the 2024 Fall issue of the PMP Newsletter. Solutions are no longer being accepted for this Dilemma.

Show solution?  
Solution.

Assign a red light a value of 0, a green light a value of 1, and a yellow light a value of 2. Now consider the sum of the values of all of the lights in arithmetic modulo 3. Under this assignment, pushing any button increases the value of exactly three lights by 1 mod 3 (since 2 + 1 0 mod 3), and therefore does not change the sum of the values mod 3 at all. Since all red has a total value of 0 mod 3 and all green has a total value of 13 1 mod 3, the puzzle cannot be solved.

In fact, this condition on the sum of the values of the lights is the only obstruction to solving the puzzle. Note that for any given light L , pushing the button four positions clockwise from it, then the one three positions clockwise, then three positions counterclockwise, and finally four positions counterclockwise results in light L staying the same and all twelve other lights advancing one color.

Extending this idea, start from any light S . Find the first light clockwise from S that does not match S , call it L , and execute the above maneuver once or twice as needed so that now all lights from S to L , inclusive, are the same color (since all of the lights from S up to but not including L change in unison, but L stays the same).

By repeating the strategy of the previous paragraph, you can make all of the lights the same color. But if the initial position had a total value of 1 mod 3, the monochrome position reached must be all green, because that is the only monochrome position with a total value of 1 mod 3.