Professional Documents
Culture Documents
Tower of Hanoi
Tower of Hanoi
Pansoy BSCE1 – M3
Tower of Hanoi
Objective
To move disk n from source to destination and then put all other (n1) disks onto it.
THREE DISKS
Assuming that the Tower of Hanoi puzzle with n disks can be solved in minimum 2n−1 steps.
Let n = 3
= 2n – 1
= 23 – 1
=8–1
= 7 is the minimum moves to solve the puzzle if there are three disks.
Procedures
Therefore, in the end, the Tower of Hanoi can be solved with a minimum of seven steps if
there are three disks given.
FOUR DISKS
Assuming that the Tower of Hanoi puzzle with n disks can be solved in minimum 2n−1 steps.
Let n = 4
= 2n – 1
= 24 – 1
= 16 – 1
= 15 is the minimum moves to solve the puzzle if there are three disks.
Disk 1 – Small Disk Disk 4 – Large Disk A – left side
Disk 2 – Medium Disk B - middle
Disk 3 – Large Disk C – right side
Procedures
Therefore, in the end, the Tower of Hanoi can be solved with a minimum of 15 steps if
there are four disks given.