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.

Slides:



Advertisements
Similar presentations
Chapter 5: Tree Constructions
Advertisements

Distributed Minimum Spanning Tree Gallagher, Humblet, Spira (1983) pseudocode adaptation by Kenneth J. Goldman September 2002.
Weighted graphs Example Consider the following graph, where nodes represent cities, and edges show if there is a direct flight between each pair of cities.
O(N 1.5 ) divide-and-conquer technique for Minimum Spanning Tree problem Step 1: Divide the graph into  N sub-graph by clustering. Step 2: Solve each.
Chapter 15 Basic Asynchronous Network Algorithms
Great Theoretical Ideas in Computer Science for Some.
Minimum Spanning Trees GHS algorithm Based on “A distributed algorithm for minimum-weight spanning trees”, Gallager, Humblet, Spira 1983 גיא בניי ו - ירון.
1 2 Lecture Outline 1.Problem description TThe distinct weights demand 2.Review of spanning trees PProperties of spanning trees KKruskal’s algorithm.
Lecture 7: Synchronous Network Algorithms
Minimum Spanning Trees
Minimum Spanning Trees
1 Discrete Structures & Algorithms Graphs and Trees: II EECE 320.
Graph Algorithms: Minimum Spanning Tree We are given a weighted, undirected graph G = (V, E), with weight function w:
1 Minimum Spanning Trees Gallagher-Humblet-Spira (GHS) Algorithm.
3 -1 Chapter 3 The Greedy Method 3 -2 The greedy method Suppose that a problem can be solved by a sequence of decisions. The greedy method has that each.
A Distributed Algorithm for Minimum-Weight Spanning Trees by R. G. Gallager, P.A. Humblet, and P. M. Spira ACM, Transactions on Programming Language and.
Design and Analysis of Algorithms Minimum Spanning trees
The Travelling Salesman Algorithm A Salesman has to visit lots of different stores and return to the starting base On a graph this means visiting every.
Minimum Spanning Trees. Subgraph A graph G is a subgraph of graph H if –The vertices of G are a subset of the vertices of H, and –The edges of G are a.
Minimum Spanning Trees What is a MST (Minimum Spanning Tree) and how to find it with Prim’s algorithm and Kruskal’s algorithm.
Complexity of Bellman-Ford Theorem. The message complexity of Bellman-Ford algorithm is exponential. Proof outline. Consider a topology with an even number.
Distributed Algorithms 2014 Igor Zarivach A Distributed Algorithm for Minimum Weight Spanning Trees By Gallager, Humblet,Spira (GHS)
© The McGraw-Hill Companies, Inc., Chapter 3 The Greedy Method.
Chapter 9 – Graphs A graph G=(V,E) – vertices and edges
Graph Dr. Bernard Chen Ph.D. University of Central Arkansas.
COSC 2007 Data Structures II Chapter 14 Graphs III.
Complexity of Bellman-Ford
1 Broadcast. 2 3 Use a spanning tree Root 4 synchronous It takes the same time at link to send a message It takes the same time at each node to process.
A correction The definition of knot in page 147 is not correct. The correct definition is: A knot in a directed graph is a subgraph with the property that.
CSE 589 Part VI. Reading Skiena, Sections 5.5 and 6.8 CLR, chapter 37.
Hwajung Lee. Why graph algorithms ? It is not a “graph theory” course! Many problems in networks can be modeled as graph problems. Note that -The topology.
1 The Minimum Spanning Tree Problem Distributing Prim’s and Kruskal’s Algorithm.
Minimum Spanning Trees CS 146 Prof. Sin-Min Lee Regina Wang.
TSP – Upper Bounds and Lower Bounds Initial problem : Upper Bound A salesman based in Stockton needs to visit shops based in Darlington, Billingham, Middlesbrough,
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.
Tree Constructions Distributed Algorithms for Multi-Agent Networks Instructor: K. Sinan YILDIRIM.
Trees Dr. Yasir Ali. A graph is called a tree if, and only if, it is circuit-free and connected. A graph is called a forest if, and only if, it is circuit-free.
Minimum- Spanning Trees
1 CPSC 320: Intermediate Algorithm Design and Analysis July 14, 2014.
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.
CIS 825 Lecture 9. Minimum Spanning tree construction Each node is a subtree/fragment by itself. Select the minimum outgoing edge of the fragment Send.
CIS 825 Lecture 8. Leader Election Aim is to elect exactly one node as the leader.
Traveling Salesman Problem DongChul Kim HwangRyol Ryu.
1 Minimum Spanning Tree: Solving TSP for Metric Graphs using MST Heuristic Soheil Shafiee Shabnam Aboughadareh.
The travelling salesman problem Finding an upper bound using minimum spanning trees Find a minimum spanning tree using Prim’s algorithm or Kruskal’s algorithm.
Graphs 1 Neil Ghani University of Strathclyde. Where are we …. We studied lists: * Searching and sorting a list Then we studied trees: * Efficient search.
1 Minimum Spanning Trees Gallagher-Humblet-Spira (GHS) Algorithm.
Chapter 9 : Graphs Part II (Minimum Spanning Trees)
Minimum Spanning Tree Chapter 13.6.
A Distributed Algorithm for Minimum-Weight Spanning Trees
Great Theoretical Ideas in Computer Science
CS60002: Distributed Systems
MST GALLAGER HUMBLET SPIRA ALGORITHM
Minimum Spanning Tree.
Minimum Spanning Tree Neil Tang 3/25/2010
Tree Construction (BFS, DFS, MST) Chapter 5
Minimum Spanning Tree.
Minimum Spanning Tree.
The Minimum Spanning Tree Problem
Graphs Chapter 13.
Minimum Spanning Tree.
MST GALLAGER HUMBLET SPIRA ALGORITHM
Minimum Spanning Tree Neil Tang 4/3/2008
Minimum Spanning Tree.
Minimum spanning trees
Minimum Spanning Trees (MSTs)
Prim’s Minimum Spanning Tree Algorithm Neil Tang 4/1/2008
Prim’s algorithm for minimum spanning trees
Chapter 15.5 from “Distributed Algorithms” by Nancy A. Lynch
Minimum-Cost Spanning Tree
Presentation transcript:

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. Applications On 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 only The traveling salesman problem asks for the shortest route to visit a collection of cities and return to the starting point.

Example

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.

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. 3 7 5 Fragment Fragment

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 root/coordinator

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.

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’). The new fragment jhas a level L’. (Each fragment in level L has at least 2L nodes)

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. test accept reject

Accept of reject? Let i send test to j 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 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? reject test test

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/root until done

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

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

Wrapping it up Absorb T’ sends a join message to T, and 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 its status to branch. initiate Example of absorb

Example 8 2 1 5 1 3 7 4 5 4 6 2 6 9 3

Example merge 8 merge 2 1 5 1 3 7 4 5 4 6 2 merge 6 9 3

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

Example absorb 8 2 1 5 1 7 3 4 5 4 6 2 6 9 3

Message complexity At least two messages (test + reject) must pass through each rejected edge. The upper bound is 2|E| messages. At each of the log N levels, a node can receive at most (1) one initiate message and (2) one accept message (3) one join message (4) one test message not leading to a rejection, and (5) one changeroot message. So, the total number of messages has an upper bound of 2|E| + 5N logN