Greedy algorithms
Shortest paths in weighted graphs Tyler Moore
CS 2123, The University of Tulsa
Some slides created by or adapted from Dr. Kevin Wayne. For more information see http://www.cs.princeton.edu/~wayne/kleinberg-tardos. Some code reused from Python Algorithms by Magnus Lie Hetland.
- Problem. Given a digraph G = (V, E), edge lengths ℓ
e ≥ 0, source s ∈ V,
and destination t ∈ V, find the shortest directed path from s to t.
Shortest-paths problem
3
7 1 3 source s 6 8 5 7 5 4 15 3 12 20 13 9 length of path = 9 + 4 + 1 + 11 = 25 destination t 4 5 2 6 9 4 1 11 2 / 21
Car navigation
4
3 / 21
・PERT/CPM. ・Map routing. ・Seam carving. ・Robot navigation. ・Texture mapping. ・Typesetting in LaTeX. ・Urban traffic planning. ・Telemarketer operator scheduling. ・Routing of telecommunications messages. ・Network routing protocols (OSPF
, BGP , RIP).
・Optimal truck routing through given traffic congestion pattern.
5 Reference: Network Flows: Theory, Algorithms, and Applications, R. K. Ahuja, T. L. Magnanti, and J. B. Orlin, Prentice Hall, 1993.
Shortest path applications
4 / 21