Towers of Hanoi

LA home
Computing
ProgLangs
 JavaScript
  Images
   Hanoi

Also see
 Recursion

The Towers of Hanoi (or the Towers of Brahma or the Reve's puzzle) is an old combinatorial puzzle. The objective is to move n discs from peg #1 to peg #3. However, only one disc may be moved at each turn and a larger disc must never sit on top of a smaller disc.






The solution is to move n-1 discs to the "spare" peg. This allows the largest disc to be moved to its destination. Finally move the n-1 discs from the spare peg to their destination on top of the biggest disc. The process of moving the n-1 discs is solved in a like manner.

[Reload] will run the puzzle again.

www #ad:

↑ © L. Allison, www.allisons.org/ll/   (or as otherwise indicated).
Created with "vi (Linux)",  charset=iso-8859-1,   fetched Saturday, 20-Apr-2024 12:21:25 UTC.

Free: Linux, Ubuntu operating-sys, OpenOffice office-suite, The GIMP ~photoshop, Firefox web-browser, FlashBlock flash on/off.