PUZZLE IBM-340
The Wheel of Buttons
IBM Research · Ponder This · 2026-08
IBM Ponder This #340 · August 2026
The Wheel of Buttons
This puzzle was suggested by Sanandan Swaminathan - thanks!
A game show is arranged as follows: The main attraction is a wheel that has
Each button has two possible states: "on" and "off". There's no indicator to the status of a button, and each press toggles between those two states ("on" -> "off" -> "on" and so forth). At the beginning of the game, the buttons have random states with the one condition that not all buttons are "on".
On each turn, the wheel spins randomly without the contestant looking; the buttons are marked with
- If all the buttons are "on", the contestant wins; this is made clear with balloons and confetti.
- If not all the buttons are "on", a new round begins. Again, the wheel is spun without the contestant seeing it.
The contestant's goal is to find a strategy that guarantees winning in the least number of rounds, even if the game cheats and the spins of the wheel are not random.
The choices of the contestant can be described by a sequence of natural numbers. Rounds are separated by 0, and each round contains the numbers of the buttons pressed by the contestant.
For example, the following is an optimal solution for the case
1,2,0,1,0,1,2,0
If both buttons were "off" at the beginning, the game is won after the first round. Otherwise, after the second round both buttons have the same state, so after the third round, the contestant has certainly won the game.
Summing up the numbers in the solution, we arrive at the value
Your goal: Find the optimal solution sum for
A bonus "*" will be given for finding the optimal solution sum for
Solution
Best opened after a real attemptTo be added.