SUNY Geneseo Department of Computer Science


Dijkstra’s Algorithm

Thursday, March 28

CSci 242, Spring 2013
Prof. Doug Baldwin

Return to List of Lectures

Previous Lecture

Questions?

Dijkstra’s Algorithm

Carry it out (below is the graph used and final shortest path distances found—but not the steps through which they were found)

Graph with shortest path distances

Is it always the case that every vertex u reachable from s (except s) that is added to S is adjacent to some vertex already in S at the time u is added?

If every u added to S is adjacent to some vertex in S, does that fact lead to a simpler correctness proof for Dijkstra’s algorithm?

Vertex z in S adjacent to u but with long edge to u

Finish this analysis for extra credit (up to 1/2 problem set)

Hand out Dijkstra problem set

Next

Greedy algorithms

(Dijkstra’s algorithm is a greedy algorithm)

Sections 16.1 and 16.2


Next Lecture