1 / 71

Minimum Spanning Trees

Minimum Spanning Trees. GHS Algorithm. Weighted Graph. (MST). Minimum weight spanning tree. The sum of the weights is minimized. For MST :. is minimized. Spanning tree fragment:. Any sub-tree of a MST. Minimum weight outgoing edge. (MWOE).

olwen
Download Presentation

Minimum Spanning Trees

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. Minimum Spanning Trees GHS Algorithm

  2. Weighted Graph

  3. (MST) Minimum weight spanning tree The sum of the weights is minimized For MST : is minimized

  4. Spanning tree fragment: Any sub-tree of a MST

  5. Minimum weight outgoing edge (MWOE) The adjacent edge to the fragment with the smallest weight that does not create a cycle

  6. Two important properties for building MST The union of a fragment and the MWOE is a fragment Property 1: Property 2: If the weights are unique then the MST is unique

  7. The union of a fragment and the MWOE is a fragment Property 1: Proof: Basic idea Examine if the new fragment is part of a MST

  8. Fragment MWOE Spanning tree If then is fragment

  9. Fragment MWOE Spanning tree If then is fragment

  10. Fragment MWOE Spanning tree then add to If and delete

  11. Fragment MWOE Spanning tree then add to If and delete

  12. Fragment MWOE Spanning tree Since otherwise, wouldn’t be MST

  13. Fragment MWOE Spanning tree thus is fragment END OF PROOF

  14. Property 2: If the weights are unique then the MST is unique Proof: Basic Idea: Suppose there are two MST Then there is another MST of smaller weight Contradiction!

  15. Suppose there are two MST

  16. Take the smallest weight edge not in intersection

  17. Cycle in RED MST

  18. Cycle in RED MST Not in BLUE MST (since blue tree is acyclic)

  19. Cycle in RED MST Since is not in intersection, (the weight of is the smallest)

  20. Cycle in RED MST Delete and add in RED MST We obtain a new tree with smaller weight Contradiction! END OF PROOF

  21. Prim’s Algorithm Start with a node as an initial fragment Repeat Augment fragment with the MWOE Until no other edge can be added to (Assume unique IDs)

  22. Fragment

  23. Fragment MWOE

  24. Fragment MWOE

  25. Fragment MWOE

  26. Fragment

  27. Theorem: Prim’s algorithm gives an MST Proof: Use Property 1 repeatedly END OF PROOF

  28. Kruskal’s Algorithm Initially, each node is a fragment Repeat Find the smallest MWOE of all fragments Merge the two fragments adjacent to Until there is one fragment (Assume unique IDs)

  29. Initially, every node is a fragment

  30. Find the smallest MWOE

  31. Merge the two fragments

  32. Find the smallest MWOE

  33. Merge the two fragments

  34. Resulting MST

  35. Theorem: Kruskal’s algorithm gives an MST Proof: Use Properties 1 and 2 repeatedly Property 2 guarantees that the merged trees are fragments END OF PROOF

  36. GHS Algorithm Distributed version of Kruskal’s Algorithm Initially, each node is a fragment (A Synchronous Phase) Repeat in parallel: Each fragment finds its MWOE Merge fragments adjacent to MWOE’s Until there is one fragment

  37. Phase 0: Initially, every node is a fragment Every node is a root of a fragment

  38. Phase 1: Find the MWOE for each fragment

  39. Phase 1: Merge the fragments Root Root Root Root symmetric MWOE Asymmetric MWOE The new root is adjacent to a symmetric MWOE

  40. Phase 1: New fragments

  41. Phase 2: Find the MWOE for each fragment

  42. Phase 2: Merge the fragments Root Root

  43. Phase 2: New fragments

  44. Phase 3: Find the MWOE for each fragment

  45. Phase 3: Merge the fragments Root

  46. Phase 3: New fragment FINAL MST

  47. Rules for selecting a Root in fragment Fragment 2 Fragment 1 root root MWOE

  48. Rules for selecting a Root in fragment Merged Fragment root Higher ID Node on MWOE

  49. Rules for selecting a Root in fragment root root root root root root root Merging more than 2 fragments

  50. Rules for selecting a Root in fragment Merged Fragment Root Higher ID Node on symmetric MWOE asymmetric

More Related