1 / 18

Minimum Spanning Tree

Minimum Spanning Tree. Given a weighted graph G = (V, E), generate a spanning tree G’ = (V’, E’ ) such that the sum of the weights of all the edges is minimum. We are interested in distributed algorithms only. Sequential algorithms for MST. Review (1) Prim’s algorithm and

may-stein
Download Presentation

Minimum Spanning Tree

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 Tree Given a weighted graph G = (V, E), generate a spanning tree G’ = (V’, E’) such that the sum of the weights of all the edges is minimum. We are interested in distributed algorithms only

  2. Sequential algorithms for MST Review (1) Prim’s algorithm and (2) Kruskal’s algorithm.

  3. Sequential algorithms for MST Theorem. If the weight of every edge is distinct, then the MST is unique.

  4. GHS is a distributed version of Prim’s algorithm. Bottom-up approach. MST is recursively constructed by fragments joined by an edge of least cost. Gallagher Humblet Spira Algorithm 3 7 5 Fragment Fragment

  5. Challenges Challenge 1. How will the nodes in a given fragment identify the edge to be used to connect with a different fragment? A root node in each fragment is the coordinator

  6. Challenges • Challenge 2. How will a node in T1 determine if a given edge connects to a node of a different tree T2 or the same tree T1? Why will node 0 choose the edge e with weight 8, and not the edge with weight 4? • Nodes in a fragment acquire the same name before augmentation.

  7. Two main steps • Each fragment has a level. Initially each node is a fragment at level 0. • (MERGE) Two fragments at the same level L combine to form a fragment of level L+1 • (ABSORB) A fragment at level L is absorbed by another fragment at level L’ (L < L’)

  8. To test if an edge is outgoing, each node sends a test message through a candidate edge. The receiving node may send accept or reject. Least weight outgoing edge test accept reject

  9. Root broadcastsinitiate in its own fragmentand collects the report from other nodes using a convergecast Least weight outgoing edge test accept reject

  10. Case 1. If name (i) = name (j) then send reject Case 2. If name (i) ≠ name (j)  level (i)  level (j) then send accept Case 3. If name (i) ≠ name (j)  level (i) > level (j) then wait untillevel (j) = level (i). Levels can only increase. Can fragments wait for ever and lead to a deadlock? Let i send test to j Accept of reject? reject test

  11. The major steps Repeat • Test edges as outgoing or not • Determine lwoe - it becomes a tree edge • Send join (or respond to join) • Update level & name & identify new coordinator Until done

  12. Classification of edges • Basic (initially all branches are basic) • Branch (all tree edges) • Rejected (not a tree edge) Branch and rejected are stable attributes

  13. Merge The edge through which the join message is sent, changes its status to branch, and becomes a tree edge. Each root broadcasts an (initiate, L+1, name) message to the nodes in its own fragment. Wrapping it up initiate

  14. Absorb T’ receives an initiate message. This indicates that the fragment at level L has been absorbed by the other fragment at level L’. They collectively search for the lwoe. The edge through which the join message was sent changes status to branch. Wrapping it up initiate

  15. Example 8 0 2 1 5 1 3 7 4 5 4 6 2 6 3 9

  16. Example 8 merge merge 0 2 1 5 1 3 7 4 5 4 6 2 merge 6 3 9

  17. Example 8 0 2 1 5 1 7 merge 3 4 5 4 6 absorb 2 6 3 9

  18. Example absorb 8 0 2 1 5 1 7 3 4 5 4 6 2 6 3 9

More Related