...

/

Single-Source Shortest-Paths Problem

Single-Source Shortest-Paths Problem

Get started with the ground work needed for the single-source shortest-paths problem.

We’ll now present some algorithms for the single-source shortest-paths problem, where, given a weighted digraph GG and a vertex ss, the goal is to find the shortest paths from ss to all other vertices. Since ss is the starting vertex of all of these paths, it is called the source vertex.

Note: Various shortest-paths algorithms typically employ weighted digraphs to model the underlying network.

Press + to interact

Since the length of a shortest path in a weighted digraph is the sum of the edge weights along the path and not the number of edges in that path, BFS no longer suffices for finding the shortest paths.

Some of the well-known and lesser-known single-source shortest-paths algorithms capitalize on the idea of edge-relaxations, and a specific initialization scheme for vertex attributes that was originally proposed by Lester R. Ford Jr. We cover this important scheme here.

Conventions

The source vertex is typically denoted s\mathbb{s} unless stated otherwise.

Recall: A path from ss to vv is referred to as an sv\mathbb{s} - \mathbb{v} path.

Attributes and initializations scheme

For each vertex vv of a weighted digraph GG, we want to maintain the following attributes:

  • v.distv.dist stores the length of a shortest svs - v path amongst all svs - v ...