Shortest Path Problem

In graph theory, the single-source shortest path problem is the problem of finding a path between two vertices such that the sum of the weights of its constituent edges is minimized. More formally, given a weighted graph (that is, a set V of vertices, a set E of edges, and a real-valued weight function f : E → R), and given further two elements n, n' of N, find a path P from n to n' so that
\sum_{p\in P} f(p)
is minimal among all paths connecting n to n' . The all-pairs shortest path problem is a similar problem, in which we have to find such paths for every two vertices n to n' . A solution to the shortest path problem is sometimes called a pathing algorithm. The most important algorithms for solving this problem are:
  • Dijkstra's algorithm — solves single source problem if all edge weights are greater than or equal to zero. Without worsening the run time, this algorithm can in fact compute the shortest paths from a given start point s to all other nodes.
  • Bellman-Ford algorithm — solves single source problem if edge weights may be negative.
  • A* algorithm (or A* pathing algorithm) — a heuristic for single source shortest paths.
  • Floyd-Warshall algorithm — solves all pairs shortest paths.
  • Johnson's algorithm — solves all pairs shortest paths, may be faster than Floyd-Warshall on sparse graphs.
A related problem is the traveling salesman problem, which is the problem of finding the shortest path that goes through every node exactly once, and returns to the start. That problem is NP-hard, so an efficient solution is not likely to exist.

 

<< PreviousWord BrowserNext >>
klein four group
dividend
accuracy and precision
cold blooded
oldenburg
bloomsbury group
gentrification
post and lintel
russell mulcahy
bohemian rhapsody
impedance
lidar
world columbian exposition
data processing
chicago river
grant park (chicago)
art institute of chicago
werra
gain
loss
brothers grimm
wilhelm grimm
franco rasetti
the buggles
republic of macedonia
bernhard riemann
von neumann machine
bonnie tyler
path
mass noun
montpelier, vermont
intensity
arid zone agriculture
twin prime
franz mertens
charles emile picard
anton van leeuwenhoek
gretha smit
collaborative software
amedeo avogadro
queen (band)
macedon
uss skate
orientalium ecclesiarum