50 likes | 221 Views
Measuring Efficiency Problem: Towers of Hanoi. Three towers Move all disks from one tower to another Only move one at a time Smaller disks must rest on larger ones. High Schools: Information Technology Opportunities at Algonquin College. Measuring Efficiency Problem: Towers of Hanoi.
E N D
Measuring EfficiencyProblem: Towers of Hanoi • Three towers • Move all disks from one tower to another • Only move one at a time • Smaller disks must rest on larger ones High Schools:Information Technology Opportunities at Algonquin College
Measuring EfficiencyProblem: Towers of Hanoi • Calculate the minimum number of moves. High Schools:Information Technology Opportunities at Algonquin College
Measuring EfficiencyProblem: Towers of Hanoi • Minimum number of moves. • What’s the pattern? • 2n - 1 High Schools:Information Technology Opportunities at Algonquin College
Measuring EfficiencyProblem: Towers of Hanoi • Scale the problem from 5 disks to 60. • How long to solve. • One move per second. • 1,152,921,504,607,000,000 moves High Schools:Information Technology Opportunities at Algonquin College
Measuring EfficiencyProblem: Towers of Hanoi • Finish in about 36 billion years • Universe is less than 15 billion years old High Schools:Information Technology Opportunities at Algonquin College