Towers of Hanoi


The physical model is a board with 3 pegs in it:
 |  |  |
 |  |  |
 |  |  |
 |  |  |
 |  |  |
 |  |  |
=========
 A  B  C

On the left hand peg there are 5 discs - each disc has a hole in the centre. The lowest is the widest, and the top one is the thinest disc (diameters indicated by numbers below).
 |  |  |
 1  |  |
 2  |  |
 3  |  |
 4  |  |
 5  |  |
=========
 A  B  C

The objective is to move the entire pile from peg (A) to peg (C). The rules are that you can only move one disc at a time, and you may never place one disc on another disc of a smaller diameter. What is the fewest number of moves necessary to move all the discs from peg (A) to peg (C)?
Simple enough... Off you go!
Think you got the answer? Send it to me and earn eternal (ephemeral?) fame --> Send me an email!
<-- Back