This preview shows page 1. Sign up to view the full content.
Unformatted text preview: s have been developed. In particular, there are many ways to compute
minimumcost path between any two nodes. For instance, one might use the BellmanFord method developed in Section 18.4. That algorithm is wellsuited to a distributed implementation because it iteratively converges to the right answer as new updates arrive,
but applying the algorithm on a complete graph is slower than some alternatives.
One of these alternatives was developed a few decades ago, a few years after the
BellmanFord method, by a computer scientist named Edsger Dijkstra. Most linkstate
protocol implementations use Dijkstra’s shortestpaths algorithm (and numerous extensions to it) in their integration step. One crucial assumption for this algorithm, which is
fortunately true in most networks, is that the link costs must be nonnegative.
Dijkstra’s algorithm uses the following property of shortest paths: if a shortest path from
node X to node Y goes through node Z , then the subpath from X to Z must also be a shortest path.
It is easy to see why this property must hold. If the subpath from X to Z is not a shortest
path, then one could ﬁnd a shorter path from X to Y that uses a different, and shorter,
subpath from X to Z instead of the original subpath, and then continue from Z to Y . By
the same logic, the subpath from Z to Y must also be a shortest path in the network. As
a result, shortest paths can be concatenated together to form a shortest path between the
nodes at the ends of the subpaths.
This property suggests an iterative approach toward ﬁnding paths from a node, n, to all
the other destinations in the network. The algorithm maintains two disjoint sets of nodes,
S and X = V − S , where V is the set of nodes in the network. Initially S is empty. In
each step, we will add one more node to S , and correspondingly remove that node from
X . The node, v , we will add satisﬁes the following property: it is the node in X that has
the shortest path from n. Thus, the algorithm adds nodes to S in nondecreasin...
View Full
Document
 Fall '13
 HariBalakrishnan

Click to edit the document details