Download presentation

Presentation is loading. Please wait.

1
The Tower Of Hanoi Edouard Lucas

2
Once upon a time! The Tower of Hanoi (sometimes referred to as the Tower of Brahma or the End of the World Puzzle) was invented by the French mathematician, Edouard Lucas, in He was inspired by a legend that tells of a Hindu temple where the pyramid puzzle might have been used for the mental discipline of young priests.

3
What does legend say?? Legend says that at the beginning of time the priests in the temple were given a stack of 64 gold disks, each one a little smaller than the one beneath it. Their assignment was to transfer the 64 disks from one of three poles to another, with one important proviso a large disk could never be placed on top of a smaller one. The priests worked very efficiently, day and night. When they finished their work, the myth said, the temple would crumble into dust and the world would vanish. How many moves ( & how long) would the priests need to take to complete the task??

4
**Start here - Instructions**

1. Transfer all the disks from one pole to another pole. 2. You may move only ONE disk at a time. 3. A large disk may not rest on top of a smaller one at any time. What is the shortest number of moves the priests would need to take to move 64 disks and how long would it take, if they moved them at a rate of one disk per second? 1 2 3 A B C

5
**Shortest number of moves??**

Try this one! 1 2 3 4 A B C Shortest number of moves??

6
**Shortest number of moves??**

And this one 1 2 3 4 5 A B C Shortest number of moves??

7
**Shortest number of moves??**

Now try this one! 1 2 3 4 5 6 A B C Shortest number of moves??

8
**Where's the maths in this game?**

From the moves necessary to transfer one, two, and three disks, we can find a recursive pattern - a pattern that uses information from one step to find the next step. Unfortunately, if we want to know how many moves it will take to transfer 64 disks from post A to post C, we will first have to find the moves it takes to transfer 63 disks, 62 disks, and so on. Therefore the recursive pattern will not be much help in finding the number of moves or the time it would take to transfer all the disks.

9
However, the recursive pattern can help us generate more numbers to find an explicit (non-recursive) pattern. Here's how to find the number of moves needed to transfer larger numbers of disks from post A to post C, when M = the number of moves needed to transfer n-1 disks from post A to post C: for 1 disk it takes 1 move to transfer 1 disk from post A to post C; for 2 disks, it will take 3 moves: 2M + 1 = 2(1) + 1 = 3 for 3 disks, it will take 7 moves: 2M + 1 = 2(3) + 1 = 7 for 4 disks, it will take 15 moves: 2M + 1 = 2(7) + 1 = 15 for 5 disks, it will take 31 moves: 2M + 1 = 2(15) + 1 = 31 for 6 disks... ?

10
**Explicit Pattern Number of Disks Number of Moves 1 1 2 3 3 7 4 15 5 31**

1 1 2 3 3 7

11
**Powers of two help reveal the pattern:**

Number of Disks (n) Number of Moves = = 1 = = = = 7 = = 15 = = 31 = = 63

12
Fascinating fact So the formula for finding the number of steps it takes to transfer n disks from post A to post C is: 2 n - 1 The number of separate transfers of single disks the priests must make to transfer the tower is 2 to the 64th minus 1, or 18,446,744,073,709,551,615 moves! If the priests worked day and night, making one move every second it would take slightly more than 580 billion years to accomplish the job! - far, far longer than some scientists estimate the solar system will last.

13
The Tower Of Hanoi

Similar presentations

Presentation is loading. Please wait....

OK

CS1010: Programming Methodology

CS1010: Programming Methodology

© 2018 SlidePlayer.com Inc.

All rights reserved.

To ensure the functioning of the site, we use **cookies**. We share information about your activities on the site with our partners and Google partners: social networks and companies engaged in advertising and web analytics. For more information, see the Privacy Policy and Google Privacy & Terms.
Your consent to our cookies if you continue to use this website.

Ads by Google

Download ppt on oxidation and reduction practice Ppt on amplitude shift keying spectrum Free ppt on agriculture in india Ppt on layer 3 switching vs routing Ppt on fuel from plastic waste Ppt on earthquake in china Ppt on ways to improve communication skills Ppt on computer application in daily life Ppt on area of trapezium rectangle Ppt on marketing management by philip kotler marketing