Fun Logic Puzzle

There is an interesting variation in which you can only move rings to *adjacent* pegs - no moving from left to right or back for instance - and you must move the entire stack from the left peg to the right peg. This variation takes \( 3^n-1 \) moves for n rings and is slightly trickier to keep track of.

Wow, I never thought to try that variation! That does sound neat, will have to give this a go. Trying to work out the process for 4 discs, and it already seems very interesting!

Chris

It's actually quite simple
Call the 3 pegs A, B and C.
You start on peg A, and have to get to peg C.

Move the smallest disc between pegs A and B.
Move the smallest disc between pegs B and C.

Repeat these two steps until you're finished.

There's a similar three step method for the original version too.
Move the smallest disc between pegs A and B.
Move the smallest disc between pegs A and C.
Move the smallest disc between pegs B and C.

And repeat until complete. But this one gets it to a different peg depending on whether you start with an odd or even number of discs, but that can easily be fixed, by swapping B and C in the method for an odd number of discs.

Can anyone help with this sequence?
Move the discs from A to C, and write 0 or 1 each move if:
If you move A to B, A to C or B to C, write 1. If you move B to A, C to A or C to B, write 0.

For 1, 2, 3, 4 and 5 discs, I get
1
111
1101011
111100111001111
1101011100001101011000011101011
Is there a way to find what this sequence will be with any number of discs?
 
Maybe I don't see the revelation of why this game is so interesting? Jaap has a javascript Towers of Hanoi with 7 or 8 rings on it, I forget which, and I found it to be the most boring puzzle. You keep doing the same thing over and over again.
 
For 1, 2, 3, 4 and 5 discs, I get
1
111
1101011
111100111001111
1101011100001101011000011101011
Is there a way to find what this sequence will be with any number of discs?

4 = 111 1 0 0 111 0 0 1 111
5 = 1101011 1 000 0 1101011 0 000 1 1101011
6 = 111100111001111 1 0010100 0 111100111001111 0 0010100 1 111100111001111
:)

The first, third, and fifth underlined sequences are identical to the sequence for 2 fewer discs. The second and fourth sequences are the inverse of the sequence for 3 fewer discs. Those 1s and 0s control the second-to-largest disc. The idea is that to think in terms of these sequences we can either move single discs between any two pegs or move stacks of discs from the leftmost peg to the rightmost peg or vice versa (but never to the middle peg because that would create a new type of sequence).

So the procedure is:
- Move top N-2 discs from the leftmost peg to the rightmost peg.
- Move N-1st disc right to the middle peg.
- Move top N-3 discs from the rightmost peg to the leftmost peg.
- Move N-2nd disc left to the middle peg.
- Move the N-2 discs on the leftmost peg (top N-3 plus Nth) to the rightmost peg.
- Move N-2nd disc left to the left peg.
- Move top N-3 discs from the rightmost peg to the leftmost peg.
- Move N-1st disc right to the right peg.
- Move top N-2 discs from the leftmost peg to the rightmost peg.
 
Fun Fact: badmephisto got another account on YouTube called fractal maths which talks about the tower of hanoi. Check in his profile then click on his personal website. Click on YouTube on the right side. Fractal Math should show up in the middle.
 
Back
Top