Paola Flocchini Election in Arbitrary Networks Mega-Merger Yo-Yo Some Considerations.

Slides:



Advertisements
Similar presentations
Chapter 11 Trees Graphs III (Trees, MSTs) Reading: Epp Chp 11.5, 11.6.
Advertisements

Chapter 5: Tree Constructions
Communication Networks Recitation 3 Bridges & Spanning trees.
Introduction to Computer Networks Spanning Tree 1.
Networks Prim’s Algorithm
Lecture 8: Asynchronous Network Algorithms
Token-Dased DMX Algorithms n LeLann’s token ring n Suzuki-Kasami’s broadcast n Raymond’s tree.
Joining LANs - Bridges. Connecting LANs 4 Repeater –Operates at the Physical layer no decision making, processing signal boosting only 4 Bridges –operates.
Chapter 15 Basic Asynchronous Network Algorithms
Leader Election Let G = (V,E) define the network topology. Each process i has a variable L(i) that defines the leader.  i,j  V  i,j are non-faulty.
Self Stabilizing Algorithms for Topology Management Presentation: Deniz Çokuslu.
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
1 Complexity of Network Synchronization Raeda Naamnieh.
Discussion #36 Spanning Trees
7.3 Kruskal’s Algorithm. Kruskal’s Algorithm was developed by JOSEPH KRUSKAL.
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.
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.
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.
Algorithmic Foundations COMP108 COMP108 Algorithmic Foundations Greedy methods Prudence Wong
Distributed Algorithms 2014 Igor Zarivach A Distributed Algorithm for Minimum Weight Spanning Trees By Gallager, Humblet,Spira (GHS)
Broadcast & Convergecast Downcast & Upcast
© The McGraw-Hill Companies, Inc., Chapter 3 The Greedy Method.
Chapter 9 – Graphs A graph G=(V,E) – vertices and edges
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.
Module 5 – Networks and Decision Mathematics Chapter 23 – Undirected Graphs.
Content Addressable Network CAN. The CAN is essentially a distributed Internet-scale hash table that maps file names to their location in the network.
Neighborhood-Based Topology Recognition in Sensor Networks S.P. Fekete, A. Kröller, D. Pfisterer, S. Fischer, and C. Buschmann Corby Ziesman.
Lectures on Greedy Algorithms and Dynamic Programming
Union-find Algorithm Presented by Michael Cassarino.
1 Leader Election in Rings. 2 A Ring Network Sense of direction left right.
Time, Clocks, and the Ordering of Events in a Distributed System Leslie Lamport Massachusetts Computer Associates,Inc. Presented by Xiaofeng Xiao.
Chapter 9 Finding the Optimum 9.1 Finding the Best Tree.
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.
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS Spring 2014 Prof. Jennifer Welch CSCE 668 Set 3: Leader Election in Rings 1.
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.
CIS 825 Review session. P1: Assume that processes are arranged in a ring topology. Consider the following modification of the Lamport’s mutual exclusion.
CSE 486/586 CSE 486/586 Distributed Systems Leader Election Steve Ko Computer Sciences and Engineering University at Buffalo.
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.
CSE 373: Data Structures and Algorithms Lecture 21: Graphs V 1.
1 Traversal Algorithms  sequential polling algorithm  traversing connected networks (tree construction) complexity measures tree terminology tarry’s.
Khaled M. Alzoubi, Peng-Jun Wan, Ophir Frieder
COMP108 Algorithmic Foundations Greedy methods
Redraw these graphs so that none of the line intersect except at the vertices B C D E F G H.
Leader Election Chapter 3 Observations Election in the Ring
The Model & Basic Computations
Election in the Complete Graph
CS60002: Distributed Systems
Lecture 9: Asynchronous Network Algorithms
MST GALLAGER HUMBLET SPIRA ALGORITHM
Spanning Trees.
Graphs & Graph Algorithms 2
Graphs Chapter 11 Objectives Upon completion you will be able to:
MATS Quantitative Methods Dr Huw Owens
Louisiana Travels.
CSE 486/586 Distributed Systems Leader Election
MST GALLAGER HUMBLET SPIRA ALGORITHM
Lecture 8: Synchronous Network Algorithms
Algorithms (2IL15) – Lecture 7
Routing Chapter 4 Shortest path routing Gossip
Compact routing schemes with improved stretch
Networks Prim’s Algorithm
Chapter 15.5 from “Distributed Algorithms” by Nancy A. Lynch
CSE 486/586 Distributed Systems Leader Election
Presentation transcript:

Paola Flocchini Election in Arbitrary Networks Mega-Merger Yo-Yo Some Considerations

Paola Flocchini In general networks, the election problem and the spanning tree construction problem are equivalent. Election in Arbitrary Networks (Gallager, Humblet, Spira ‘84) The Mega-Merger

Paola Flocchini Minimum spanning tree construction algorithm. The root of the spanning tree is the leader The Mega-Merger weights

Paola Flocchini Minimum spanning tree construction algorithm. The root of the spanning tree is the leader The Mega-Merger Distinct weights

Paola Flocchini Minimum spanning tree construction algorithm. The root of the spanning tree is the leader The Mega-Merger Distinct weights (3,6) (8,6) Equal weights can be made distinct

Paola Flocchini So, from now on we assume that edges have distinct weigths

Paola Flocchini node = village with a name edge = road with a distance names and distances are different The goal to merge all the villages into one mega-city

Paola Flocchini roads serviced by public transport city

Paola Flocchini 1) City is a subgraph, its spanning tree has public transportation, root is downtown downtown 2) a city has a unique name and has a level all districts eventually know the name of the city Ottawa level=i 4) Initially: each node is a city with just one district and no roads. All cities are at the same level 3) Edges are roads with a distinct name and distance bank st. 25Km.

Paola Flocchini Cities are merged into bigger cities until only ONE city is left.

Paola Flocchini Issues to consider when merging two cities: How to name the new city will depend on several factors which roads of a city will be serviced by public transports [the roads serviced in the two cities plus a connecting road]

Paola Flocchini 6)The decision to request a merge must come from downtown. There cannot be more than one request at a time 5) A city must merge with the closest neighboring city. To request a merge, it send a let-us-merge message on the shortest road connecting the cities

Paola Flocchini 7) When the merge occurs, the roads of the new city serviced by buses will be the road of the two cities + the connecting road. The new downtown will depends on several factors.

Paola Flocchini A: city D(A): downtown level(A): level of city A e(A) = (a,b): merge link with closest city (let it be B) A B When the request arrives: - the two cities have the same level - the two cities have different levels b a

Paola Flocchini 8) If level(A) = level(B) AND the link chosen by A is the same as the one chosen by B (e(A)=e(B)), then: friendly merger A B newname increase level by one 9) If level(A) < level(B) A is absorbed in B A B B level(B) Let A send the let-us-merge message to B

Paola Flocchini 10) If level(A) = level(B) BUT e(A)  e( B), then: In the other cases the decision is postponed the merge is suspended until B arrives at a level GREATER than A 11) If level(A) > level(B) then: the merge is suspended until B arrives at the same level as A A B A B

Paola Flocchini A B a b dAdA dBdB Absorption (rule 9) b notifies a about the absorption (putting B’s name in the message) a broadcast the info in A flip all logical link direction to point to the new downtown level(A) < level(B) A will be absorbed by B

Paola Flocchini B dBdB Absorption (rule 9) b notifies a about the absorption (putting B’s name in the message) a broadcast the info in A flip all logical link direction to point to the new downtown level(A) < level(B) A will be absorbed by B

Paola Flocchini A B a b dAdA dBdB Friendly Merger (rule 8) new downtown, new name, new level downtown = min{a,b} newlevel = oldlevel + 1 new name = name of the road connecting a and b level(A) = level(B) e(a)= e(B)

Paola Flocchini C dCdC Friendly Merger (rule 8) new downtown, new name, new level downtown = min{a,b} newlevel = oldlevel + 1 new name = name of the road connecting a and b level(A) = level(B) e(a)= e(B) let a < b a and b compute the new info independently and broadcast the appropriate links are flipped

Paola Flocchini Suspension (rules 10,11) b locally keeps the necessary info for later NOTICE: nobody in A knows about the suspension no other request can be launched from A A B a b dAdA dBdB level(A) = level(B) BUT e(A)  e( B) or level(A) > level(B)

Paola Flocchini Choosing the merging link d A needs to find the min length among all edges exiting the city 5.1) each district a i of A determines d i of the shortest road going to another city (if none, d i =  ) 5.2) d A finds the smallest (min in a rooted tree) aiai

Paola Flocchini aiai Outside ? How to compute the shortest road going to another city... one at a time

Paola Flocchini Outside ? aiai c if name(A) = name(C) reply (internal) if name(A)  name(C) the road is not necessarily external (maybe C has been absorbed by A and c does not know : in such a case level(C) < level(A)) If name(A)  name(C) and level(C)  level(A) then reply(external) If name(A)  name(C) and level(C) < level(A) then don’t reply so:

Paola Flocchini More DetailsDiscovering a friendly merger To decide, b needs to know e(A) and e(B) level(A) = level(B) and e(A) = e( B) How does b know e(B) ? e(B) is chosen by D(B), which will send the request through b When receiving the request, b will know If e(A) =e(B), b will eventually know If e(A)  e(B), b is not the exit point, it will never know what e(B) is. So,

Paola Flocchini More DetailsDiscovering a friendly merger level(A) = level(B) and e(A) = e( B) Receiving a let-us-merge: If b has already received a let-us-merge from D(B) to be sent to a both b and a will know that this is a friendly merger Otherwise b waits eventually, either it will know that it is a friendly merger or its level will be increased (because of requests from B to other cities) and level(B) will become greater than level(A). [absorption] [Note: A is waiting,its level cannot increase]

Paola Flocchini 1) c send Outside? to d (level(D)< level(C) 2) receiving let-us-merge on e(C)=(c,d), d knows that level(D) < level(C) 3) receiving let-us-merge on e(C)=(c,d), d knows that level(C)=level(D) but it is not friendly 4) receiving let-us-merge on e(C)=(c,d), d knows that level(C)=level(D) but does not know if it is friendly More DetailsDeadlocks waiting cases: ? Outside ?

Paola Flocchini Correctness If a city of level l will not be suspended, its level will increase (unless it is the mega-city) Let city C at level l be suspended by a district d in D. If the level of D becomes greater than l, C will no longer be suspended No city in C will be suspended by a city of higher level Protocol Mega-merger is deadlock-free

Paola Flocchini IMPOSSIBLE

Paola Flocchini Termination If A is the mega-city, there are no other cities. All the unused links are internal The minimum finding will return a special value (  ) D(A) understands and broadcasts termination

Paola Flocchini Complexity Number of messages per level: CITY A Computation of merge links: 2 (n(A)-1) Forwarding of let-us-merge from D(A) to e(A): n(A) Broadcast info about new city: n(A)-1 For each friendly merger from level i-1 to level i TOT: 4 n(A) - 3 A B a b dAdA dBdB

Paola Flocchini Complexity Number of messages per level : CITY C Computation of merge links: 2 (n(C)-1) Forwarding of let-us-merge from D(C) to e(C): n(C) Broadcast info about new city: n(C) C absorbed at level i TOT: 4 n(C)-2 C B c b dCdC dBdB

Paola Flocchini Complexity Number of messages per level  (4n(A)-3) +  4n(C)-2 = 4  n(B) - somethingsmall A  Merge(i) C  Absorb(i) B  City(i)  n(B)  n B  City(i) disjoint cities, so: City(i) = Merge(i)  Absorb(i)  4n

Paola Flocchini Outside? with answer external  n Total Cost(i)  5n aiai Outside ? one at a time until found the smallest Complexity

Paola Flocchini Complexity Useless messagesOutside? with answer internal A pair for each road that is not in the city 2(m - (n-1)) Broadcasting Termination:n-1 aiai Outside ?

Paola Flocchini Complexity How many levels ? The level is incremented only if the merger is between two cities with the same level Level 2 there are at least 2 nodes (maybe MORE)

Paola Flocchini At least 4 At least 2

Paola Flocchini  2(m - (n-1)) + n-1 +5n log n Total: Nodes at level i  2 i i  log n  2m + 5 n log n + n+1 Complexity In general, at Level i there are at least 2 i nodes (maybe MORE) n  2 i useless notification merges