Lecture Notes for CS 512, Algorithm Design
Shortest Path Algorithms - 31 January 2000
- shortest paths - given a weighted, directed graph find
- the shortest paths from a single source to all destinations
- the shortest paths to a single destination from all sources
- the shortest path from a single source to a single destination
- the shortest paths from any source to any destination
- a weighted path, a shortest path, unreachable vertices, negative cycles
- predecessor subgraph, shortest path tree
- infinite arithmetic
- facts about shortest paths
- a subpath of a shortest path is a shortest path
- the shortest path to a vertex is the shortest path to a neighbor plus
the weight of the adjacent edge
- the shortest path to a neighbor plust the weight of the adjacent edge
is an upper bound on the shortest path to a vertex
- let's consider cuts again
- a non-trivial cut must contain an edge
- given edges across a cut, which edge to take
- the cut must contain all edges to a vertex
- but,
- how many cuts to take
- what's the shortest path to the neighbor
- which neighbor
- how long should the cuts be made
- cut every vertex
- obtain a high estimate for distance and improve it
- use the lowest upper bound
- relaxation
- what's the longest possible path
- the result is the bellman-ford algorithm
- indiscriminate cuts at every vertex is expensive - is there a better way
- if all v's neighbor's shortest paths are known
- define the cut to cross the frontier of the shortest-path tree
- unfortunately, this won't work because a frontier cut doesn't contain
all edges to a node
- nowever, if all edges are non-negative, it doesn't matter
- dijkstra's algorithm
This page last modified on 31 January 2000.