1 / 8

Graph Algorithms

Learn about the importance of graph algorithms in distributed systems, including topology, routing, efficient broadcasting, and maxflow. Explore classical algorithms like Bellman-Ford and Dijkstra's algorithm, and understand the difference between ordinary and distributed graph algorithms.

tconrad
Download Presentation

Graph Algorithms

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Graph Algorithms Why should we learn about graph algorithms in distributed systems? • Topology is a graph. • Routing table computation uses the shortest path algorithm • Efficient broadcasting uses a spanning tree • Maxflow algorithm determines the maximum flow between a pair of nodes.

  2. Routing • Shortest path • Link state routing • Distance vector routing • Routing in mobile ad-hoc networks • Routing in sensor networks

  3. Routing: Shortest Path Classical algorithms Bellman-Ford Dijkstra’s algorithm What is the difference between an (ordinary) graph algorithm and a distributed graph algorithm

  4. Directed graph G=(V,E) Each edge e has a weight w(e) e  E, w(e) > 0 i  V, compute the distance of i from a designated node called the root. Model 0 w(0,j),0 j w(0,j)+w(j,k),j k

  5. Most are adaptation of the classic Bellman-Ford algorithm. Let D(j) = shortest distance of j from initiator 0 Routing: Shortest Path 0 w(0,j),0 j w(0,j)+w(j,k),j k

  6. {Chandy & Misra’s algorithm: for process i > 0} {for process i > 0: this includes termination detection} do message = (S ,k)  S < D  if deficit > 0  parent ≠ i  send ack to parent fi; parent := k; D := S; send (D + w(i,j)), i to each successor; deficit := deficit + number successors  message (S,k)  S ≥ D send ack to sender ack  deficit := deficit – 1 deficit = 0  parent  i  send ack to parent od Shortest path It also detects termination

  7. Shortest path The real issue is: how well do such algorithms perform when the topology changes? Let us examine distance vector routing that is adaptation of the shortest path algorithm

  8. Distance Vector D for each node i contains N elements, and D[i,j] defines its distance from node i to node j. Each node j periodically broadcasts its distance vector to its immediate neighbors. Every neighbor i of j, after receiving the broadcasts from its neighbors, updates its distance vector as follows:  k≠ i: D[i,k] = mink(w[i,j] + D[j,k] ) Distance Vector Routing Observe what can happen when the link fails

More Related