recursion3_honoi

recursion3_honoi - Towers of Honoi An application of...

This preview shows pages 1–6. Sign up to view the full content.

Towers of Honoi An application of Recursion

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Towers of Hanoi Problem: Invented by French mathematician Lucas in 1880s. Original problem set in India in a holy place called Benares. There are 3 diamond needles fixed on a brass plate. One needle contains 64 pure gold disks. Largest resting on the brass plate , other disks of decreasing diameters. Called tower of Brahma. Priests are supposed to transfer the disks from one needle to the other such that at no time a disk of larger diameter should sit on a disk of smaller diameter. Only one disk can be moved at a time. Later setting shifted to Honoi, but the puzzle and legend remain the same. How much time would it take? Estimate…. .
Finding a Recursive strategy: Any tower with more than one disk must be moved in pieces. If there is just one disk, then move it. It must be possible to break the problem into simpler subproblems of same form.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
start temp finish 3 Disks
Irrespective of number of disks, the following steps need to be carried out: The

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

Page1 / 16

recursion3_honoi - Towers of Honoi An application of...

This preview shows document pages 1 - 6. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online