Presentation on theme: "Minimum Spanning Tree Given a weighted graph G = (V, E), generate a spanning tree T = (V, E’) such that the sum of the weights of all the edges is minimum."— Presentation transcript:
1 Minimum Spanning TreeGiven a weighted graph G = (V, E), generate a spanning tree T = (V, E’) such that the sum of the weights of all the edges is minimum.ApplicationsOn Euclidean plane, approximate solutions to the traveling salesman problem,Lease phone lines to connect the different offices with a minimum cost,Visualizing multidimensional data (how entities are related to each other)We are interested in distributed algorithms onlyThe traveling salesman problemasks for the shortest route to visita collection of cities and return tothe starting point.
3 Sequential algorithms for MST Review (1) Prim’s algorithm and (2) Kruskal’s algorithm.Theorem. If the weight of every edge is distinct, then the MST is unique.
4 Gallagher-Humblet-Spira (GHS) Algorithm 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.375FragmentFragment
5 ChallengesChallenge 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 root/coordinator
6 ChallengesChallenge 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 stepsEach 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’). The new fragment jhas a level L’.(Each fragment in level L has at least 2L nodes)
8 Least weight outgoing edge 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.Root broadcasts initiate in its own fragment, collects the report from other nodes about eligible edges using a convergecast, and determines the least weight outgoing edge.testacceptreject
9 Accept of reject? Let i send test to j Case 1. If name (i) = name (j) then send rejectCase 2. If name (i) ≠ name (j) level (i) level (j) then send acceptCase 3. If name (i) ≠ name (j) level (i) > level (j) then wait until level (j) = level (i) and then send accept/reject. WHY?(Note that levels can only increase).Q: Can fragments wait for ever and lead to a deadlock?rejecttesttest
10 The major steps repeat Test edges as outgoing or not Determine lwoe - it becomes a tree edgeSend join (or respond to join)Update level & name & identify new coordinator/rootuntil done
11 Classification of edges Basic (initially all branches are basic)Branch (all tree edges)Rejected (not a tree edge)Branch and rejected are stable attributes
12 Wrapping it up Merge The edge through which the join Example of mergeMergeThe edge through which the joinmessage is exchanged, changesits status to branch, and it becomesa tree edge.The new root broadcasts an(initiate, L+1, name) messageto the nodes in its own fragment.initiate
13 Wrapping it up Absorb T’ sends a join message to T, and receives an initiate message.This indicates that the fragment atlevel L has been absorbed by theother fragment at level L’. Theycollectively search for the lwoe.The edge through which thejoin message was sent, changesits status to branch.initiateExample of absorb
18 Message complexityAt least two messages (test + reject) must pass through eachrejected edge. The upper bound is 2|E| messages.At each of the log N levels, a node can receive at most (1) oneinitiate message and (2) one accept message (3) one joinmessage (4) one test message not leading to a rejection, and(5) one changeroot message.So, the total number of messages has an upper bound of2|E| + 5N logN