lec14 - 6.006 Introduction to Algorithms Lecture 14...

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

View Full Document Right Arrow Icon
6.006 Introduction to Algorithms Lecture 14: Shortest Paths I Prof. Erik Demaine
Background image of page 1

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

View Full DocumentRight Arrow Icon
Today Shortest paths Negative‐weight cycles Triangle inequality Relaxation algorithm Optimal substructure
Background image of page 2
Shortest Paths
Background image of page 3

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

View Full DocumentRight Arrow Icon
Shortest Paths
Background image of page 4
How Long Is Your Path? Directed graph Edge‐weight function Path Weight of , denoted , is ௞ିଵ v 1 v 2 v 3 v 4 v 5 4− 2 51 Example:
Background image of page 5

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

View Full DocumentRight Arrow Icon
My Path Is Shorter Than Yours A shortest path from to is a path of minimum possible weight from The shortest‐path weight from is the weight of any such shortest path: B A D C Example: 1 4 3 7 2 B A D C 1 4 3 7 2 ߜ ܣ, ܦ ൌ6
Background image of page 6
You Can’t Get There From Here
Background image of page 7

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

View Full DocumentRight Arrow Icon
You Can’t Get There From Here If there is no path from to , then neither is there a shortest path from Define in this case B A C Example: 1 4 2 3 7 D
Background image of page 8
The More I Walk, The Less It Takes A shortest path from to might not exist, even though there is a path from Negative weight cycle has B A C Example: 1 2 3 −7 D
Background image of page 9

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

View Full DocumentRight Arrow Icon
The More I Walk, The Less It Takes Define if there’s a path from to that visits a negative‐weight cycle B A C Example: 1 2 3 −7 D s t 2 5 −2 3 10
Background image of page 10
Image of page 11
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 11/11/2011 for the course MATH 180 taught by Professor Byrns during the Spring '11 term at Montgomery College.

Page1 / 28

lec14 - 6.006 Introduction to Algorithms Lecture 14...

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