380 likes | 415 Views
Explore the proof of the all-pairs shortest paths theorem, adjacency matrix operations, dynamic programming, and Floyd-Warshall algorithm in this lecture. Learn matrix multiplication laws and faster algorithms with puzzles.
E N D
1 3 2 1 2 3 1 2 3
Theorem Proof. We prove it by induction on k.
k=1 True! 1 3 2 1 2 3 1 2 3
Recursive formula Proof.
Case 1. The path with length contains at most edges. Case 2. the path with length contains exactly edges.
1 4 5 6 3 2 1 2 3 1 2 3
Theorem Proof. We prove it by induction on k.
1 k=1 True! 4 5 6 3 2 1 2 3 1 2 3
All-Pairs Shortest Paths Theorem Proof
What we learnt in this lecture? • The relationship between shortest path and matrix multiplication. • Faster-All-Pairs-Shortest-Pathsalgorithm • Floyd-Warshall algorithm.