Graph Theory37 sections · 1633 units
Open in CourseQuiz: Floyd-Warshall DP State
Knowledge check
Check Your Understanding
In Floyd-Warshall, the DP state is dist[k][i][j]: shortest path from to using only intermediate vertices from . Why can you drop the dimension and use just dist[i][j]?
- A.The dimension is always equal to
- B.When computing layer , you only read from layer , and in-place updates do not cause errors
- C.Removing the dimension makes the algorithm faster
- D.The dimension only affects the diagonal entries