Like HowStuffWorks on Facebook!

How Towers of Hanoi Works


Solutions of Towers of Hanoi
The legend of the Towers of Hanoi sometimes takes place in Vietnam.
The legend of the Towers of Hanoi sometimes takes place in Vietnam.
Photolibrary/Getty Images

While the Towers of Hanoi's past is grounded in recreational math, its future involves some serious scientific application. The game even is used to assess the extent of brain injuries, or to illustrate complex mathematical theory. It also shows promise as an aid to rebuild neural pathways.

Anyone who attempts to unravel the Towers of Hanoi mystery can benefit, regardless of whether or not he solves the puzzle. If you do want to build that tower, though, the key is to seek a solution. In doing so, you'll employ a host of problem-solving skills as you calculate moves and anticipate outcomes. The activity helps the pre-frontal cortex (the anterior portion of your brain's frontal lobe) forge new and useful connections [source: Miyake].

While Towers of Hanoi doesn't look like a complicated puzzle, if you don't recognize the pattern required to solve it, it can seem indecipherable. The solution is to move the disks in a clockwise, repeating pattern (remembering not to place a larger disk on a smaller one). Think of the three posts as Post A, Post B and Post C, and consider this solution for a three-disk version of the game:

  • begin with three disks on Post A
  • move the smallest disk clockwise from Post A to Post C
  • move the next largest disk from Post A to Post B
  • move the smallest disk from Post C to Post B
  • move the remaining (and largest) disk from Post A to Post C
  • move the smallest disk from Post B to Post A
  • move the next largest disk from Post B to Post C
  • finally, move the smallest disk from Post A to Post C, where you will have rebuilt the tower on Post C [source: Math Forum]

You'll follow the same pattern to solve the puzzle, no matter how many disks you play the game with.

By attempting to solve Towers of Hanoi, you'll be exercising the parts of your brain that help you manage time, present a business plan or make complex arguments. And that's not bad for a puzzle that predates the (admittedly towering) Statue of Liberty.