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

Home > Algorithms
Towers of Hanoi variation (Posted on 2005-05-03) Difficulty: 3 of 5
There are some poles, and on the first pole are some rings, each a different size. The sizes of the rings increases from the top to the bottom of the pole. The only allowable move is to take the top ring from any pole and place onto another pole. You cannot place a ring on top of another ring unless the other ring is exactly one size bigger. You can make as many moves as you like.

Your goal is to move all the rings onto the second pole, in the same order. What is the highest number of rings that can be moved when there are N poles? How can you move this many rings?

See The Solution Submitted by Tristan    
Rating: 4.0000 (4 votes)

Comments: ( Back to comment list | You must be logged in to post comments.)
Question Is this problem asking what you think? | Comment 2 of 14 |

The Towers of Hanoi is a well known problem.  Using 3 poles one can move any number of rings from one pole to another.  The formula for the number of moves required for n rings is 2^n -1

The highest number of rings with N poles? 

If N=1 you can't move any
If N=2 you can only move 1
If N=3 you can move any amount
If N>3 you can move any amount without using the extra poles at all.

I'll assume you meant to ask what the minimum number of moves is as you add more poles.  That is harder and I will work on it.

  Posted by Jer on 2005-05-03 17:02:45
Please log in:
Remember me:
Sign up! | Forgot password

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

Copyright © 2002 - 2018 by Animus Pactum Consulting. All rights reserved. Privacy Information