This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: Outline 1 Single Source Shortest Path Problem 2 Dijkstra’s Algorithm 3 BellmanFord Algorithm 4 All Pairs Shortest Path (APSP) Problem 5 FloydWarshall Algorithm c Xin He (University at Buffalo) CSE 431/531 Algorithm Analysis and Design 1 / 36 Single Source Shortest Path (SSSP) Problem Single Source Shortest Path Problem Input: A directed graph G = ( V , E ) ; an edge weight function w : E → R , and a start vertex s ∈ V . Find: for each vertex u ∈ V , δ ( s , u ) = the length of the shortest path from s to u , and the shortest s → u path. c Xin He (University at Buffalo) CSE 431/531 Algorithm Analysis and Design 2 / 36 Single Source Shortest Path (SSSP) Problem Single Source Shortest Path Problem Input: A directed graph G = ( V , E ) ; an edge weight function w : E → R , and a start vertex s ∈ V . Find: for each vertex u ∈ V , δ ( s , u ) = the length of the shortest path from s to u , and the shortest s → u path. There are several different versions: G can be directed or undirected . c Xin He (University at Buffalo) CSE 431/531 Algorithm Analysis and Design 2 / 36 Single Source Shortest Path (SSSP) Problem Single Source Shortest Path Problem Input: A directed graph G = ( V , E ) ; an edge weight function w : E → R , and a start vertex s ∈ V . Find: for each vertex u ∈ V , δ ( s , u ) = the length of the shortest path from s to u , and the shortest s → u path. There are several different versions: G can be directed or undirected . All edge weights are 1. c Xin He (University at Buffalo) CSE 431/531 Algorithm Analysis and Design 2 / 36 Single Source Shortest Path (SSSP) Problem Single Source Shortest Path Problem Input: A directed graph G = ( V , E ) ; an edge weight function w : E → R , and a start vertex s ∈ V . Find: for each vertex u ∈ V , δ ( s , u ) = the length of the shortest path from s to u , and the shortest s → u path. There are several different versions: G can be directed or undirected . All edge weights are 1. All edge weights are positive . c Xin He (University at Buffalo) CSE 431/531 Algorithm Analysis and Design 2 / 36 Single Source Shortest Path (SSSP) Problem Single Source Shortest Path Problem Input: A directed graph G = ( V , E ) ; an edge weight function w : E → R , and a start vertex s ∈ V . Find: for each vertex u ∈ V , δ ( s , u ) = the length of the shortest path from s to u , and the shortest s → u path. There are several different versions: G can be directed or undirected . All edge weights are 1. All edge weights are positive . Edge weights can be positive or negative , but there are no cycles with negative total weight . c Xin He (University at Buffalo) CSE 431/531 Algorithm Analysis and Design 2 / 36 SSSP Problem Note 1: There are natural applications where edge weights can be negative....
View
Full Document
 Fall '11
 XINHE
 Algorithms, Graph Theory, Shortest path problem

Click to edit the document details