1 / 20

Great Ideas: Algorithm Implementation

Great Ideas: Algorithm Implementation. Richard Anderson University of Washington. Theory and Practice. What is the connection between theory and practice. Algorithm Implementation Challenge. Solve large instances of problems on real world data. Network Flow. DIMACS Network Flow Challenge

barberal
Download Presentation

Great Ideas: Algorithm Implementation

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. Great Ideas:Algorithm Implementation Richard Anderson University of Washington IUCEE: Algorithm Implementation

  2. Theory and Practice • What is the connection between theory and practice IUCEE: Algorithm Implementation

  3. Algorithm Implementation Challenge • Solve large instances of problems on real world data IUCEE: Algorithm Implementation

  4. Network Flow • DIMACS Network Flow Challenge • Compare standard flow algorithms on different data sets • Dramatic speedups over simpler algorithms • Not all theoretical algorithms were good IUCEE: Algorithm Implementation

  5. N-Body Problem • Simulate large scale phenomena • O(n2) algorithm reduces to O(n log n) algorithm • Interesting questions – what types of spatial decomposition trees to use IUCEE: Algorithm Implementation

  6. Speeding up algorithms • Approximation algorithms • TSP with triangle inequality • Dist(a, c)  Dist(a, b) + Dist(b, c) • Theorem 1: • A minimum spanning tree gives a 2 approximation of the TSP • Theorem 2 (Christophides) : • There exists a 3/2 approximation algorithm for the TSP • Construct matching of vertices of odd degree to get an eulerian tour IUCEE: Algorithm Implementation

  7. Local Improvement • Improve solution until a local maximum is reached • Two-Opting IUCEE: Algorithm Implementation

  8. Simulated Annealing • Local improvement algorithm that is allowed to make things worse • Over time the “temperature” is lowered, reducing variation IUCEE: Algorithm Implementation

  9. Brute Force Solution • Look at all possible tours • n = 10 takes 1 second • n = 12 • n = 14 • n = 16 • n = 18 • n = 20 n = 10, 1 second, 1 n = 12, 2 minutes, 132 n = 14, 6 hours, 24024 n =16, 2 months, 5765760 n=18, 50 years, 1764322560 n=20, 200 centuries 670442572800 IUCEE: Algorithm Implementation

  10. Dynamic programming algorithm • Reduces complexity from n! to n22n IUCEE: Algorithm Implementation

  11. Euclidean TSP • Cities on a map • Distance function is Euclidean distance IUCEE: Algorithm Implementation

  12. Exact Solution of Euclidean TSP IUCEE: Algorithm Implementation

  13. Sweden Tour • Applegate et al. • 24,978 cities IUCEE: Algorithm Implementation

  14. Finding an optimal tourSweden Tour Log IUCEE: Algorithm Implementation

  15. TSP Solving • Finding good tours • Proving Lower Bounds IUCEE: Algorithm Implementation

  16. Local Improvement IUCEE: Algorithm Implementation

  17. Tour Merging IUCEE: Algorithm Implementation

  18. Lower Bound • Optimal solution to an easier problem gives a lower bound • Assignment problem • Select one outgoing edge from each vertex • Select one incoming edge to each vertex • Minimize the cost of the selected edges

  19. Making a TSP out of an Assignment Problem • Need to make sure edge cross every cut • This adds many constraints • To get lower bounds we progressively add more cuts

  20. Summary for TSP Solution • Heuristics to find good tours • Improve lower bounds by adding cutting plans • Know we have the optimal when the lower bound meets the upper bound IUCEE: Algorithm Implementation

More Related