# Encyclopedia of Operations Research and Management Science

2001 Edition
| Editors: Saul I. Gass, Carl M. Harris

# Dijkstra'salgorithm

• Saul I. Gass
• Carl M. Harris
Reference work entry
DOI: https://doi.org/10.1007/1-4020-0611-X_248
A method for finding shortest paths (routes) in a network. The algorithm is a node labeling, greedy algorithm. It assumes that the distance c ij between any pair of nodes i and j is nonnegative. The labels have two components { d( i), p}, where d( i) is an upper bound on the shortest path length from the source (home) node s to node i, and p is the node preceding node i in the shortest path to node i. The algorithmic steps for finding the shortest paths from s to all other nodes in the network are as follows:
• Step 1. Assign a number d(i) to each node i to denote the tentative (upper bound) length of the shortest path from s to i that uses only labeled nodes as intermediate nodes. Initially, set d(s) = 0 and d(i) = ∞ for all is. Let y denote the last node labeled. Give node s the label {0, −) and let y = s.

• Step 2. For each unlabeled node i, redefine d(i) as follows:

d(i) = min{d(i), d(y) + cyi)}. If d(i) = ∞ for all unlabeled vertices i, then stop, as no path exists from sto any...

This is a preview of subscription content, log in to check access.