Use Floyd's algorithm to solve the all-pairs shortest-path problem for the digraph with the following weight graph.
The adjacency matrix for the graph is as follows:
[0 2 10]
[7 0 5]
[1 3 0]
[8 2 6]
[6 0 7]
[8 2 5]
[6 10 1]
[0 2 5]
[b] Show the matrix after using only vertices B and D as intermediates. Fill in only the blank cells on the cover sheet.
Complete the pseudocode for Floyd's algorithm.
ACORITFloydW[1..n,1..n] // Implements Floyd's algorithm for the all-pairs shortest-paths problem
// Output: The distance matrix of the Shortest paths' lengths DO-W for k-1 to n
do
for i-1 to n
for j-1 to n
D[i][j] = min(D[i][j], D[i][k-1] + D[k-1][j])
return D