1 / 27

Hamilton Graphs

Hamilton Graphs. Section 6.3. Suffield. East Granby. Granby. 7. Windsor Locks. 12. 8. 10. 8. 5. Animations. The “Traveling Salesman Problem” (TSP). Hamilton Circuit – End where you started (Fed Ex) Hamilton Path – End somewhere else (Printing Problem). DC. 300.

neron
Download Presentation

Hamilton Graphs

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Hamilton Graphs Section 6.3

  2. Suffield East Granby Granby 7 Windsor Locks 12 8 10 8 5 Animations 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) 6.3 Hamilton Graphs

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

  5. DC 300 Boston 100 250 200 150 Philadelphia 150 NYC 0 of 30 How many routes must be checked to be sure to get the right answer? • 3 • 4 • 5 • 6 6.3 Hamilton Graphs

  6. 92 82 90 97 88 85 82 98 67 100 85 75 75 94 80 98 77 98 85 100 95 But suppose this were the problem? 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) 6.3 Hamilton Graphs

  8. Brute Force TreeStart and end at A B A 5 9 3 7 6 8 D C 6.3 Hamilton Graphs

  9. Solution Method 2“Nearest Neighbor”(Start and end at A)A “ ” algorithm B A 5 9 3 7 6 8 D C 6.3 Hamilton Graphs

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

  11. 1 of 30 Use Brute ForceStart and end at A(Draw a tree) B A 3 22 5 8 14 • 31 • 34 • 39 • 49 D C 9 6.3 Hamilton Graphs

  12. 0 of 30 Use Nearest NeighborStart and end at A B A 3 22 5 8 14 • 31 • 34 • 39 • 49 D C 9 6.3 Hamilton Graphs

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

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

  15. 1 of 30 “Printing Jobs” 5 B C 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? 7 8 • 20 minutes • 22 minutes • 27 minutes • 29 minutes • 30 minutes A 7 15 10 D 6.3 Hamilton Graphs

  16. Earth Simulator 6.3 Hamilton Graphs

  17. End of 6.3 6.3 Hamilton Graphs

  18. Suffield Windsor Locks Granby East Granby

  19. Suffield Windsor Locks Granby East Granby

  20. Route 1 0 miles 12 miles 20 miles 28 miles 38 miles Suffield Windsor Locks 7 12 8 10 8 5 Granby East Granby

  21. Route 2 0 miles 12 miles 17 miles 25 miles 32 miles Suffield Windsor Locks 7 12 8 10 8 5 Granby East Granby

  22. Route 3 0 miles 7 miles 15 miles 20 miles 30 miles Suffield Windsor Locks 7 12 8 10 8 5 Granby East Granby

  23. William Rowan Hamilton1805-1865 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 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 6.3 Hamilton Graphs

  26. Vertices Paths Toshiba laptop Earth Simulator 10 million/second 35.6 trillion/second 5 4! = 24 < 1 second < 1 second 10 9! = 181,440 < 1 second < 1 second 15 14! = 87.2 billion 2.4 hours 0.24 second Bill Gates’ net worth 16 15! = 1.3 trillion 36.3 hours 3.1 seconds 17 16! = 21 trillion 24.2 days 58.8 seconds 3 times the national debt / 21 cubes 300 foot sides (football field) filled with pennies 18 17! = 3.55x1014 13.7 months 16.6 minutes 19 18! = 1.2x1015 20.3 years 5 hours 20 19! = 1.2x1017 385.7 years 4 days 21 20! = 2.4x1018 7,714 years 11.3 weeks Grains of sand on all beaches in world 22 21! = 5.1x1019 162,000 years 4.6 years 25 24! = 1.5x1025 19.7 billion years 55,264.9 years Yankees Payroll 6.3 Hamilton Graphs

  27. Meta - Material 6.3 Hamilton Graphs

More Related