A Distributed Algorithm for Minimum-Weight Spanning Trees

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.
Design and Analysis of Algorithms Approximation algorithms for NP-complete problems Haidong Xue Summer 2012, at GSU.
Greedy Algorithms Greed is good. (Some of the time)
Great Theoretical Ideas in Computer Science for Some.
Graphs CSC 220 Data Structure. Introduction One of the Most versatile data structures like trees. Terminology –Nodes in trees are vertices in graphs.
22C:19 Discrete Structures Trees Spring 2014 Sukumar Ghosh.
IKI 10100: Data Structures & Algorithms Ruli Manurung (acknowledgments to Denny & Ade Azurat) 1 Fasilkom UI Ruli Manurung (Fasilkom UI)IKI10100: Lecture10.
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.
Breadth-First Search Seminar – Networking Algorithms CS and EE Dept. Lulea University of Technology 27 Jan Mohammad Reza Akhavan.
Minimum Spanning Trees
Minimum Spanning Trees
1 Discrete Structures & Algorithms Graphs and Trees: II EECE 320.
Routing, Anycast, and Multicast for Mesh and Sensor Networks Roland Flury Roger Wattenhofer RAM Distributed Computing Group.
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.
[1][1][1][1] Lecture 2-3: Coping with NP-Hardness of Optimization Problems in Practice May 26 + June 1, Introduction to Algorithmic Wireless.
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.
Breadth First Search (BFS) Part 2 COMP171. Graph / Slide 2 Shortest Path Recording * BFS we saw only tells us whether a path exists from source s, to.
Design and Analysis of Algorithms Minimum Spanning trees
CS420 lecture eight Greedy Algorithms. Going from A to G Starting with a full tank, we can drive 350 miles before we need to gas up, minimize the number.
Minimum spanning tree Prof Amir Geva Eitan Netzer.
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.
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.
7.1 and 7.2: Spanning Trees. A network is a graph that is connected –The network must be a sub-graph of the original graph (its edges must come from the.
Discrete Structures Lecture 12: Trees Ji Yanyan United International College Thanks to Professor Michael Hvidsten.
Lecture 19 Greedy Algorithms Minimum Spanning Tree Problem.
1 Shape Segmentation and Applications in Sensor Networks Xianjin Xhu, Rik Sarkar, Jie Gao Department of CS, Stony Brook University INFOCOM 2007.
Introduction to Graph Theory
Minimum Spanning Trees CS 146 Prof. Sin-Min Lee Regina Wang.
Foundation of Computing Systems
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.
Construction of Optimal Data Aggregation Trees for Wireless Sensor Networks Deying Li, Jiannong Cao, Ming Liu, and Yuan Zheng Computer Communications and.
Introduction Wireless Ad-Hoc Network  Set of transceivers communicating by radio.
Chapter 11. Chapter Summary  Introduction to trees (11.1)  Application of trees (11.2)  Tree traversal (11.3)  Spanning trees (11.4)
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.
Graph Search Applications, Minimum Spanning Tree
May 12th – Minimum Spanning Trees
Discrete Mathematicsq
The Echo Algorithm The echo algorithm can be used to collect and disperse information in a distributed system It was originally designed for learning network.
Towards Globally Optimal Normal Orientations for Large Point Clouds
Design & Analysis of Algorithm Greedy Algorithm
Great Theoretical Ideas in Computer Science
CS60002: Distributed Systems
CISC 235: Topic 10 Graph Algorithms.
Graph Algorithm.
MST GALLAGER HUMBLET SPIRA ALGORITHM
Minimum Spanning Tree.
CS200: Algorithm Analysis
Tree Construction (BFS, DFS, MST) Chapter 5
Minimum Spanning Tree.
Graphs Chapter 11 Objectives Upon completion you will be able to:
CSE 373 Data Structures and Algorithms
Minimum Spanning Tree.
Minimum Spanning Tree Name\Tareq Babaqi.
Hannah Tang and Brian Tjaden Summer Quarter 2002
Introduction Wireless Ad-Hoc Network
MST GALLAGER HUMBLET SPIRA ALGORITHM
Lecture 14 Shortest Path (cont’d) Minimum Spanning Tree
Backtracking and Branch-and-Bound
Minimum Spanning Trees (MSTs)
Spanning Trees Lecture 20 CS2110 – Spring 2015.
CSE 332: Minimum Spanning Trees
Lecture 13 Shortest Path (cont’d) Minimum Spanning Tree
Chapter 15.5 from “Distributed Algorithms” by Nancy A. Lynch
Presentation transcript:

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 systems,1983 Modified and Presented by Basil Alhakami

Outline Introduction The idea of Distributed MST The algorithm

Introduction Why are we studying DMST Overall storage overflow problem in sensor networks X

Introduction Why are we studying DMST Data aggregation problem in a general graph topology is NP-hard Solved by an approximation algorithm, which yields energy cost that is at most (2- 1/q ) times of the optimal. Where q is the number of aggregators. We need to visit q nodes so the algorithm sort all the edges in an increasing order and include them in the graph until we reach q edges (visited q aggregators).forming a q-edge forest. When q= |V|-1 ,where |V| is the total number of vertices. Than the q-edge forest is actually a Minimum Spanning Tree.

Introduction Problem A graph Every edge has a weight 4 8 3 1 7 2 5 6

Introduction Solution A spanning tree So that the sum is minimized 8 3 4 8 3 1 7 2 5 6

Introduction Solution A spanning tree So that the sum is minimized 8 3 1 4 5 2 6 7

Introduction Definition – MST fragment A connected sub-tree of MST Example of possible fragments: 5 4 8 3 1 7 2 6

Introduction MST Property 1 Given a fragment of an MST, let e be a minimum-weight outgoing edge of the fragment. Then joining e and its adjacent non-fragment node to the fragment yields another fragment of an MST. 5 4 8 3 1 7 2 6 e

Introduction MST Property 2 If all the edges of a connected graph have different weights, then the MST is unique. 4 8 3 1 7 2 5 6

Introduction Idea of MST based on properties 1 & 2 Start with fragments of one node. 4 8 3 1 7 2 5 6

Introduction Idea of MST based on properties 1 & 2 Enlarge fragments in any order (property 1) Combine fragments with a common node (property 2) 4 8 3 1 7 2 5 6

Introduction Idea of MST based on properties 1 & 2 Enlarge fragments in any order (property 1) Combine fragments with a common node (property 2) 4 8 3 1 7 2 5 6

Introduction Idea of MST based on properties 1 & 2 Enlarge fragments in any order (property 1) Combine fragments with a common node (property 2) 4 8 3 1 7 2 5 6

Introduction Idea of MST based on properties 1 & 2 Enlarge fragments in any order (property 1) Combine fragments with a common node (property 2) 4 8 3 1 7 2 5 6

Introduction Idea of MST based on properties 1 & 2 Enlarge fragments in any order (property 1) Combine fragments with a common node (property 2) 4 8 3 1 7 2 5 6

Introduction Idea of MST based on properties 1 & 2 Enlarge fragments in any order (property 1) Combine fragments with a common node (property 2) 4 8 3 1 7 2 5 6

Introduction Idea of MST based on properties 1 & 2 Enlarge fragments in any order (property 1) Combine fragments with a common node (property 2) 4 8 3 1 7 2 5 6

Outline Introduction The idea of Distributed MST The algorithm

The idea of Distributed MST Fragments Every node starts as a single fragment. 4 8 3 1 7 2 5 6

The idea of Distributed MST Fragments Each fragment finds its minimum outgoing edge. 4 8 3 1 7 2 5 6

The idea of Distributed MST Fragments Each fragment finds its minimum outgoing edge. Then it tries to combine with the adjacent fragment. 4 8 3 1 7 2 5 6

The idea of Distributed MST Levels Every fragment has an associated level that has impact on combining fragments. A fragment with a single node is defined to to be at level 0.

The idea of Distributed MST Levels The combination of two fragments depends on the levels of fragments. 4 8 3 1 7 2 5 6 F F’

The idea of Distributed MST Levels The combination of two fragments depends on the levels of fragments. 4 8 3 1 7 2 5 6 L=1 L’=2 F F’ If a fragment F wishes to connect to a fragment F’ and L < L’ then:

The idea of Distributed MST Levels The combination of two fragments depends on the levels of fragments. If a fragment F wishes to connect to a fragment F’ and L < L’ then: 4 8 3 1 7 2 5 6 F L=1 F is absorbed in F’ and the resulting fragment is at level L’. F’ L’=2

The idea of Distributed MST Levels The combination of two fragments depends on the levels of fragments. If fragments F and F’ have the same minimum outgoing edge and L = L’ then: 4 8 3 1 7 2 5 6 F F’ L=1 L’=1

The idea of Distributed MST Levels The combination of two fragments depends on the levels of fragments. If fragments F and F’ have the same minimum outgoing edge and L = L’ then: 4 8 3 1 7 2 5 6 F F’’ F’ L=1 L’’=2 L’=1 The fragments combine into a new fragment F’’ at level L’’ = L+1.

The idea of Distributed MST Levels The identity of a fragment is the weight of its core. If fragments F and F’ with same level were combined, the combining edge is called the core of the new segment. 4 8 3 1 7 2 5 6 F’’ L’’=2 core

The idea of Distributed MST State Each node has a state Sleeping - initial state Find - during fragment’s search for a minimal outgoing edge Found - otherwise (when a minimal outgoing edge was found

Outline Introduction The idea of Distributed MST The algorithm

The Algorithm Fragment minimum outgoing edge discovery Special case of zero-level fragment (Sleeping). 4 8 3 1 7 2 5 6

The Algorithm Fragment minimum outgoing edge discovery Special case of zero-level fragment (Sleeping). When a node awakes from the state Sleeping, it finds a minimum edge connected. 4 8 3 1 7 2 5 6

The Algorithm Minimum outgoing edge discovery Special case of zero-level fragment (Sleeping). When a node awakes from the state Sleeping, it finds a minimum edge connected. 4 8 3 1 7 2 5 6 Marks it as a branch of MST and sends a Connect message over this edge.

The Algorithm Minimum outgoing edge discovery Special case of zero-level fragment (Sleeping). When a node awakes from a state Sleeping, it finds a minimum edge connected. 4 8 3 1 7 2 5 6 Marks it as a branch of MST and sends a Connect message over this edge. Goes into a Found state.

The Algorithm Minimum outgoing edge discovery Take a fragment at level L that was just combined out of two level L-1 fragments. 4 3 1 7 2 5 6 8 F’’ L’’=2 F L=1 F’ L’=1

The Algorithm Minimum outgoing edge discovery Take a fragment at level L that was just combined out of two level L-1 fragments. The weight of the core is the identity of the fragment. 4 3 1 7 2 5 6 8 ID’’ = 2 F’’ It acts as a root of a fragment tree. L’’=2 F L=1 F’ L’=1 core

The Algorithm Minimum outgoing edge discovery Take a fragment at level L that was just combined out of two level L-1 fragments. Nodes adjacent to core send an Initiate message to the borders. 4 3 1 7 2 5 6 8

The Algorithm Minimum outgoing edge discovery Take a fragment at level L that was just combined out of two level L-1 fragments. Nodes adjacent to core send an Initiate message to the borders. 8 3 Relayed by the intermediate nodes in the fragment. 1 4 5 2 6 7

The Algorithm Minimum outgoing edge discovery Take a fragment at level L that was just combined out of two level L-1 fragments. Nodes adjacent to core send an Initiate message to the borders. 8 3 Relayed by the intermediate nodes in the fragment. 1 4 5 2 6 Puts the nodes in the Find state. 7

The Algorithm Minimum outgoing edge discovery Edge classification/ Basic - yet to be classified, can be inside fragment or outgoing edges 8 3 1 4 5 2 6 7

The Algorithm Minimum outgoing edge discovery Edge classification. Rejected – an inside fragment edge 8 3 1 4 5 2 6 7

The Algorithm Minimum outgoing edge discovery Edge classification. Branch – an MST edge 8 3 1 4 5 2 6 7

The Algorithm Minimum outgoing edge discovery On receiving the Initiate message a node tries to find a minimum outgoing edge. Sends a Test message on Basic edges (minimal first) 8 3 1 4 5 2 6 7

The Algorithm Minimum outgoing edge discovery On receiving the Test message. In case of same identity: send a Reject message, the edge is Rejected. 8 3 In case Test was sent in both directions, the edge is Rejected automatically without a Reject message. 1 4 5 2 6 7

The Algorithm Minimum outgoing edge discovery On receiving the Test message. Response Delayed L=0 In case of a self lower level: Delay the response until the identity rises sufficiently. 8 3 L=3 1 4 5 2 6 7

The Algorithm Minimum outgoing edge discovery On receiving the Test message. L=0 In case of a self higher level: Send an Accept message 8 3 The edge is accepted as a candidate. L=3 1 4 5 2 6 7

The Algorithm Minimum outgoing edge discovery Agreeing on the minimal outgoing edge. Nodes send Report messages along the branches of the MST. 8 3 If no outgoing edge was found the algorithm is complete. 1 4 5 2 6 7

The Algorithm Minimum outgoing edge discovery Agreeing on the minimal outgoing edge. Nodes send Report messages along the branches of the MST. 8 3 If no outgoing edge was found the algorithm is complete. 1 4 5 2 6 After sending they go into Found mode. 7

The Algorithm Minimum outgoing edge discovery Agreeing on the minimal outgoing edge. Every leaf sends the Report when resolved its outgoing edge. 8 3 1 4 5 2 6 7

The Algorithm Minimum outgoing edge discovery Agreeing on the minimal outgoing edge. Every leaf sends the Report when resolved its outgoing edge. 8 3 1 4 5 2 6 7

The Algorithm Minimum outgoing edge discovery Agreeing on the minimal outgoing edge. Every interior sends the Report when resolved its outgoing and all its children sent theirs. 8 3 1 4 5 2 6 7

The Algorithm Minimum outgoing edge discovery Agreeing on the minimal outgoing edge. Every interior sends the Report when resolved its outgoing and all its children sent theirs. 8 3 1 4 5 2 6 7

The Algorithm Minimum outgoing edge discovery Agreeing on the minimal outgoing edge. minimal outgoing Every node remembers the branch to the minimal outgoing edge of its sub-tree, denoted best-edge. 8 3 best-edge 1 4 5 2 6 7

The Algorithm Minimum outgoing edge discovery Agreeing on the minimal outgoing edge. The core adjacent nodes exchange Reports and decide on the minimal outgoing edge. 8 3 ? 1 4 5 2 6 7

The Algorithm Combining segments Changing core. When decided a Change-core message is sent over branches to the minimal outgoing edge. new core 8 3 ? The tree branches point to the new core. 1 4 5 2 6 7

The Algorithm Combining segments Changing core Connect When decided a Change-core message is sent over branches to the minimal outgoing edge. 8 3 ? The tree branches point to the new core. 1 4 5 2 6 Finally a Connect message is sent over the minimal edge. 7

The Algorithm Final notes Connecting same level fragments. Both core adjacent nodes send a Connect message, which causes the level to be increased. 8 3 F As a result, core is changed and new Initiate messages are sent. F’ L=1 1 L’=1 4 5 2 6 7

The Algorithm Final notes Connecting lower level fragments. When lower level fragment F’ at node n’ joins some fragment F at node n after n sent its Report. It means that n already found a lower edge and therefore we can send n’ an Initiate message with the Found state so it doesn’t join the search.

Our Summer Project We’ll modify existing Aggregation simulation code and existing DMST python code to solve the aggregation using DMST. In the aggregation we need to visit q nodes not all the nodes in the graph so the DMST algorithm should stop when the goal is reached. This goal is met when we reach |V|-q fragments.

Thank You