broadcast & convergecast downcast & upcast distributed algorithms for multi-agent networks...

17
Broadcast & Convergecast Downcast & Upcast Distributed Algorithms for Multi- Agent Networks Instructor: K. Sinan YILDIRIM

Upload: abner-armstrong

Post on 27-Dec-2015

252 views

Category:

Documents


4 download

TRANSCRIPT

Broadcast & ConvergecastDowncast & Upcast

Distributed Algorithms for Multi-Agent Networks

Instructor: K. Sinan YILDIRIM

• A broadcast operation is initiated by a single processor, the source. – The source wants to send a message to all other nodes in the system.

Broadcast from a Single Source

For any broadcast algorithmThe message complexity of broadcast is at least n – 1.The source's radius is a lower bound for the time complexity.

PROOF: Every node must receive the message.

Tree Broadcast• The message is transmitted from the root to all its children

– each internal vertex of the tree getting the message from its parent forwards it to all its children.

– any broadcast algorithm can also be used to build a tree in the network.

The message complexity: lower bounded by n - 1 The time complexity: lower bounded by the depth of the tree

Flooding Algorithm

The message complexity: lower bounded by the number of edgesThe time complexity: lower bounded by the radius of r.

PROOF: If you do not try every edge, you might miss a whole part of the graph behind it.

Spanning Tree• Flooding Algorithm implicitly constructs a directed tree T

rooted at source r – spanning all vertices of the network

• the parent of each non-root vertex is the vertex from which it has received the message for the first time.

synchronous setting - BFS Tree asynchronous setting

Convergecasts• The process of collecting information upwards on a tree is called

convergecast– Enables the source to detect the fact that the broadcast operation has

completed.• termination detection “This subtree has finished the task.”• collecting back acknowledgements in a leveled fashion on a spanning tree.

The message complexity: is the number of edgesThe time complexity: is the depth of the spanning tree

Flooding/Echo Algorithm• It is possible to get a broadcast algorithm with

acknowledgements– the source can detect the termination of the broadcast

• Flooding algorithm– constructs a spanning tree T – this tree can be used for the convergecast– a vertex sends Ack to its parent only after the subtree of T rooted at v

has been constructed and all its vertices have received the message.

The message complexity of broadcast is at least n - 1 The source's radius is a lower bound for the time complexity.

PROOF: - Every node sends one message to each of its neighbors and one to its parent. - The flooding algorithm requires at least a time complexity of the radius of the source to reach all nodes. The Echo phase requires the same amount of time.

Flooding/Echo Algorithm State Machine

INIT COLLECTCHILD

COLLECTECHO

TERMINATE

Rule of Thumb

• In general, – considering the line topology• Gives a lower bound for the message complexity• An upper bound for the time complexity

– considering fully-connected network• Gives an upper bound for the message complexity• A lower bound for the time complexity

Global Function Computation• Suppose that each vertex in the graph holds an input• We would like to compute some global function of these

inputs.– Semigroup function • f is well-defined for any subset of the inputs• f is associative and commutative

• A semigroup function can be computed efficiently on a tree T by a convergecast process. – the value sent upwards by each vertex in the tree will be the value of

the function on the inputs of the vertices in its subtree T

Converge Algorithm

4

14 3

4

5 42

12

2 1

FT T

F

F

T F

F T

• Root has m distinct items – each destined to one specific vertex in the tree.

Downcast

The time complexity of downcast is at least Depth(T) and at most n + Depth(T)

PROOF: (1) If the last message’s destination is the node that is the furthest (2) or the closest

• Data items are initially stored at some of the vertices of the tree T. – The goal is to end up with all the items stored at the root of the tree.

Upcast

The time complexity of upcast is at most Depth(T)

PROOF: Consider line topology.

Applications - I• Smallest k-of-m

– collect the smallest k elements at the root. – The global function computation scheme

• First, find the minimum element and inform all the vertices by broadcasting it throughout the tree.

• Now, find the next smallest element by the same method and so on. • This should take O(kDepth(T)) time.

– An alternative and faster • Every vertex keeps the elements it knows of in an ordered list. • In each step, each vertex sends to its parent the smallest element that

hasn't been sent yet.• Upcasting the k smallest elements on a tree T can be performed in

Depth(T) + k time.

Applications - II

• Information gathering and dissemination– Disseminating information among the vertices of a tree. – Suppose that m data items are initially stored at some of the

vertices – The goal is to end up with each vertex knowing all the items• collect the items at the root of the tree • then broadcast them one by one.

– the broadcast phase can be completed within O(m + Depth(T))– collecting phase can be performed by an upcast operation with a similar

complexity.

• The entire problem can be solved in time O(m + Depth(T)).

Applications - III• Route-disjoint matching

– Our goal is to find a matching of these vertices into pairs such that the routes connecting them are all edge-disjoint. • "Finding" the matching means that each vertex in W should know the

identifier of the vertex with which it is paired

Applications - IV• The token distribution problem– n tokens are initially distributed among the n vertices of

the tree • with no more than K at each processor.

– redistribute the tokens • so that each processor will have exactly one token.

• The cost of the entire redistribution process – equals the sum of the distances traversed by the tokens in

their way to their destinations.