1 / 14

150 likes | 345 Vues

Dijkstra’s Shortest Path Algorithm Neil Tang 03/25/2008. Class Overview. The shortest path problem Applications Dijkstra’s algorithm Implementation and time complexities. Shortest Path Problem. Weighted path length (cost): The sum of the weights of all links on the path.

Télécharger la présentation
## Dijkstra’s Shortest Path Algorithm Neil Tang 03/25/2008

**An Image/Link below is provided (as is) to download presentation**
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.
Content is provided to you AS IS for your information and personal use only.
Download presentation by click this link.
While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.
During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

**Dijkstra’s Shortest Path Algorithm Neil Tang03/25/2008**CS223 Advanced Data Structures and Algorithms**Class Overview**• The shortest path problem • Applications • Dijkstra’s algorithm • Implementation and time complexities CS223 Advanced Data Structures and Algorithms**Shortest Path Problem**• Weighted path length (cost): The sum of the weights of all links on the path. • The single-source shortest path problem: Given a weighted graph G and a source vertex s, find the shortest (minimum cost) path from s to every other vertex in G. CS223 Advanced Data Structures and Algorithms**An Example**CS223 Advanced Data Structures and Algorithms**Another Example**CS223 Advanced Data Structures and Algorithms**Applications**• Digital map • Computer network • Travel planning CS223 Advanced Data Structures and Algorithms**Dijkstra’s Algorithm**CS223 Advanced Data Structures and Algorithms**Dijkstra’s Algorithm**CS223 Advanced Data Structures and Algorithms**Dijkstra’s Algorithm**CS223 Advanced Data Structures and Algorithms**Dijkstra’s Algorithm**CS223 Advanced Data Structures and Algorithms**Dijkstra’s Algorithm**CS223 Advanced Data Structures and Algorithms**Dijkstra’s Algorithm**CS223 Advanced Data Structures and Algorithms**Dijkstra’s Algorithm**CS223 Advanced Data Structures and Algorithms**Implementation and Time Complexities**• Trivial: O(|V|2 + |E|) = O(|V|2) • Heap: deleteMin |V| times + decreaseKey |E| times O(|V|log|V| + |E|log|V|) = O (|E|log|V|) • Fibonacci heap: O(|E| + |V|log|V|) CS223 Advanced Data Structures and Algorithms

More Related