Hanoi wants more Towers

The Tower of Hanoi is a traditional game where there are 3 pegs and n n discs arranged as seen in picture. All discs are to be moved from 1 s t 1^{st} peg P 1 P_1 to 3 r d 3^{rd} peg P 3 P_3 such that only one disc is moved at once. But no disc should be kept on one smaller than it during the process. So the minimum number of moves required to transfer all discs to P 3 P_3 (say a n a_n ) is counted by a n = 2 a n 1 + 1 a_n=2a_{n-1}+1 and a 1 = 1 a_1=1 i.e. after solving becomes a n = 2 n 1. a_n=2^n-1.

If we have a Tower of Hanoi with 42 pegs, and we have an additional rule that no disc can be moved more than twice, what is the maximum number of discs such that all discs can be moved to pegs other than the first peg P 1 ? P_1?


The answer is 861.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

3 solutions

Aditya Raut
Jan 22, 2014

We have 41 pegs Empty

We can transfer top 41 41 discs one to each empty peg,then we transfer those 41 all on the last peg.

Now 40 40 pegs remain empty, we put 1 disc each in all those 40 40 pegs and finally transfer them all to Second last peg

Now 39 39 pegs remain empty, we put 1 disc each in all those 39 39 pegs and finally transfer them all to Third last peg

So on

We get a series of discs from 4 2 n d 42^{nd} peg to 2 n d 2^{nd} peg as 41 , 40 , , 3 , 2 , 1 41,40,\dots,3,2,1 and hence the total discs moved away from 1 s t 1^{st} peg are 41 + 40 + + 3 + 2 + 1 = 41 ( 42 ) 2 = 41 × 21 = 861 41+40+\dots+3+2+1 = \frac{41(42)}{2}={41} \times {21}=861

You have only shown that 861 can be achieved. How do you know that this is indeed the maximum?

Calvin Lin Staff - 6 years, 5 months ago

@Calvin Lin The following may answer your question.

We have 42 pegs and 1st peg is occupied by d d discs. We put 1 disc on the 2nd peg, now whatever discs is on 1st peg, we can not put it on second peg because they are bigger. They have to go to one of the empty pegs. Let's say we put the second disc on 3rd peg.

Now if we move the 1st disc from 2nd peg on top of 2nd disc from 3rd peg, we'll have 2 discs on 3rd peg. But as they are smallest discs, if there is a possibility where we can put it on a larger disc we'll achieve 3 discs on a peg which is larger than the previously counted 2 discs. It turns out we can put the 3 smallest discs of all on a single peg with the given rule. We put 3 discs on 2nd, 3rd, 4th peg respectively. Put the 2nd disc from 3rd peg on top of 3rd disc on 4th peg, similarly from 2nd peg on 4th peg. In a similar way we can put 41 discs on a single peg, let's say 42nd peg.

Now we'll prove that maximum of 41 discs can be placed on 42nd peg while ( d 41 ) (d - 41) discs are on 1st peg.

Let's say we can put 42 discs on 42nd peg while ( d 42 ) (d - 42) discs are on 1st peg. So initially when ( d 42 ) (d - 42) discs are on 1st peg, all 41 pegs are having 1 disc each except 1 peg which has 2 discs. Let's say the 2nd peg has 2 discs and all remaining pegs(3rd, 4th, ... , 42nd) are having 1 disc each. let's call the top disc on 2nd peg as d 1 d_1 . d 1 d_1 can not come from 1st peg because the bottom disc on 2nd peg has to be larger than d 1 d_1 , so it has to come from any of 3rd, 4th, ... , 42nd peg at some point there by making that peg empty. That means d 1 d_1 already moved 2 times, so we can not move any disc from 2nd peg. So we can not place 42 or more discs on a peg while there are ( d 42 ) (d - 42) or less discs on 1st peg.

In a similar way we can put maximum of 40, 39, 38, ... discs on 41st, 40th, 39th, ... pegs.

So the solution is 41 + 40 + . . . + 1 = 861 41 + 40 + ... + 1 = 861

Abhisek Panigrahi - 3 years, 10 months ago

Log in to reply

Close, but not quite. Your argument currently still relies on "I have chosen the way that things are moved". It is not independent of the strategy that is employed.

Calvin Lin Staff - 3 years, 10 months ago

Log in to reply

@Calvin Lin - I'm not able to go further from this, Can you help a little bit here ?

Abhisek Panigrahi - 3 years, 10 months ago
Prasad Nikam
Jan 25, 2014

41+40+...............+1 = 861

41+40+39+...+1=861

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...