lecture12 - CS 473: Algorithms Chandra Chekuri...

Info iconThis preview shows pages 1–10. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CS 473: Algorithms Chandra Chekuri chekuri@cs.illinois.edu 3228 Siebel Center University of Illinois, Urbana-Champaign 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 Single-Source Shortest Paths Single-Source 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 Single-Source Shortest Paths Single-Source 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 non-negative edge lengths. Running time: O (( m + n )log n ) with heaps and O ( m + n log n ) with advanced priority queues. Bellman-Ford algorithm for arbitrary edge lengths. Running time: O ( nm ). Chekuri CS473ug All-Pairs Shortest Paths All-Pairs 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 All-Pairs Shortest Paths All-Pairs 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 single-source algorithms n times, once for each vertex. Non-negative 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 All-Pairs Shortest Paths All-Pairs 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 single-source algorithms n times, once for each vertex. Non-negative 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.

Page1 / 76

lecture12 - CS 473: Algorithms Chandra Chekuri...

This preview shows document pages 1 - 10. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online