7 SHORTEST PATHS
The problem of finding the lowest-cost path through a graph, as measured by the sum of edge weights along the path, is naturally analogous to a range of real-world path planning and optimization tasks. For example, we may be interested in routing trucks between two cities such that we minimize the total cost of fuel. In this chapter, we consider algorithms to find paths with the minimum cost starting at a given origin.
While the problem of finding these paths is often called the shortest-path problem, it is more accurate to think of it in terms of lowest-cost path, since a path’s cost is not always a function of distance. ...
Get Graph Algorithms the Fun Way now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.