Lecture17-shortestpaths

Lecture17-shortestpaths - This work is licensed under a...

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

View Full Document Right Arrow Icon
CS 312: Algorithm Analysis Lecture #17: Shortest Paths This work is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported License. Slides by: Eric Ringger, adapting figures from Dasgupta et al.
Background image of page 1

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

View Full DocumentRight Arrow Icon
Announcements § Project #3 § Credentials to access homework keys and reviews § Reviews: due Tuesday § If no reviews received, say so in your reviewer response § Final proofs: due Thursday § Questions? § Project #4 Help session
Background image of page 2
Objectives § Find shortest paths § Formulate problems as graph problems on weighted graphs § Introduce Dijkstra’s algorithm
Background image of page 3

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

View Full DocumentRight Arrow Icon
Chapter 3 vs. Chapter 4 § Chapter 3 is all about connectivity in graphs § Formulating problems as graphs § Can I get from a to b? § Chapter 4 is all about paths in graphs § Formulating problems as weighted graphs § What's the cheapest (e.g., shortest) path from a to b?
Background image of page 4
Recall: Depth-First Search
Background image of page 5

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

View Full DocumentRight Arrow Icon
DFS for Shortest Paths?
Background image of page 6
DFS for Shortest Paths?
Background image of page 7

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

View Full DocumentRight Arrow Icon
Edges as Strings
Background image of page 8
Edges as Strings
Background image of page 9

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

View Full DocumentRight Arrow Icon
BFS Analysis :
Background image of page 10
BFS
Background image of page 11

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

View Full DocumentRight Arrow Icon
BFS Example Queue: Additionally, track the prev / parent attribute prev dist
Background image of page 12
BFS Example Queue: Additionally, track the prev / parent attribute
Background image of page 13

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

View Full DocumentRight Arrow Icon
BFS Queue and Shortest Paths Tree
Background image of page 14
§ Is it correct? § How long does it take?
Background image of page 15

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

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

Page1 / 36

Lecture17-shortestpaths - This work is licensed under a...

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

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