Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
courses:cs211:winter2011:journals:david:chapter4 [2011/02/16 06:24] margoliesdcourses:cs211:winter2011:journals:david:chapter4 [2011/02/16 06:31] (current) – [4.4 - Shortest Paths in a Graph] margoliesd
Line 12: Line 12:
  
 Readability: 7/10  Readability: 7/10 
- 
 ====4.4 - Shortest Paths in a Graph==== ====4.4 - Shortest Paths in a Graph====
 +
 +Our problem is to find the shortest path between two nodes, assuming that are starting node has a path to ever other node in the graph, and that each edge has a specific length associated with it. Dijkstra's algorithm adds the next node with the shortest length to the current set of nodes. We use a priority queue to store the edge lengths and then use the extractMin operation to get the next shortest length.The algorithm has an efficiency of O(m) if we use priority queues. 
 +
 +Readability: 6/10 because it is a fairly confusing algorithm to follow
courses/cs211/winter2011/journals/david/chapter4.1297837498.txt.gz · Last modified: 2011/02/16 06:24 by margoliesd
CC Attribution-Noncommercial-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0