All about flooble | fun stuff | Get a free chatterbox | Free JavaScript | Avatars    
perplexus dot info

Home > Algorithms
Hanoi Hard Hack (Posted on 2006-04-23) Difficulty: 3 of 5
In the standard Towers of Hanoi problem, you have three poles: the first has a pyramid of n disks, and the other two are empty. Your task is to move the disks to the third pole, with the restriction that you can move one disk at a time, never putting a larger disk on top of a smaller one.

How many moves would this task take, if ALL moves had to be either to or from the middle pole? (Thus, you cannot move a disk directly from the first pole to the third one, or viceversa.)

See The Solution Submitted by Old Original Oskar!    
Rating: 3.6667 (6 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Solution Solution | Comment 2 of 8 |

2 * Sigma [x=0 to n]  3x-1 : n > 0

If there are 3 disks it would take 2* (30 + 31 + 32) = 26 moves.
For 7 disks it would take 2* (30 + 31 + 32 + 33 + 34 + 35 + 36) = 2186 moves.

And so forth...

Edited on April 23, 2006, 9:23 pm
  Posted by Dej Mar on 2006-04-23 18:45:33

Please log in:
Login:
Password:
Remember me:
Sign up! | Forgot password


Search:
Search body:
Forums (0)
Newest Problems
Random Problem
FAQ | About This Site
Site Statistics
New Comments (3)
Unsolved Problems
Top Rated Problems
This month's top
Most Commented On

Chatterbox:
Copyright © 2002 - 2024 by Animus Pactum Consulting. All rights reserved. Privacy Information