Breadth-First Search and Shortest Path Kevin Schaffer Chapter 15.4 from “Distributed Algorithms” by Nancy A. Lynch.

Slides:



Advertisements
Similar presentations
Chapter 5: Tree Constructions
Advertisements

Review: Search problem formulation
O(N 1.5 ) divide-and-conquer technique for Minimum Spanning Tree problem Step 1: Divide the graph into  N sub-graph by clustering. Step 2: Solve each.
Lecture 8: Asynchronous Network Algorithms
Chapter 15 Basic Asynchronous Network Algorithms
6.852: Distributed Algorithms Spring, 2008 Class 12.
Quiz 4-26-’07 Search.
Self Stabilizing Algorithms for Topology Management Presentation: Deniz Çokuslu.
Lecture 7: Synchronous Network Algorithms
Solving Problems by Searching Currently at Chapter 3 in the book Will finish today/Monday, Chapter 4 next.
Breadth-First Search Seminar – Networking Algorithms CS and EE Dept. Lulea University of Technology 27 Jan Mohammad Reza Akhavan.
CMSC 471 Spring 2014 Class #4 Thu 2/6/14 Uninformed Search Professor Marie desJardins,
Breadth-First and Depth-First Search
1 Review of some graph algorithms Graph G(V,E) (Chapter 22) –Directed, undirected –Representation Adjacency-list, adjacency-matrix Breadth-first search.
Chapter 8, Part I Graph Algorithms.
Midwestern State University Department of Computer Science Dr. Ranette Halverson CMPS 2433 CHAPTER 4 - PART 2 GRAPHS 1.
CSCI 3160 Design and Analysis of Algorithms Tutorial 2 Chengyu Lin.
1 Complexity of Network Synchronization Raeda Naamnieh.
Review: Search problem formulation
CPSC 668Set 2: Basic Graph Algorithms1 CPSC 668 Distributed Algorithms and Systems Spring 2008 Prof. Jennifer Welch.
CSC 2300 Data Structures & Algorithms April 17, 2007 Chapter 9. Graph Algorithms.
Distributed Algorithms Broadcast and spanning tree.
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.
17-Jun-15 Searching in BeeperHunt (Mostly minor variations on old slides)
Using Search in Problem Solving
Data Structures, Spring 2004 © L. Joskowicz 1 Data Structures – LECTURE 15 Shortest paths algorithms Properties of shortest paths Bellman-Ford algorithm.
Blind Search-Part 2 Ref: Chapter 2. Search Trees The search for a solution can be described by a tree - each node represents one state. The path from.
Chapter 11 Detecting Termination and Deadlocks. Motivation – Diffusing computation Started by a special process, the environment environment sends messages.
Tirgul 7 Review of graphs Graph algorithms: – BFS (next tirgul) – DFS – Properties of DFS – Topological sort.
Solving problems by searching
1 Structures and Strategies for State Space Search 3 3.0Introduction 3.1Graph Theory 3.2Strategies for State Space Search 3.3Using the State Space to Represent.
Search  Exhaustive/Blind Search Methods Depth First Search Breadth First Search  Heuristic Methods Hill Climbing Beam Search Best First Search…
Chapter 14 Synchronizers. Synchronizers : Introduction Simulate a synchronous network over an asynchronous underlying network Possible in the absence.
Problem Solving and Search Andrea Danyluk September 11, 2013.
Complexity of Bellman-Ford Theorem. The message complexity of Bellman-Ford algorithm is exponential. Proof outline. Consider a topology with an even number.
Broadcast & Convergecast Downcast & Upcast
Chapter 4 Shortest Path Label-Setting Algorithms Introduction & Assumptions Applications Dijkstra’s Algorithm.
© The McGraw-Hill Companies, Inc., Chapter 3 The Greedy Method.
Search.
Chapter 2 Graph Algorithms.
Rate-based Data Propagation in Sensor Networks Gurdip Singh and Sandeep Pujar Computing and Information Sciences Sanjoy Das Electrical and Computer Engineering.
CS4231 Parallel and Distributed Algorithms AY 2006/2007 Semester 2 Lecture 10 Instructor: Haifeng YU.
1 Section 1.4 Graphs and Trees A graph is set of objects called vertices or nodes where some pairs of objects may be connected by edges. (A directed graph.
TCP Traffic and Congestion Control in ATM Networks
Graphs Data Structures and Algorithms A. G. Malamos Reference Algorithms, 2006, S. Dasgupta, C. H. Papadimitriou, and U. V. Vazirani Introduction to Algorithms,Third.
Diffusing Computation. Using Spanning Tree Construction for Solving Leader Election Root is the leader In the presence of faults, –There may be multiple.
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.
For Monday Read chapter 4, section 1 No homework..
Network Layer4-1 Distance Vector: link cost changes Link cost changes: r node detects local link cost change r updates distance table (line 15) r if cost.
Lecture 3: Uninformed Search
Lecture 11 Algorithm Analysis Arne Kutzner Hanyang University / Seoul Korea.
Advanced Artificial Intelligence Lecture 2: Search.
For Friday Read chapter 4, sections 1 and 2 Homework –Chapter 3, exercise 7 –May be done in groups.
Data Structures & Algorithms Shortest Paths Richard Newman based on book by R. Sedgewick and slides by S. Sahni.
Introduction to Graphs And Breadth First Search. Graphs: what are they? Representations of pairwise relationships Collections of objects under some specified.
Discrete Mathematics Chapter 5 Trees.
Assignments and matchings Chapter 12 Presented by Yorai Geffen.
Network Flows Chun-Ta, Yu Graduate Institute Information Management Dept. National Taiwan University.
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.
EMIS 8374 The Ford-Fulkerson Algorithm (aka the labeling algorithm) Updated 4 March 2008.
Graph Searching CSIT 402 Data Structures II. 2 Graph Searching Methodology Depth-First Search (DFS) Depth-First Search (DFS) ›Searches down one path as.
Construction of Optimal Data Aggregation Trees for Wireless Sensor Networks Deying Li, Jiannong Cao, Ming Liu, and Yuan Zheng Computer Communications and.
Brian Williams, Fall 041 Analysis of Uninformed Search Methods Brian C. Williams Sep 21 st, 2004 Slides adapted from: Tomas Lozano Perez,
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.
Lecture 9: Asynchronous Network Algorithms
Tree Construction (BFS, DFS, MST) Chapter 5
Lecture 8: Synchronous Network Algorithms
CSCE 668 DISTRIBUTED ALGORITHMS AND SYSTEMS
Chapter 15.5 from “Distributed Algorithms” by Nancy A. Lynch
Presentation transcript:

Breadth-First Search and Shortest Path Kevin Schaffer Chapter 15.4 from “Distributed Algorithms” by Nancy A. Lynch

Outline Breadth-First Search  AsynchBFS  LayeredBFS  HybridBFS Shortest Path  AsynchBellmanFord

AsynchBFS Similar to AsynchSpanningTree AsynchSpanningTree algorithm does not always generate a breadth-first spanning tree AsynchBFS detects incorrect parent assignments and corrects them

Safety and Liveness Safety  For every process i  i 0, dist i is the length of some path p from i 0 to i in G in which the predecessor of i is parent i.  For every message m in channel C i,j, m is the length of some path p from i 0 to i. Liveness  For every pair of neighbors i and j, either dist j  dist i + 1, or else either send(j) i or C i,j contains the value dist i.

Complexity of AsynchBFS Message complexity: O(n|E|)  A node can receive at most n estimates, each of which generates |E| messages Time complexity: O(diam  n(l + d))  Length of the shortest path from i 0 to any node is diam and at most n messages are ever in any channel

Termination in AsynchBFS Problem with AsynchBFS: Processes do not know when to terminate Solution: Modify algorithm to perform a convergecast/broadcast at the end Not as straight-forward as AsynchBcastAck since processes may participate multiple times

LayeredBFS Constructs the BFS tree in phases Each phase adds one layer to the tree; layer k contains the nodes at depth k in the tree Upon completion of phase k, all processes with depth at most k know their parent and those at depth at most k – 1 know their children Acknowledgements let i 0 know when each phase is complete

Complexity of LayeredBFS Message complexity: O(|E| + n  diam)  At most |E| search and acknowledgements  At most diam + 1 phases  At most n newphase/convergecast messages Time complexity: O(diam 2 (l + d))  Each phase takes diam(l + d)

HybridBFS HybridBFS performs an AsynchBFS multiple times, completing m layers during each phase If m = 1 then HybridBFS is similar to LayeredBFS and if m = diam then HybridBFS is similar to AsynchBFS

AsynchBellmanFord Generates a shortest path tree rooted at i 0 Similar to AsynchBFS but sends weighted distances Same problem with termination as AsynchBFS

Complexity of ABF Worst-case is exponential Message complexity: O(n n |E|)  Maximum number of distinct simple paths Time complexity: O(n n + 1 (l + d))