Please enable JavaScript.
Coggle requires JavaScript to display documents.
Floyd´s Algorithm - Coggle Diagram
Floyd´s Algorithm
Algorithm
Input
Matrix W[1..n, 1..n]
Output
Matrix D with the shortest path Lengths
Code
for k ← 1 to n do
for i ← 1 to n do
for j ← 1 to n do
D[i, j ] ← min{D[i, j ], D[i, k] + D[k, j ]}
Return D
Graph
Weighted
Connected
All-Pairs Shortest-Paths Problem
Distance Matrix(D)
N Matrices of N x N
D(0)
Weights
...
D(n)
Lengths of the Shortest-Paths
Efficiency
Θ(n³)