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

Home > Algorithms
Three of Hanoi (Posted on 2005-07-01) Difficulty: 3 of 5
  • When solving the Towers of Hanoi puzzle, it's easy to show that on every other turn you must move the smallest disk... can you do this?
  • Then again, can you also prove that the smallest disk will move cyclically -- for example, from post 1 to post 2 to post 3 to post 1, and so on?
  • Finally, using that fact, can you provide an iterative (that is, not recursive) algorithm for solving the puzzle?
  • See The Solution Submitted by Federico Kereki    
    Rating: 4.5000 (2 votes)

    Comments: ( Back to comment list | You must be logged in to post comments.)
    Solution One good solution, one so-so solution | Comment 1 of 3
    The first question: you start moving the smallest disk because it's the only option. Then, moving it again would be a waste, so you must move other disk. Given the disks on top on the other two columns, you have only one option, so you do your move. And then, unless you want to "unmove" and get back to the previous situation, you have no way out but moving the smallest disk again.

    As to the third, a almost good solution would be looking at this solution by Federico Kereki himslef!
      Posted by e.g. on 2005-07-02 14:03: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