What happens when the value of k is 0 in the Floyd Warshall Algorithm?
28 views
- 1 intermediate vertex
- 0 intermediate vertex (Correct Answer)
- N intermediate vertices
- N-1 intermediate vertices
Explanation
When k=0, a path from vertex i to vertex j has no intermediate vertices at all. Such a path has at most one edge and hence dij(0) = wij.