Double Tower of Hanoi Puzzle: Minimum Moves & Recurrence Relation

  • Thread starter Thread starter hansel13
  • Start date Start date
  • Tags Tags
    Tower
AI Thread Summary
The double tower of Hanoi puzzle involves 2n discs of n different sizes, with two identical discs for each size. The minimum number of moves required to solve the puzzle is represented by the recurrence relation an = 2an-1 + 2, starting with a1 = 2. The initial confusion about a1 being 3 was clarified, as the correct solution for one pair of discs can be achieved in two moves. The discussion also emphasized the importance of recognizing the identical nature of the discs, which simplifies the problem. Overall, the participants reached a consensus on the correct approach to derive the minimum moves and recurrence relation.
hansel13
Messages
51
Reaction score
0
The double tower of Hanoi puzzle contains 2n discs. There are n different sizes, two
of each size. Initially one of the poles contains all the disks placed on top of each other in decreasing size. Discs of the same size are identical. You are allowed to
place discs of the same size on top of each other. Let an be the minimum number of moves
need to solve the puzzle. Find a recurrence relation for a1, a2, a3, ...

This is what I came up with, and wanted to see if it was right:
a1 = 3
an = 2an-1 + 2.

Is this correct?
thanks
 
Physics news on Phys.org
Perhaps you could explain how the recurrence relation was obtained?
 
Well a1 = 3 because When n is 1, we have 2 discs. There are 3 moves to get the discs to the other peg (1,2,1)

And I have problems trying to figure the the recurrence relation, not sure how to find it from the information we are given.
 
Last edited:
Why is a1 = 3? Can't you solve it in two moves by moving the discs one after the other to the target rod? Since the two discs are "identical," this should be a solution, right? Or are the discs also labeled, and need to be stacked in the same exact order on the target rod?

Also, I have no idea how to read your notation for moving the discs.
 
I see nothing difficult about this problem. You start with the disks in order of size, so each pair of disks of the same size is together. Once you move the top disk of such a pair, you can, and should, immediately move the next disk on to of it. Thus, we can think of each "pair" as a single disk and are back to the original problem. The only difference is that it takes 2 moves to move each pair. The number of moves is just 2 times the number of moves in "single" Towers of Hanoi, 2(2^n- 1)= 2^{n+1}- 2.
 
Moo Of Doom said:
Why is a1 = 3? Can't you solve it in two moves by moving the discs one after the other to the target rod? Since the two discs are "identical," this should be a solution, right? Or are the discs also labeled, and need to be stacked in the same exact order on the target rod?

Also, I have no idea how to read your notation for moving the discs.

Sorry, cleaned up my notation. Got myself mixed up with another problem when I was writing up the problem. EDITED.

And I understand now. I thought by 2n, we had 2n different sizes. I should have read the instructions better.

so assuming we start on the leftmost peg...
a1 = 2 (Move first disc to adjacent peg. Move second disc on top of first disc because they are the same size.)
a2 = 6
(Move Disc1 to middle peg.
Move Disc 2 to middle peg on top Disc1.
Move Disc 3 to right peg.
Move Disc 4 to right peg on top of Disc 3.
Move Disc 2 to the right peg on top of Disc 3 and 4.
Move Disc 1 to the right peg on top of Disc 2, 3 and 4.)

I think I got it now.
 
I was reading a Bachelor thesis on Peano Arithmetic (PA). PA has the following axioms (not including the induction schema): $$\begin{align} & (A1) ~~~~ \forall x \neg (x + 1 = 0) \nonumber \\ & (A2) ~~~~ \forall xy (x + 1 =y + 1 \to x = y) \nonumber \\ & (A3) ~~~~ \forall x (x + 0 = x) \nonumber \\ & (A4) ~~~~ \forall xy (x + (y +1) = (x + y ) + 1) \nonumber \\ & (A5) ~~~~ \forall x (x \cdot 0 = 0) \nonumber \\ & (A6) ~~~~ \forall xy (x \cdot (y + 1) = (x \cdot y) + x) \nonumber...
Back
Top