{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# lect09 - Lecture 9 All-Pairs Shortest Paths All-Pairs...

This preview shows pages 1–12. Sign up to view the full content.

Lecture 9 All-Pairs Shortest Paths

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

View Full Document
All-Pairs Shortest Paths nodes. of } , { pairs all for to from path shortest find ), , ( digraph a Given t s t s E V G =
Path Counting Problem nodes. of } , { pair each for to from edges exactly with paths of # count , integer positive a and ) , ( digraph a Given t s t s k k E V G =

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

View Full Document
Adjacent Matrix = = = × otherwise , 0 , ) , ( if 1, and } ,..., 2 , 1 { where ) ( ) ( E j i a n V a G A ij n n ij
1 2 3 0 0 1 1 0 0 0 1 1 1 2 3 1 2 3

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

View Full Document
Theorem . to from edges exactly with paths of number the is element each , ) ( In ) ( j i k a G A k ij k Proof . We prove it by induction on k.
1 2 3 0 0 1 1 0 0 0 1 1 1 2 3 1 2 3 k =1 True!

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

View Full Document
= + = n h hj k ih k ij a a a 1 ) 1 ( ) ( ) 1 ( Induction Step j h i choices ) ( k ih a choices ) 1 ( hj a
All-Pairs Shortest Paths with at most k edges . to from edges most at path with shortest the of weight the nodes, of } , { pair every for compute, , integer positive a and ) , ( digraph a Given t s k t s k E V G =

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

View Full Document
Weighted Adjacent Matrix = = = × otherwise , , ) , ( if , and } ,..., 2 , 1 { where ) ( ) ( E j i c l n V l G L ij ij n n ij
1 2 3 0 5 6 0 4 0 1 2 3 1 2 3 4 6 5

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern