Added: 2 years ago
From: mariostorti
Views: 8,691
Sort by time | Sort by thread (beta)

Link to this comment:

Share to:

All Comments (3)

Sign In or Sign Up now to post a comment!
  • Hey you guys, I made a video of a program that creates solutions on how to solve the Tower of Hanoi in the least amount of moves. Check it out and see what you think.

  • i thought the whole tower was to be from one end to another not only one over?

  • If you have a solution for moving all discs from peg A to peg B, using C as intermediary then it is trivial to have the solution for moving A to C via B by simply swapping B with C in all the moves.

    As explained in the book of Aho, the solution presented here is based on the strategy "advance the smallest disc, then make the move that doesn't involve the smallest disc". With this strategy the pile of discs goes to B or C depending on wether the number of discs is even or odd.

Loading...
Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more