Tower of Hanoi

December 24, 2010 § Leave a comment


This is a well known little problem of procedural thinking. I’m on it nearly from the whole afternoon (just to underline how much i’m slow), and i only found out that the solution i can find online is different from the one my teacher gave to the problem.

A visualization of the solution for 4 disks

Tower of Hanoi


I’m starting to wonder how much is he against the free software, so this is the main reason which holds me from speaking about every little difference between the two approaches, given that some of my reader would like this boring list. So i’ll go over..

The problem is quite bigger, because it is about “how many” different possibilities could solve the problem of the Tower of Hanoi in 15 moves for 4 disks. Which is the same as saying: in a number of moves equal to two elevated to the power of the number of disk less one.

So someone helped me, he said me that if i move the disks only between the nearest pin, that is to say, not between the first and the third one but between the first and the second the second and the third, and back, in the attempt to move the entire tower from the first pin to the last one i’ll find every possible position of the disks in the pins.

For 4 disks i found the moves to play this game that way are 80, which is said to be the right answer in the solution, however, those are the moves…


From 1 to 2, 2 to 3, 1 to 2, 3 to 2, 2 to 1, 2 to 3, 1 to 2, 2 to 3, 1 to 2, 3 to 2, 2 to 1, 3 to 2, 1 to 2, 2 to 3, 2 to 1, 3 to 2,
2 to 1,2 to 3, 1 to 2, 2 to 3, 1 to 2, 3 to 2, 2 to 1, 2 to 3, 1 to 2,2 to 3,1 to 2,3 to 2,2 to 1,3 to 2,1 to 2,2 to 3,2 to 1,3 to 2,2 to 1,3 to 2,1 to 2,2 to 3,1 to 2,3 to 2,2 to 1,2 to 3,1 to 2,2 to 3,2 to 1,3 to 2,2 to 1,3 to 2,1 to 2,2 to 3,2 to 1,3 to 2,2 to 1,2 to 3,1 to 2,2 to 3,1 to 2,3 to 2,2 to 1,2 to 3,1 to 2,2 to 3, 1 to 2,3 to 2,2 to 1,3 to 2,1 to 2,2 to 3,2 to 1,3 to 2,2 to 1,2 to 3,1 to 2,2 to 3,1 to 2,3 to 2,2 to 1,2 to 3,1 to 2,2 to 3.

Tagged: ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

What’s this?

You are currently reading Tower of Hanoi at aboutcomments.

meta

%d bloggers like this: