## how to solve the

# Towers Of Hanoi

There are some disks (with holes through the middle) on one of three rods.

You must move them to another rod one disk at a time,

but you can never place a larger
disk on top of a smaller one.

The goal is to do it in the fewest possible moves.

To accomplish this with **one** disk takes **one** move.

To accomplish this with **two** disks takes **three** moves.

To accomplish this with **three** disks takes **seven** moves.

To accomplish this with **four** disks takes **fifteen** moves.

So, every time you add a disk you more than double the moves.

The formula would look like this (where **D** is disks and **M** is moves):

M = 2^{D} - 1

In other words, the six disks shown require 63 moves. . . .