A central problem in algorithmic
graph theory
In mathematics, graph theory is the study of '' graphs'', which are mathematical structures used to model pairwise relations between objects. A graph in this context is made up of '' vertices'' (also called ''nodes'' or ''points'') which are conn ...
is the
shortest path problem
In graph theory, the shortest path problem is the problem of finding a path between two vertices (or nodes) in a graph such that the sum of the weights of its constituent edges is minimized.
The problem of finding the shortest path between t ...
. One of the generalizations of the shortest path problem is known as the single-source-shortest-paths (SSSP) problem, which consists of finding the shortest path between every pair of vertices in a graph. There are classical
sequential algorithm In computer science, a sequential algorithm or serial algorithm is an algorithm that is executed sequentially – once through, from start to finish, without other processing executing – as opposed to concurrently or in parallel. The term is pri ...
s which solve this problem, such as
Dijkstra's algorithm
Dijkstra's algorithm ( ) is an algorithm for finding the shortest paths between nodes in a graph, which may represent, for example, road networks. It was conceived by computer scientist Edsger W. Dijkstra in 1956 and published three years ...
. In this article, however, we present two
parallel algorithm
In computer science, a parallel algorithm, as opposed to a traditional serial algorithm, is an algorithm which can do multiple operations in a given time. It has been a tradition of computer science to describe serial algorithms in abstract machine ...
s solving this problem.
Another variation of the problem is the all-pairs-shortest-paths (APSP) problem, which also has parallel approaches:
Parallel all-pairs shortest path algorithm.
Problem definition
Let
be a directed graph with
nodes and
edges. Let
be a distinguished vertex (called "source") and
be a function assigning a non-negative real-valued weight to each edge. The goal of the single-source-shortest-paths problem is to compute, for every vertex
reachable from
, the weight of a minimum-weight path from
to
, denoted by
and abbreviated
. The weight of a path is the sum of the weights of its edges. We set
if
is unreachable from
.
Sequential shortest path algorithms commonly apply iterative labeling methods based on maintaining a tentative distance for all nodes;
is always
or the weight of some path from
to
and hence an upper bound on
. Tentative distances are improved by performing edge relaxations, i.e., for an edge
the algorithm sets
.
For all parallel algorithms we will assume a
PRAM
Pram or PRAM may refer to: a bulbous growth on senior canines, varying in size, usually benign and painless. If it bursts, it will ooze pus and blood.
Places
* Pram, Austria, a municipality in the district of Grieskirchen in the Austrian state of ...
model with concurrent reads and concurrent writes.
Delta stepping algorithm
The delta stepping algorithm is a label-correcting algorithm, which means the tentative distance of a vertex can be corrected several times via edge relaxations until the last step of the algorithm, when all tentative distances are fixed.
The algorithm maintains eligible nodes with tentative distances in an array of buckets each of which represents a distance range of size
. During each phase, the algorithm removes all nodes of the first nonempty bucket and relaxes all outgoing edges of weight at most
. Edges of a higher weight are only relaxed after their respective starting nodes are surely settled.
The parameter
is a positive real number that is also called the "step width" or "bucket width".
Parallelism is obtained by concurrently removing all nodes of the first nonempty bucket and relaxing their outgoing light edges in a single phase. If a node
has been removed from the current bucket