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.

Slides:



Advertisements
Similar presentations
Chapter 5: Tree Constructions
Advertisements

6.896: Topics in Algorithmic Game Theory Lecture 21 Yang Cai.
Lecture 15. Graph Algorithms
Routing and Congestion Problems in General Networks Presented by Jun Zou CAS 744.
COMP 482: Design and Analysis of Algorithms
Distributed Minimum Spanning Tree Gallagher, Humblet, Spira (1983) pseudocode adaptation by Kenneth J. Goldman September 2002.
Communication Networks Recitation 3 Bridges & Spanning trees.
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.
Greedy Algorithms Greed is good. (Some of the time)
Great Theoretical Ideas in Computer Science for Some.
Self Stabilizing Algorithms for Topology Management Presentation: Deniz Çokuslu.
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
Outline. Theorem For the two processor network, Bit C(Leader) = Bit C(MaxF) = 2[log 2 ((M + 2)/3.5)] and Bit C t (Leader) = Bit C t (MaxF) = 2[log 2 ((M.
Minimum Spanning Trees
Minimum Spanning Trees
Lectures on Network Flows
Discussion #36 Spanning Trees
1 Minimum Spanning Trees Gallagher-Humblet-Spira (GHS) Algorithm.
CPSC 668Set 3: Leader Election in Rings1 CPSC 668 Distributed Algorithms and Systems Spring 2008 Prof. Jennifer Welch.
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.
DAST 2005 Tirgul 14 (and more) sample questions. DAST 2005 (reminder?) Kruskal’s MST Algorithm.
TCOM 501: Networking Theory & Fundamentals
Minimal Spanning Trees. Spanning Tree Assume you have an undirected graph G = (V,E) Spanning tree of graph G is tree T = (V,E T E, R) –Tree has same set.
The Byzantine Generals Strike Again Danny Dolev. Introduction We’ll build on the LSP presentation. Prove a necessary and sufficient condition on the network.
Raeda Naamnieh 1. The Partition Algorithm Intuitively, the idea of the following algorithm is to choose each cluster as a maximal subset of nodes whose.
Tirgul 13 Today we’ll solve two questions from last year’s exams.
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 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.
Minimal Spanning Trees What is a minimal spanning tree (MST) and how to find one.
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.
Spanning Trees Introduction to Spanning Trees AQR MRS. BANKS Original Source: Prof. Roger Crawfis from Ohio State University.
Lecture 19 Greedy Algorithms Minimum Spanning Tree Problem.
Introduction to Graph Theory
CSE 589 Part VI. Reading Skiena, Sections 5.5 and 6.8 CLR, chapter 37.
1 Leader Election in Rings. 2 A Ring Network Sense of direction left right.
5.5.2 M inimum spanning trees  Definition 24: A minimum spanning tree in a connected weighted graph is a spanning tree that has the smallest possible.
1 The Minimum Spanning Tree Problem Distributing Prim’s and Kruskal’s Algorithm.
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.
Foundation of Computing Systems
DISTRIBUTED ALGORITHMS Spring 2014 Prof. Jennifer Welch Set 2: Basic Graph Algorithms 1.
Tree Constructions Distributed Algorithms for Multi-Agent Networks Instructor: K. Sinan YILDIRIM.
Graphs and MSTs Sections 1.4 and 9.1. Partial-Order Relations Everybody is not related to everybody. Examples? Direct road connections between locations.
MA/CSSE 473 Day 34 MST details: Kruskal's Algorithm Prim's Algorithm.
2/14/2016  A. Orda, A. Segall, 1 Queueing Networks M nodes external arrival rate (Poisson) service rate in each node (exponential) upon service completion.
Adversarial Search 2 (Game Playing)
1 Chapter 11 Global Properties (Distributed Termination)
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.
Introduction Wireless Ad-Hoc Network  Set of transceivers communicating by radio.
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.
Discrete Structures Li Tak Sing( 李德成 ) Lectures
1 Minimum Spanning Trees Gallagher-Humblet-Spira (GHS) Algorithm.
Graph Search Applications, Minimum Spanning Tree
A Distributed Algorithm for Minimum-Weight Spanning Trees
Lectures on Network Flows
CS60002: Distributed Systems
Greedy Algorithms / Minimum Spanning Tree Yin Tat Lee
Minimal Spanning Trees
MST GALLAGER HUMBLET SPIRA ALGORITHM
The Art Gallery Problem
Tree Construction (BFS, DFS, MST) Chapter 5
The Minimum Spanning Tree Problem
Minimum Spanning Tree.
Introduction Wireless Ad-Hoc Network
MST GALLAGER HUMBLET SPIRA ALGORITHM
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 presented by Hanan Shpungin

Outline Introduction The idea of Distributed MST The algorithm

Outline Introduction The idea of Distributed MST The algorithm

Introduction Problem  A graph  Every edge has a weight

Solution  A spanning tree  So that the sum is minimized Introduction

5 Solution  A spanning tree  So that the sum is minimized Introduction

Definition – MST fragment  A connected sub-tree of MST Introduction Example of possible fragments:

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. Introduction e

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. Introduction e Proof:

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. Introduction Proof: Suppose e is not in MST, but some e’ instead. e’ e

e 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. Introduction Proof: Suppose e is not in MST, but some e’ instead. e’ MST with e forms a cycle.

e 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. Introduction Proof: Suppose e is not in MST, but some e’ instead. e’ MST with e forms a cycle. We obtain a cheaper MST with e instead of e’.

MST Property 2 If all the edges of a connected graph have different weights, then the MST is unique. Introduction

MST Property 2 If all the edges of a connected graph have different weights, then the MST is unique. Introduction Proof:

MST Property 2 If all the edges of a connected graph have different weights, then the MST is unique. Introduction Suppose existence of two MSTs. Proof: TT’

MST Property 2 If all the edges of a connected graph have different weights, then the MST is unique. Introduction Suppose existence of two MSTs. Proof: TT’ Let e be the minimal-weight edge not in both MSTs (wlog e in T). e

MST Property 2 If all the edges of a connected graph have different weights, then the MST is unique. Introduction Suppose existence of two MSTs. Proof: TT’ Let e be the minimal-weight edge not in both MSTs (wlog e in T). T’ with e has a cycle e

MST Property 2 If all the edges of a connected graph have different weights, then the MST is unique. Introduction Suppose existence of two MSTs. Proof: TT’ Let e be the minimal-weight edge not in both MSTs (wlog e in T). T’ with e has a cycle e e’ At least cycle edge e’ is not in T.

MST Property 2 If all the edges of a connected graph have different weights, then the MST is unique. Introduction Suppose existence of two MSTs. Proof: TT’ Let e be the minimal-weight edge not in both MSTs (wlog e in T). T’ with e has a cycle At least cycle edge e’ is not in T. e e’ Since w(e) < w(e’) we conclude that T’ with e and without e’ is a smaller MST than T’.

Idea of MST based on properties 1 & 2  Start with fragments of one node Introduction

Idea of MST based on properties 1 & 2  Enlarge fragments in any order (property 1)  Combine fragments with a common node  (property 2) Introduction

Idea of MST based on properties 1 & 2  Enlarge fragments in any order (property 1)  Combine fragments with a common node  (property 2) Introduction

Idea of MST based on properties 1 & 2  Enlarge fragments in any order (property 1)  Combine fragments with a common node  (property 2) Introduction

Idea of MST based on properties 1 & 2  Enlarge fragments in any order (property 1)  Combine fragments with a common node  (property 2) Introduction

Idea of MST based on properties 1 & 2  Enlarge fragments in any order (property 1)  Combine fragments with a common node  (property 2) Introduction

Idea of MST based on properties 1 & 2  Enlarge fragments in any order (property 1)  Combine fragments with a common node  (property 2) Introduction

Idea of MST based on properties 1 & 2  Enlarge fragments in any order (property 1)  Combine fragments with a common node  (property 2) Introduction

Outline Introduction The idea of Distributed MST The algorithm

The idea of Distributed MST Fragments  Every node starts as a single fragment.

The idea of Distributed MST Fragments  Each fragment finds its minimum outgoing edge.

The idea of Distributed MST Fragments  Each fragment finds its minimum outgoing edge.  Then it tries to combine with the adjacent fragment.

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 F F’

The idea of Distributed MST Levels  The combination of two fragments depends on  the levels of fragments 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 L=1 L’=2 F F’ If a fragment F wishes to connect to a fragment F’ and L < L’ then: F is absorbed in F’ and the resulting fragment is at level L’.

The idea of Distributed MST Levels  The combination of two fragments depends on  the levels of fragments L=1 L’=1 F F’ If fragments F and F’ have the same minimum outgoing edge and L = L’ then:

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

The idea of Distributed MST Levels  The identity of a fragment is the weight of its If fragments F and F’ with same level were combined, the combining edge is called the core of the new segment. L’’=2 F’’  core. 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).

The Algorithm Fragment minimum outgoing edge discovery When a node awakes from the state Sleeping, it finds a minimum edge connected.  Special case of zero-level fragment (Sleeping).

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

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

The Algorithm Minimum outgoing edge discovery  Take a fragment at level L that was just combined  out of two level L-1 fragments. L=1 L’=1 F F’ L’’=2 F’’

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

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

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

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

The Algorithm Minimum outgoing edge discovery Basic - yet to be classified, can be inside fragment or outgoing edges  Edge classification/

The Algorithm Minimum outgoing edge discovery Rejected – an inside fragment edge  Edge classification

The Algorithm Minimum outgoing edge discovery Branch – an MST edge  Edge classification

The Algorithm Minimum outgoing edge discovery Sends a Test message on Basic edges (minimal first)  On receiving the Initiate message a node tries  to find a minimum outgoing edge

The Algorithm Minimum outgoing edge discovery In case of same identity:  On receiving the Test message send a Reject message, the edge is Rejected. In case Test was sent in both directions, the edge is Rejected automatically without a Reject message.

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

The Algorithm Minimum outgoing edge discovery In case of a self higher level:  On receiving the Test message Send an Accept message L=0 L=3 The edge is accepted as a candidate.

The Algorithm Minimum outgoing edge discovery Nodes send Report messages along the branches of the MST.  Agreeing on the minimal outgoing edge If no outgoing edge was found the algorithm is complete.

The Algorithm Minimum outgoing edge discovery Nodes send Report messages along the branches of the MST.  Agreeing on the minimal outgoing edge If no outgoing edge was found the algorithm is complete. After sending they go into Found mode.

The Algorithm Minimum outgoing edge discovery Every leaf sends the Report when resolved its outgoing edge.  Agreeing on the minimal outgoing edge

The Algorithm Minimum outgoing edge discovery Every leaf sends the Report when resolved its outgoing edge.  Agreeing on the minimal outgoing edge

The Algorithm Minimum outgoing edge discovery Every interior sends the Report when resolved its outgoing and all its children sent theirs.  Agreeing on the minimal outgoing edge

The Algorithm Minimum outgoing edge discovery Every interior sends the Report when resolved its outgoing and all its children sent theirs.  Agreeing on the minimal outgoing edge

The Algorithm Minimum outgoing edge discovery  Agreeing on the minimal outgoing edge. Every node remembers the branch to the minimal outgoing edge of its sub-tree, denoted best-edge. minimal outgoing best-edge

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. ?

The Algorithm Combining segments  Changing core. When decided a Change-core message is sent over branches to the minimal outgoing edge. ? new core The tree branches point to the new core.

The Algorithm ? Connect The tree branches point to the new core. When decided a Change-core message is sent over branches to the minimal outgoing edge. Finally a Connect message is sent over the minimal edge. Combining segments  Changing core

The Algorithm Final notes  Connecting same level fragments L=1 L’=1 F F’

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

The Algorithm When lower level fragment F’ at node n’ joins some fragment F at node n before n sent its Report. Final notes  Connecting lower level fragments. We can send n’ an Initiate message with the Find state so it joins the search.

The Algorithm When lower level fragment F’ at node n’ joins some fragment F at node n after n sent its Report. Final notes  Connecting lower level fragments. 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.

The Algorithm When forwarding an Initiate message to the leafs, it is also forwarded to any pending fragments at level L-1, as they might be delayed with response. Final notes  Forwarding the Initiate message at level L.

The Algorithm Level L+1 contains at least 2 fragments at level L. Final notes  Upper bound on fragment levels. Level L contains at least nodes. is an upper bound on fragment levels.

The Algorithm The Connect message is sent on the minimal outgoing edge only. Proof outline  Correct MST build-up As a result of properties 1 & 2 we should obtain an MST.

The Algorithm Assume there is a deadlock. Proof outline  No deadlocks Choose a fragment from the lowest level set and with minimal outgoing edge in that set. Its Test/Connect message surely will be replied. There will always be a working fragment.

The Algorithm Complexity  Communication At most E Reject messages (with corresponding E Test messages, because each edge can be rejected only once.

At every but the zero or last levels, each node can accept up to 1 Initiate, Accept messages. It can transmit up to 1 Test (successful), Report, ChangeRoot, Connect. Since the number of levels is bounded by number of such messages is at most. The Algorithm Complexity  Communication

At level zero, each node receives at most one Initiate and transmits at most one Connect. At the last level a node can send at most one Report message, as a result at most 3N such messages. The Algorithm Complexity  Communication

As a result, the upper bound is:. The Algorithm Complexity  Communication

We prove by induction that one needs 5lN - 3N time units for every node to reach level l. The Algorithm Complexity  Time (under assumption of initial awakening it is )

l=1  Each node is awakened and sends a Connect message. By time 2N all nodes should be at level 1. The Algorithm Complexity  Time (under assumption of initial awakening it is )

Assume l  At level l, each node can send at most N Test messages which will be answered before time 51N - N. The propagation of the Report messages, ChangeRoot, Connect, and Initiate messages can take at most 3N units, so that by time 5 ( l + 1)N - 3N all nodes are at level l + 1. The Algorithm Complexity  Time (under assumption of initial awakening it is )

At the highest level only Test, Reject, and Report messages are used. The Algorithm Complexity  Time (under assumption of initial awakening it is )

As a result we have the algorithm complete under time units. The Algorithm Complexity  Time (under assumption of initial awakening it is )