How do you solve the Chinese Rings (also called the Patience Puzzle)?
competition/games/chinese.rings New
New entry, edited from material collected for the archive and not yet in a released version.
Problem
How do you solve the Chinese Rings (also called the Patience Puzzle)? It consists of a metal bar containing 6 pegs. Each peg has a ring attached to it. The ring basically connects alternate pegs together. There is a larger metal piece, U shaped on one end, a ring on the other, that is threaded through the bar/peg/ring combination. The chore is to untangle this larger metal piece.
Show solution
[ Editor: the question was asked by jtbrophy@mmm.com; the reply was
written from memory, without the puzzle at hand. ]
This is a relatively easy, but arduous puzzle. I say "relatively easy"
not because the algorithm is trivial [or even easy to figure out], but
rather because it is _always_ possible to methodically 'fix' the puzzle.
That is, fiddling with it at random never "mixes it up" or "makes it
worse", but the algorithm is just "look at what you've got, and fix
it, ring by ring".
Here's the trick: There are just two rules for moving rings with this
puzzle:
1) the state of the *first* ring can _always_ be toggled.
2) Any other ring can be toggled ONLY if the ring immediately
before it is the _first_ ring on the loop.
For example, imagine a 5 ring puzzle. If you want to change the state of
ring 4, the _only_ way to do so is to manipulate the puzzle so that its
state is:
- - 3 4 *
[where '-' means "off the ring", a number means "on the ring" and '*' means
"don't care"]. From this position, by rule 2, you can toggle ring 4, and
so you can go from this position to:
- - 3 - *
Just to show you how it works, I'll give a complete solution for a five
ring puzzle. Note that commentary [i.e. "how to think about it"] is
over on the right --- the 'move notation' on the left is all that is
*actually* happening to the puzzle:
1 2 3 4 5 OK, what's the first task: get ring 5 off of the
ring. In order to do that, I know [rule 2] that
I have to have the puzzle looking like - - - 4 5.
So... I have to get rid of 1 2 3. OK. So the *real*
first thing to do is get rid of ring 3. OK. To do
*that* I have to have the puzzle look like
- 2 3 * *, and that's easy enough!
- 2 3 4 5 rule 1
- 2 - 4 5 rule 2
1 2 - 4 5 rule 1
1 - - 4 5 rule 2
- - - 4 5 rule 1
- - - 4 - rule 2
Made it!. Now I have to get rid of ring 4. OK: to
do that I have to put ring 3 *back*, so the puzzle
looks like - - 3 4 -. No problem: we saw above how
to toggle ring 3, so we'll just do it again.
1 - - 4 - rule 1
1 2 - 4 - rule 2
- 2 - 4 - rule 1
- 2 3 4 - rule 2
1 2 3 4 - rule 1
1 - 3 4 - rule 2
- - 3 4 - rule 1
- - 3 - - rule 2
Bingo! The end is in sight!!
1 - 3 - - rule 1
1 2 3 - - rule 2
- 2 3 - - rule 1
- 2 - - - rule 2
1 2 - - - rule 1
1 - - - - rule 2
- - - - - rule 1 Ta DAAH!
OK, now I'll let you in on a secret for solving the puzzle [and why
I said it is 'easy']: Look at the moves above. See a pattern?
Yup: the *real* rule is very simple:
"make alternating rule-1 and rule-2 moves".
In general, in any position you can make *either* a rule-1 or rule-2
move. Which you pick determines whether you'll be removing or replacing
the ring, and just so long as you don't break the alternation,
you'll just work along rule1/rule2/rule1/rule2/... until the ring is either
on or off. It is a little tricky guessing whether you should start
rule-1 or rule-2 [especially if the puzzle is in some funny intermediate
state], but analysis of the type I did above, before we had even moved
a single ring, will do the trick [and you'll get better at 'seeing' it as
you get more practiced].
-- Bernie Cosell <bernie@fantasyfarm.com>