CISC 365 Lecture Notes - Lecture 1: The Algorithm

60 views2 pages

Document Summary

Dijkstra"s algorithm works by building a set r (for reached) of vertices for which the shortest route from a has been found. On each iteration one more vertex is added to r until no more can be added (either because all vertices have been added or because some vertices cannot be reached from a). The algorithm also maintains a set c (for candidates) of vertices for which some path from a has been found (but not necessarily the best path). The algorithm maintains a vector b with one element for each vertex. On each iteration, the algorithm chooses the vertex in c that has the lowest b() value. (on the rst iteration this will be a. On the second iteration, it will be one of a"s neighbours, etc. ) Call this vertex x. vertex x is moved from c to r (so x can never be chosen again).

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents

Related Questions