COEN 179 Lecture Notes - Lecture 18: Directed Graph

11 views5 pages

Document Summary

Coen 179 lecture 18 single-source shortest paths (sssp) notes. Input: a weighted digraph d = (v, e, w), a source vertex s. Output: shorted path s from s to v for each v v. Note: shortest means smallest total weight, not fewest hops. Want shortest paths from s to s, a, b. S >s: empty path with total weight 0: d(s) = 0 j! (cid:15482) b sea : dcaf-wcs. at -1 s -5a -4ps : dcb) : Note: for some instances, there are no solutions! Shortest path from s to s? empty path has weight 0. " shorter" path : g(cid:15482)a(cid:15482)(cid:15482) : -70 a" shorter "p" ash : There are no shortest paths from s to s or from s to any other vertex. Claim: sssp has no solutions if and only if there is a negative weight cycle. E. g. existence of negative weight does not mean there are no solutions.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents