Lecture 23

We defined the single-source shortest-path problem (SSSP). We then showed how we could solve this problem in a weighted graph (directed or undirected) by a greedy technique called "Dijkstra's Algorithm". We presented the algorithm (which appears in the text) and then ran it on some sample graphs.

We noted that the algorithm does not work on graphs with negative weight edges or arcs. We noted that Bellman-Ford (not covered) does. Also, we presented an algorithm which worked even faster on DAGs (and this alg tolerates negative arc weights).

We did not prove the algorithm correct (until Disc 8), but did analyze its running time based on binary heaps as the underlying priority queue.