3.Graph_algs_2

3.Graph_algs_2 - UBI529 3. Distributed Graph Algorithms 2.4...

This preview shows pages 1–8. Sign up to view the full content.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: UBI529 3. Distributed Graph Algorithms 2.4 Distributed Path Traversals Distributed BFS Algorithms Distributed DFS Algorithms 3 Bellman-Ford BFS Tree Algorithm : Use a variant of the flooding algorithm. Each node and each message store an integer which corresponds to the distance from the root. The root stores 0, every other node initially . The root starts the flooding algorithm by sending a message 1 to all neighbors. A node u with integer x receives a message y from a neighbor v: if y < x then node u stores y (instead of x) and sends y+1 to all neighbors (except v). 4 Distributed Bellman-Ford BFS Algorithm 1. Initially, the root sets L(r0) = 0 and all other vertices set L(v) = 1. 2. The root sends out the message Layer(0) to all its neighbors. 3. A vertex v, which gets a Layer(d) message from a neighbor w does: If d + 1 < L(v) then parent(v) = w; L(v) = d + 1; Send Layer(d + 1) to all neighbors except w . Time complexity: O(D). Message Complexity: O(n|E|). 5 Analysis Analysis of Algorithm : The time complexity of Algorithm 3.10 is O(D), the message complexity is O(n|E|), where D is the diameter of the graph. Proof : We can prove the time complexity by induction. We claim that a node at distance d from the root has received a message d by time d. The root knows by time 0 that it is the root. A node v at distance d has a neighbor u at distance d-1. Node u by induction sends a message d to v at time d-1 or before, which is then received by v at time d or before. Message complexity : A node can reduce its integer at most n-1 times; each of these times it sends a message to all it neighbors. If all nodes do this we have O(n|E|) messages. 6 Remarks There are graphs and executions that produce O(n|E|) messages. How does the algorithm terminate? Algorithm 3.8 has the better message complexity; algorithm 3.10 has the better time complexity. The currently best known algorithm has message complexity O(|E|+n log3 n) and time complexity O(D log3 n). How do we find the root?!? Leader election in an arbitrary graph: FloodMax algorithm. Termination? Idea: Each node that believes to be the max builds a spanning tree (More for example in Chapter 15 of Nancy Lynch Distributed Algorithms) 7 Distributed DFS Distributed DFS algorithm: There is a single message called the token 1. Start exploration (visit) at root r....
View Full Document

This note was uploaded on 01/13/2012 for the course CEN 303 taught by Professor Kayhaner during the Spring '11 term at Izmir Institute of Technology.

Page1 / 82

3.Graph_algs_2 - UBI529 3. Distributed Graph Algorithms 2.4...

This preview shows document pages 1 - 8. Sign up to view the full document.

View Full Document
Ask a homework question - tutors are online