Presentation is loading. Please wait.

Presentation is loading. Please wait.

Hamilton Graphs Section 6.3 6.3 Hamilton Graphs 2 East Granby Suffield 7 810 5 12 8 Granby Windsor Locks Animations.

Similar presentations


Presentation on theme: "Hamilton Graphs Section 6.3 6.3 Hamilton Graphs 2 East Granby Suffield 7 810 5 12 8 Granby Windsor Locks Animations."— Presentation transcript:

1

2 Hamilton Graphs Section 6.3

3 6.3 Hamilton Graphs 2 East Granby Suffield 7 810 5 12 8 Granby Windsor Locks Animations

4 6.3 Hamilton Graphs 3 The “Traveling Salesman Problem” (TSP) Hamilton Circuit – End where you started (Fed Ex) Hamilton Path – End somewhere else (Printing Problem)

5 6.3 Hamilton Graphs 4 You solve it (Start and end at Boston) 1. 650 miles 2. 700 miles 3. 750 miles 4. 850 miles 5. None of the above Boston NYC DC Philadelphia 150 250 150 200 300 100

6 6.3 Hamilton Graphs 5 How many routes must be checked to be sure to get the right answer? 1.3 2.4 3.5 4.6 Boston NYC DC Philadelphia 150 250 150 200 300 100

7 6.3 Hamilton Graphs 6 But suppose this were the problem? 92 94 80 77 100 90 97 75 100 67 75 82 85 98 88 85 98 82 85 98 95

8 6.3 Hamilton Graphs 7 Solution Method 1 “ Brute Force” Calculate possible circuits (paths) that visit each location once and only once Then choose the circuit (path)

9 6.3 Hamilton Graphs 8 Brute Force Tree Start and end at A A B DC 7 8 6 39 5

10 6.3 Hamilton Graphs 9 Solution Method 2 “Nearest Neighbor” (Start and end at A) A “ ” algorithm A B DC 7 8 6 39 5

11 6.3 Hamilton Graphs 10 Pros and Cons of each method Brute Force Nearest Neighbor

12 6.3 Hamilton Graphs 11 Use Brute Force Start and end at A (Draw a tree) B 22 A C 14 9 8 5 3 D 1.31 2.34 3.39 4.49

13 6.3 Hamilton Graphs 12 Use Nearest Neighbor Start and end at A 1.31 2.34 3.39 4.49 B 22 A C 14 9 8 5 3 D

14 6.3 Hamilton Graphs 13 Nearest Neighbor (Start and end at Granby) 1. 42 miles 2. 46 miles 3. 51 miles 4. 53 miles 5. None of the above Granby Suffield E. Granby Windsor Locks Bloomfield 8 10 12 4 9 6 14 10

15 6.3 Hamilton Graphs 14 Brute Force (Start and end at Granby) Granby Suffield E. Granby Windsor Locks Bloomfield 8 10 12 4 9 6 14 10

16 6.3 Hamilton Graphs 15 “Printing Jobs” 1. 20 minutes 2. 22 minutes 3. 27 minutes 4. 29 minutes 5. 30 minutes Printing job A must be done first. The numbers are “down-times”. After doing job A it takes 7 minutes to set up job B, 8 minutes to set up C, and 10 minutes to set up D. In what order should the jobs be scheduled so that the down-time is kept to a minimum? A B C D 5 7 8 15 7 10

17 6.3 Hamilton Graphs 16 Earth Simulator

18 6.3 Hamilton Graphs 17 End of 6.3

19 18 Windsor Locks East Granby Suffield Granby

20 19 East Granby SuffieldWindsor Locks Granby

21 20 GranbyEast Granby Suffield 0 miles 7 810 5 12 8 12 miles20 miles28 miles38 miles Windsor Locks

22 21 East Granby Suffield 0 miles 7 810 5 12 8 12 miles17 miles25 miles32 miles Windsor Locks Granby

23 22 GranbyEast Granby Suffield 0 miles7 miles 7 810 5 12 8 15 miles20 miles30 miles Windsor Locks

24 6.3 Hamilton Graphs 23 William Rowan Hamilton 1805-1865

25 6.3 Hamilton Graphs 24 Earth Simulator In 2004, the Japanese developed a super computer known as “Earth Simulator” to study long-range global warming. The $350 million computer performs 35.6 trillion calculations a second, more computations than there are stars in our galaxy

26 6.3 Hamilton Graphs 25 Computational Complexity Computer 1 : A Toshiba laptop can check 10 Million paths each second Computer 2: “Earth Simulator” can check 35.6 Trillion paths each second

27 6.3 Hamilton Graphs 26 VerticesPathsToshiba laptopEarth Simulator 10 million/second 35.6 trillion/second 54! = 24 < 1 second< 1 second 10 9! = 181,440< 1 second< 1 second 1514! = 87.2 billion2.4 hours0.24 second Bill Gates’ net worth 1615! = 1.3 trillion36.3 hours3.1 seconds 1716! = 21 trillion24.2 days58.8 seconds 3 times the national debt / 21 cubes 300 foot sides (football field) filled with pennies 1817! = 3.55x10 14 13.7 months16.6 minutes 1918! = 1.2x10 15 20.3 years5 hours 2019! = 1.2x10 17 385.7 years4 days 2120! = 2.4x10 18 7,714 years11.3 weeks Grains of sand on all beaches in world 2221! = 5.1x10 19 162,000 years4.6 years 2524! = 1.5x10 25 19.7 billion years55,264.9 years Yankees Payroll

28 6.3 Hamilton Graphs 27 Meta - Material


Download ppt "Hamilton Graphs Section 6.3 6.3 Hamilton Graphs 2 East Granby Suffield 7 810 5 12 8 Granby Windsor Locks Animations."

Similar presentations


Ads by Google