Thursday, October 6, 2011

Tower of Hanoi variant

The Tower of Hanoi is a classic puzzle that looks like this:

Image borrowed from Wikipedia

The idea is to get all the disks from the left rod onto the right rod.  This might seem easy (just dump them out and put them back on the other one), but there are a few rules you have to follow.  First, you can only move one disk at a time, and only from one rod onto another.  Second, no larger disk is allowed to be on top of a smaller disk.

The solution to the Towers of Hanoi is not too difficult, though the number of moves required increases exponentially as the number of disks.

Let's play a variant of the Towers of Hanoi.  Instead of three rods, there are five.  And there's an additional rule: a disk can only lay on top of another disk only if the one below is exactly one size bigger.

My question is: What's the tallest tower that you can move from one rod to another?

Afterwards, you can try the same variation with six rods.

(This is an original puzzle, inspired by too many games of Freecell, which obeys the same rules.  However, I would be surprised if I'm the only one who has ever thought of this variant.)

See the solution