How does the Chinese rings puzzle work?
A row of rings hangs on a bar, all of them on at the start, and the goal is to take every ring off. Ring 1, at the free end, can come off or go back on at any time. Any other ring can move only when the ring just before it is on the bar and every ring before that one is off. Tap a ring to move it; a tap that breaks the rule is refused and not counted. You can play with 4, 5, 6 or 7 rings.
How is your result calculated?
Every ring taken off or put back is one move. Your result is your number of moves, compared with the fewest possible for that many rings, and your time from your first move.
How many moves does it take?
The fewest moves for n rings is (2ⁿ⁺¹ − 2) ÷ 3 when n is even and (2ⁿ⁺¹ − 1) ÷ 3 when n is odd. That is 10 for 4 rings, 21 for 5 rings, 42 for 6 rings, 85 for 7 rings, and 341 for the traditional nine. Each extra ring roughly doubles the work. The site's tests check the formula against a search through every position for up to nine rings.
Because at most two moves are ever possible, the puzzle isn't about choosing well among many options. It is about not undoing your own progress: half the time the move that looks right puts you back where you were.
How do you solve the Chinese rings?
- Alternate. The solution switches between the two legal moves: move ring 1, then the one other ring that can move, then ring 1 again, and so on.
- Start with the right first move. With an odd number of rings, take ring 1 off first. With an even number, take ring 2 off first. Starting the wrong way leads you away from the goal.
- Expect to put rings back. To free a ring far along the bar, rings before it often have to go back on. That is not a mistake.
Where does the puzzle come from?
It is old: the Italian mathematician Gerolamo Cardano described it in 1550, and it is known in China as the nine linked rings. In 1872 the French magistrate Louis Gros showed how its positions follow the pattern now called the binary Gray code, where each step changes exactly one digit.
For another puzzle whose moves double with every piece, try the Tower of Hanoi; for one where each move removes a piece, Peg Solitaire.