1 / 13

Analysis of Algorithms

Analysis of Algorithms. Minimum Spanning Trees. Uri Zwick February 2014. Find a minimum spanning tree. 11. 16. 22. 17. 5. 8. 1. 13. 3. 18. 30. 12. 25. 9. 2. 15. Kruskal’s algorithm. 11. 16. 22. 17. 5. 8. 1. 13. 3. 18. 30. 12. 25. 9. 2. 15. Prim’s algorithm.

garth
Download Presentation

Analysis of Algorithms

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. Analysis of Algorithms Minimum Spanning Trees Uri Zwick February 2014

  2. Find a minimum spanning tree 11 16 22 17 5 8 1 13 3 18 30 12 25 9 2 15

  3. Kruskal’s algorithm 11 16 22 17 5 8 1 13 3 18 30 12 25 9 2 15

  4. Prim’s algorithm 11 16 22 17 5 8 1 13 3 18 30 12 25 9 2 15

  5. Boruvka’s algorithm 11 16 22 17 5 8 1 13 3 18 30 12 25 9 2 15

  6. MST verification 11 16 22 17 5 8 1 13 3 18 30 12 25 9 2 15

  7. Comparison-based MST algorithms Deterministic Rand.

  8. Assume for simplicity that all edge weights are distinct The MST is then unique

  9. Cut rule S VS The lightest edge in a cut is contained in the MST

  10. Cycle rule C The heaviest edge on a cycle is not contained in the MST

  11. Cuts andcycles The intersection between a cut and a cycle is of even size

  12. Fundamental cycles Tree + non-tree edge  unique cycle The removal of any tree edge on the cyclegenerates a new tree

  13. Cut rule - proof S VS w' w w < w' The lightest edge in a cut is contained in the MST

More Related