09.07.2015 Views

slides - Computer Science - University of San Francisco

slides - Computer Science - University of San Francisco

slides - Computer Science - University of San Francisco

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

17-21: Dijkstra’s AlgorithmKeep a table that contains, for each vertexIs the distance to that vertex known?What is the best distance we’ve found so far?Repeat:Pick the smallest unknown distancemark it as knownupdate the distance <strong>of</strong> all unknown neighbors <strong>of</strong>that nodeUntil all vertices are known

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!