270 likes | 829 Views
Distributed Asynchronous Bellman-Ford Algorithm. Topics. Shortest-Path Algorithms: Bellman-Ford Dijkstra Floyd-Warshall Distributed Asynchronous Bellman-Ford Algorithm. Shortest-Path Routing.
E N D
Topics • Shortest-Path Algorithms: • Bellman-Ford • Dijkstra • Floyd-Warshall • Distributed Asynchronous Bellman-Ford Algorithm
Shortest-Path Routing • Shortest path routing: packets are delivered from source to destination along the shortest path from S to D • Shortest path from every node i to destination 1 can be found using the Bellman-Ford algorithm • Shortest paths are recomputed periodically, as link lengths might change over time due to: • varying traffic conditions • link failures and repairs • Shortest-path algorithm can be implemented as: • Centralized: all computations are performed by a single network entity and the shortest-path updates are communicated to all nodes • Decentralized or Distributed: each node performs part of the computation task in order to determine its own distance from node 1 and its corresponding outgoing link
Computation of Shortest Paths • Assumptions: • All cycles have positive length • Strongly connected network: if (i, j) is a link, then (j, i) is also a link • Problem: find the shortest distance Di from each node i to destination 1 • These shortest distances are the unique solution of Bellman’s equationwhere N(i) is the set of neighbors of i – nodes j for which link (i, j) exists • Bellman-Ford algorithm: • We established convergence to the correct shortest distances for initial conditions:
Distributed Computation of Shortest Paths • Bellman-Ford iteration can be executed at node i in parallel with every other node • Distributed computation of shortest paths. Node i • Knows the length dij of each outgoing link (i, j) • Receives the estimates Djh from each neighbor jN(i) • Updates its shortest distance estimate according to the Bellman-Ford Iteration • Communicates the new estimate Dih+1 to all nodes k, for which iN(k) • Each node computes its own shortest distance based only on local information: • lengths of its outgoing links • shortest distance estimates for each of its neighbors
Distributed vs. Centralized Network Algorithms • Reduced computational complexity • Local vs. global information • Scalability as the “size” of the network increases: addition of a node does not increase the computational load for the other nodes • Survivability: if a node fails and no longer performs the algorithm, the computation is curried by the remaining nodes and the network remains operational • Convergence: does the distributed algorithm converge to the correct solution? How fast? • Efficiency: distributed versions of “optimal” network algorithms – flow control, routing – lead in suboptimal solutions
Distributed Algorithms: Synchronous vs. Asynchronous • Distributed Bellman-Ford algorithm: • Synchronous Implementation: the nodes update their distance estimates in an orderly, predetermined manner. For instance: • Each iteration h is executed simultaneously by all nodes • Node i updates Dih using shortest distance estimates Djh-1 from the previous iteration • Iteration h+1 starts only after every node i has executed iteration h and has updated its shortest distance estimate Dih • Asynchronous Implementation: There is no predetermined manner according to which the nodes update their distance estimates. A node does not necessarily have the latest updates for the estimates for all its neighbors. Some nodes might not update their estimates immediately after they receive updates from their neighbors.
Synchronous Bellman-Ford algorithm: with initial conditions: Terminates after at most N iterations with, each node i knowing both its shortest distance Di and its outgoing link on the shortest path to node 1 “Synchronization” mechanisms: Getting all nodes to agree to start the algorithm with the appropriate initial conditions Abort and restart the algorithm – e.g., when the length of a link changes Complexity indicates that the centralized algorithm is preferable to the synchronous distributed version Asynchronous Implementation: No need to synchronize the nodes Does not require specific initial conditions Distributed Algorithms: Synchronous vs. Asynchronous
Asynchronous Bellman-Ford Algorithm • Operates indefinitely, by executing from time to time at each i≠1 iteration: • Dj: last estimate received from neighbor • dij: latest known length of outgoing link (i, j) • Node i transmits from time to time its latest estimate Di to all its neighbors • Neither the iterations, nor the transmission of updates need be synchronized • No assumptions are made on the initial values of Dj, jN(i) available at node i • Under a set of rather general assumptions the asynchronous Bellman-Ford algorithm finds the correct shortest distance of every node within finite time • If a number of changes in the link lengths occur up to time t0 and no other changes occur subsequently, the algorithm finds the shortest distances within finite time from t0. It is not necessary to re-initialize the algorithm after each link length change
0 D i Asynchronous Bellman-Ford Algorithm