Floyd-Warshall
course Algorithmics
last review @April 24, 2023
mastery rookie
assignment
progress not started
Weight
Files
date
due date
notes
days left
Floyd-Warshall Algorithm
The Floyd-Warshall algorithm is a well-known algorithm used in graph theory to find
the shortest path between all pairs of vertices in a weighted graph. It is named after
its inventors, Robert Floyd and Stephen Warshall.
How it works
The algorithm uses dynamic programming to calculate the shortest path between all
pairs of vertices in a graph. It works by considering all possible paths between any
two vertices in the graph and selecting the one with the shortest distance.
The algorithm starts by initializing a matrix with the distances between each pair of
vertices. Then, it iterates through all vertices in the graph and considers each vertex
as a potential intermediate point for the shortest path. If the distance between two
vertices can be reduced by using an intermediate vertex, the matrix is updated with
the new, shorter distance.
Floyd-Warshall 1