Steven G
Elite Member
- Joined
- Dec 30, 2014
- Messages
- 14,434
There is a light in another room that can be in one of three states: blue red or off
In your room, you have two buttons numbered 1 and 2 that control the state of the light. The state of light changes according to the diagram below.
You want to make sure that the light is off but since the light is in another room, you do not know what state the light is currently in.
What is the shortest sequence of button presses that will guarantee that the light will be off?
In your room, you have two buttons numbered 1 and 2 that control the state of the light. The state of light changes according to the diagram below.
- If you press button 1, then the light changes to the next state clockwise around the diagram.
- If you press button 2 while the light is blue or red, the state of the light will not change.
- If you press button 2 while the light is off the light will change to blue
You want to make sure that the light is off but since the light is in another room, you do not know what state the light is currently in.
What is the shortest sequence of button presses that will guarantee that the light will be off?
Last edited: