CSE331 Lecture 24

CSE331 Lecture 24 - 2 3 4 y y d(y) = 3 z z d(z) = 4...

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

View Full Document Right Arrow Icon
Lecture 23 CSE 331 Oct 24, 2011
Background image of page 1

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

View Full DocumentRight Arrow Icon
Online Office Hr @ 10:00- 10:30pm
Background image of page 2
Shortest Path Problem http://xkcd.com/85/
Background image of page 3

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

View Full DocumentRight Arrow Icon
Another more important application Is BGP a known acronym for you? Routing uses shortest path algorithm
Background image of page 4
Shortest Path problem Input: Directed graph G=(V,E) Edge lengths, l e for e in E “start” vertex s in V Output: All shortest paths from s to all nodes in V 100 15 5 s u w 5 s u 15 5 s u w
Background image of page 5

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

View Full DocumentRight Arrow Icon
Dijkstra’s shortest path algorithm E. W. Dijkstra (1930-2002)
Background image of page 6
Dijkstra’s shortest path algorithm Input: Directed G=(V,E) , l e ≥ 0 , s in V R = {s} , d(s) =0 While there is a x not in R with (u,x) in E , u in R d’(w) = min e=(u,w) in E , u in R d(u)+l e Pick w that minimizes d’(w) Add w to R d(w) = d’(w) s s w w u u z z x x y y 1 2 4 3 3 1 2 1 2 d(s) = 0 1 4 2 s s u u d(u) = 1 4 2 w w d(w) = 2 5 x x d(x) =
Background image of page 7

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

View Full DocumentRight Arrow Icon
Background image of page 8
Background image of page 9

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

View Full DocumentRight Arrow Icon
Background image of page 10
Background image of page 11
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 2 3 4 y y d(y) = 3 z z d(z) = 4 Shortest paths Shortest paths Couple of remarks The Dijkstras algo does not explicitly compute the shortest path Can maintain shortest path tree separately Dijkstras algorithm does not work with negative weights Left as an exercise Rest of Todays agenda Prove the correctness of Dijkstras Algorithm Runtime analysis of Dijkstras Algorithm Reading Assignment Sec 4.4 of [KT] Building a fiber network Lay down fibers to connect n locations All n locations should be connected Laying down a fiber costs money What is the cheapest way to lay down the fibers?...
View Full Document

Page1 / 11

CSE331 Lecture 24 - 2 3 4 y y d(y) = 3 z z d(z) = 4...

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

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