This preview shows pages 1–7. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: CS 310 Unit 20 Single Source Shortest Paths Furman Haddix Ph.D. Assistant Professor Minnesota State University, Mankato Spring 2008 Single Source Shortest Paths Objectives Introduction to Single Source Shortest Paths (SSSP) SSSP in Directed Acyclic Graph (DAG) Dijkstras Algorithm BellmanFord Algorithm Text 24.1, 24.2, 24.3 Introduction to Single Source Shortest Paths For single source shortest paths problems we consider a weighted graph, G(V, E) with a weight function w(E) = the set of real numbers Although shortest paths can be defined in multiple ways, we limit ourselves here to the path between two vertices for which the sum of the weights for the edges traversed is minimal For individual algorithms we may impose further limitations on the graph: Directed Acyclic Nonnegative or positive weights For all algorithms, we require that the graph have no negative weight cycles This would lead to repeated traversals of the negative weight cycle with each traversal yielding a shorter Related Problems Related problems solvable with the single source algorithms: Single source shortest path in an unweighted graph Recall that the breadthfirst search algorithm provides a single source shortest path in an unweighted directed (or undirected graph) Singledestination shortest path reverse direction of each edge Singlepair shortest path no asymptotically better solution than single source exists for this problem Allpairs shortest path Unit 21 addresses this problem better solutions exist than iterating single source algorithms SSSP Concepts Cycles Some algorithms can deal with zeroweight or positiveweight cycles. Shortest paths For some applications, computing the shortest distance is not enough, we need to preserve the route; this is facilitated by maintaining a predecessor or parent subgraph. SSSP Tools Relaxation There are two cases: There is no path between two vertices (s, v) There is a path between two vertices (s, v) and this path has a shortestpath weight (s, v) The algorithms herein are based on the following approach: find a path and its weight d.v by relaxation (successively testing each possible subpath) determine if there is a smaller d.v when all (feasible) possibilities have been tested d.v = (s, v) Triangle inequality For any edge (u, v) E, (s, v) (s, u) + w(u, v) Predecessor subgraph The predecessor subgraph is a shortestpaths tree rooted at s if d.v = (s, v) for v V Overview of three algorithms...
View
Full
Document
 Spring '08
 FurmanHaddix

Click to edit the document details