This preview shows pages 1–10. Sign up to view the full content.
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 DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: CS 473: Algorithms Chandra Chekuri chekuri@cs.illinois.edu 3228 Siebel Center University of Illinois, UrbanaChampaign Fall 2009 Chekuri CS473ug Part I All Pairs Shortest Paths Chekuri CS473ug Shortest Path Problems Shortest Path Problems Input A (undirected or directed) graph G = ( V , E ) with edge lengths (or costs). For edge e = ( u , v ), ( e ) = ( u , v ) is its length. Given nodes s , t find shortest path from s to t . Given node s find shortest path from s to all other nodes. Find shortest paths for all pairs of nodes. Chekuri CS473ug SingleSource Shortest Paths SingleSource Shortest Path Problems Input A (undirected or directed) graph G = ( V , E ) with edge lengths. For edge e = ( u , v ), ( e ) = ( u , v ) is its length. Given nodes s , t find shortest path from s to t . Given node s find shortest path from s to all other nodes. Chekuri CS473ug SingleSource Shortest Paths SingleSource Shortest Path Problems Input A (undirected or directed) graph G = ( V , E ) with edge lengths. For edge e = ( u , v ), ( e ) = ( u , v ) is its length. Given nodes s , t find shortest path from s to t . Given node s find shortest path from s to all other nodes. Dijkstras algorithm for nonnegative edge lengths. Running time: O (( m + n )log n ) with heaps and O ( m + n log n ) with advanced priority queues. BellmanFord algorithm for arbitrary edge lengths. Running time: O ( nm ). Chekuri CS473ug AllPairs Shortest Paths AllPairs Shortest Path Problem Input A (undirected or directed) graph G = ( V , E ) with edge lengths. For edge e = ( u , v ), ( e ) = ( u , v ) is its length. Find shortest paths for all pairs of nodes. Chekuri CS473ug AllPairs Shortest Paths AllPairs Shortest Path Problem Input A (undirected or directed) graph G = ( V , E ) with edge lengths. For edge e = ( u , v ), ( e ) = ( u , v ) is its length. Find shortest paths for all pairs of nodes. Apply singlesource algorithms n times, once for each vertex. Nonnegative lengths. O ( nm log n ) with heaps and O ( nm + n 2 log n ) using advanced priority queues. Arbitrary edge lengths: O ( n 2 m ). Chekuri CS473ug AllPairs Shortest Paths AllPairs Shortest Path Problem Input A (undirected or directed) graph G = ( V , E ) with edge lengths. For edge e = ( u , v ), ( e ) = ( u , v ) is its length. Find shortest paths for all pairs of nodes. Apply singlesource algorithms n times, once for each vertex. Nonnegative lengths. O ( nm log n ) with heaps and O ( nm + n 2 log n ) using advanced priority queues. Arbitrary edge lengths: O ( n 2 m ). Can we do better? Chekuri CS473ug Shortest Paths and Recursion Can we compute the shortest path distance from s to t recursively?...
View
Full
Document
This note was uploaded on 01/22/2012 for the course CS 573 taught by Professor Chekuri,c during the Fall '08 term at University of Illinois, Urbana Champaign.
 Fall '08
 Chekuri,C
 Algorithms

Click to edit the document details