Floyd-Warshall: Dynamic ProgrammingFloyd-Warshall computes all pairs, but let us focus on 5 to 6.62 / 71
View Slide
Floyd-Warshall: Dynamic ProgrammingWe start by considering only start(5) and dest(6) when k is 0.63 / 71
Floyd-Warshall: Dynamic ProgrammingThen we also consider node 1 when k is 1.64 / 71
Floyd-Warshall: Dynamic ProgrammingAnd node 2 when k is 2.65 / 71
Floyd-Warshall: Dynamic ProgrammingAnd node 3 when k is 3.....66 / 71
Floyd-Warshall: Dynamic ProgrammingAnd node 4 when k is 4.... And so on.Note that I have just been filling in the answers for recursivecallsBut we actually need to compute those.67 / 71
Floyd-Warshall: Dynamic ProgrammingHmm it looks like some of those recursive calls will recomputethe same thing...68 / 71