CPSC 668Set 2: Basic Graph Algorithms1 CPSC 668 Distributed Algorithms and Systems Spring 2008 Prof. Jennifer Welch.

Slides:



Advertisements
Similar presentations
Chapter 5: Tree Constructions
Advertisements

Chapter 13 Leader Election. Breaking the symmetry in system Similar to distributed mutual exclusion problems, the first process to enter the CS can be.
Distributed Constraint Optimization Problems M OHSEN A FSHARCHI.
Lecture 8: Asynchronous Network Algorithms
PROTOCOL VERIFICATION & PROTOCOL VALIDATION. Protocol Verification Communication Protocols should be checked for correctness, robustness and performance,
Token-Dased DMX Algorithms n LeLann’s token ring n Suzuki-Kasami’s broadcast n Raymond’s tree.
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
Minimum Spanning Trees
Minimum Spanning Trees
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS Fall 2011 Prof. Jennifer Welch CSCE 668 Self Stabilization 1.
CS4231 Parallel and Distributed Algorithms AY 2006/2007 Semester 2 Lecture 7 Instructor: Haifeng YU.
Locality Sensitive Distributed Computing Exercise Set 2 David Peleg Weizmann Institute.
Termination Detection. Goal Study the development of a protocol for termination detection with the help of invariants.
CPSC 668Set 14: Simulations1 CPSC 668 Distributed Algorithms and Systems Spring 2008 Prof. Jennifer Welch.
CPSC 668Set 10: Consensus with Byzantine Failures1 CPSC 668 Distributed Algorithms and Systems Fall 2009 Prof. Jennifer Welch.
Università degli Studi dell’Aquila Academic Year 2009/2010 Course: Algorithms for Distributed Systems Instructor: Prof. Guido Proietti Time: Monday:
CPSC 689: Discrete Algorithms for Mobile and Wireless Systems Spring 2009 Prof. Jennifer Welch.
CPSC 311, Fall CPSC 311 Analysis of Algorithms Graph Algorithms Prof. Jennifer Welch Fall 2009.
1 Complexity of Network Synchronization Raeda Naamnieh.
CPSC 689: Discrete Algorithms for Mobile and Wireless Systems Spring 2009 Prof. Jennifer Welch.
CPSC 689: Discrete Algorithms for Mobile and Wireless Systems Spring 2009 Prof. Jennifer Welch.
CPSC 689: Discrete Algorithms for Mobile and Wireless Systems Spring 2009 Prof. Jennifer Welch.
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.
Chapter 4 - Self-Stabilizing Algorithms for Model Conservation4-1 Chapter 4: roadmap 4.1 Token Passing: Converting a Central Daemon to read/write 4.2 Data-Link.
CPSC 411 Design and Analysis of Algorithms Set 8: Graph Algorithms Prof. Jennifer Welch Spring 2011 CPSC 411, Spring 2011: Set 8 1.
CPSC 668Set 10: Consensus with Byzantine Failures1 CPSC 668 Distributed Algorithms and Systems Fall 2006 Prof. Jennifer Welch.
CPSC 668Self Stabilization1 CPSC 668 Distributed Algorithms and Systems Spring 2008 Prof. Jennifer Welch.
DAST 2005 Tirgul 11 (and more) sample questions. DAST 2005 Q.Let G = (V,E) be an undirected, connected graph with an edge weight function w : E→R. Let.
CPSC 689: Discrete Algorithms for Mobile and Wireless Systems Spring 2009 Prof. Jennifer Welch.
CSE 373: Data Structures and Algorithms Lecture 18: Graphs II 1.
CPSC 668Set 15: Broadcast1 CPSC 668 Distributed Algorithms and Systems Fall 2006 Prof. Jennifer Welch.
1 Brief Announcement: Distributed Broadcasting and Mapping Protocols in Directed Anonymous Networks Michael Langberg: Open University of Israel Moshe Schwartz:
Leader Election in Rings
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.
Message Passing Systems A Formal Model. The System Topology – network (connected undirected graph) Processors (nodes) Communication channels (edges) Algorithm.
Chapter 14 Synchronizers. Synchronizers : Introduction Simulate a synchronous network over an asynchronous underlying network Possible in the absence.
Message Passing Systems A Formal Model. The System Topology – network (connected undirected graph) Processors (nodes) Communication channels (edges) Algorithm.
Complexity of Bellman-Ford Theorem. The message complexity of Bellman-Ford algorithm is exponential. Proof outline. Consider a topology with an even number.
Distributed Algorithms 2014 Igor Zarivach A Distributed Algorithm for Minimum Weight Spanning Trees By Gallager, Humblet,Spira (GHS)
Broadcast & Convergecast Downcast & Upcast
Computer Science and Engineering Parallel and Distributed Processing CSE 8380 February 10, 2005 Session 9.
SEMINAR OPEN PROBLEMS IN DISTRIBUTED COMPUTING Winter Hagit Attiya & Faith Ellen Introduction1.
1 Broadcast. 2 3 Use a spanning tree Root 4 synchronous It takes the same time at link to send a message It takes the same time at each node to process.
ADA: 9. Graph Search1 Objective o describe and compare depth-first and breadth- first graph searching, and look at the creation of spanning trees.
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.
Properties and Applications of Depth-First Search Trees and Forests
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS Spring 2014 Prof. Jennifer Welch CSCE 668 Set 3: Leader Election in Rings 1.
Hello Everyone!!! 1. Tree And Graphs 2 Features of Trees  Tree Nodes Each node have 0 or more children A node have must one parent  Binary tree Tree.
1 Chapter 11 Global Properties (Distributed Termination)
CIS 825 Review session. P1: Assume that processes are arranged in a ring topology. Consider the following modification of the Lamport’s mutual exclusion.
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.
CSC317 1 At the same time: Breadth-first search tree: If node v is discovered after u then edge uv is added to the tree. We say that u is a predecessor.
1 Traversal Algorithms  sequential polling algorithm  traversing connected networks (tree construction) complexity measures tree terminology tarry’s.
1 Minimum Spanning Trees Gallagher-Humblet-Spira (GHS) Algorithm.
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 ::
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.
Election algorithm Who wins? God knows.
Lecture 9: Asynchronous Network Algorithms
MST GALLAGER HUMBLET SPIRA ALGORITHM
The Minimum Spanning Tree Problem
MST GALLAGER HUMBLET SPIRA ALGORITHM
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS
Chapter 15.5 from “Distributed Algorithms” by Nancy A. Lynch
Synchronizers Outline motivation principles and definitions
Presentation transcript:

CPSC 668Set 2: Basic Graph Algorithms1 CPSC 668 Distributed Algorithms and Systems Spring 2008 Prof. Jennifer Welch

CPSC 668Set 2: Basic Graph Algorithms2 Broadcast Over a Rooted Spanning Tree Suppose processors already have information about a rooted spanning tree of the communication topology –tree: connected graph with no cycles –spanning tree: contains all processors –rooted: there is a unique root node Implemented via parent and children local variables at each processor –indicate which incident channels lead to parent and children in the rooted spanning tree

CPSC 668Set 2: Basic Graph Algorithms3 Broadcast Over a Rooted S.T. root initially sends M to its children when a processor receives M from its parent –sends M to its children –terminates (sets a local boolean to true) Exercise to transform this pseudocode into a state machine style description

CPSC 668Set 2: Basic Graph Algorithms4 Complexity Analysis Synchronous model: –time is depth of the spanning tree, which is at most n - 1 –number of messages is n - 1, since one message is sent over each spanning tree edge Asynchronous model: –same time and messages

CPSC 668Set 2: Basic Graph Algorithms5 Convergecast Again, suppose a rooted spanning tree has already been computed by the processors –parent and children variables at each processor Do the opposite of broadcast: –leaves send messages to their parents –non-leaves wait to get message from each child, then send combined info to parent

CPSC 668Set 2: Basic Graph Algorithms6 Convergecast gh a bc def gh de,g f,h c,f,hb,d solid arrows: parent-child relationships dotted lines: non-tree edges

CPSC 668Set 2: Basic Graph Algorithms7 Finding a Spanning Tree Given a Root Having a spanning tree is very convenient. How do you get one? Suppose a distinguished processor is known, to serve as the root. Modify the flooding algorithm…

CPSC 668Set 2: Basic Graph Algorithms8 Finding a Spanning Tree Given a Root root sends M to all its neighbors when non-root first gets M – set the sender as its parent –send "parent" msg to sender –send M to all other neighbors (if no other neighbors, then terminate) when get M otherwise –send "reject" msg to sender use "parent" and "reject" msgs to set children variables and know when to terminate (after hearing from all neighbors)

CPSC 668Set 2: Basic Graph Algorithms9 Execution of Spanning Tree Alg. gh a bc def Synchronous: always gives breadth-first search (BFS) tree gh a bc def Asynchronous: not necessarily BFS tree Both models: O(m) messages O(diam) time

CPSC 668Set 2: Basic Graph Algorithms10 Execution of Spanning Tree Alg. gh a bc def An asynchronous execution gave this depth-first search (DFS) tree. Is DFS property guaranteed? No! gh a bc def Another asynchronous execution results in this tree: neither BFS nor DFS

CPSC 668Set 2: Basic Graph Algorithms11 Finding a DFS Spanning Tree Given a Root when root first takes step or non-root first receives M: –mark sender as parent (if not root) –for each neighbor in series send M to it wait to get "parent" or "reject" msg in reply –send "parent" msg to parent neighbor when processor receives M otherwise –send "reject" to sender –use "parent" and "reject" msgs to set children variables and know when to terminate

CPSC 668Set 2: Basic Graph Algorithms12 Finding a DFS Spanning Tree Given a Root Previous algorithm ensures that the spanning tree is always a DFS tree. Analogous to sequential DFS algorithm. Message complexity: O(m) since a constant number of messages are sent over each edge Time complexity: O(m) since each edge is explored in series.

CPSC 668Set 2: Basic Graph Algorithms13 Finding a Spanning Tree Without a Root Assume the processors have unique identifiers (otherwise impossible!) Idea: –each processor starts running a copy of the DFS spanning tree algorithm, with itself as root –tag each message with initiator's id to differentiate –when copies "collide", copy with larger id wins. Message complexity: O(nm) Time complexity: O(m)