Science & technology

Invention of Floyd–Warshall algorithm

1959

The Floyd-Warshall algorithm is a method in computer science for finding the shortest paths between all pairs of vertices in a weighted graph. It works by considering, in turn, each vertex as a possible intermediate point on a path and updating the shortest known distance if the route through it is shorter. It can handle edges with negative weights, as long as there are no negative cycles, and runs in a time proportional to the cube of the number of vertices. The algorithm is named after Robert Floyd and Stephen Warshall, who published related versions in the early 1960s, and earlier work by Bernard Roy anticipated it. It is often presented as an example of dynamic programming.

Open on the timeline

Before and after

More in Science & technology

The era

This moment belongs to the Contemporary world (1945 CE to today), the world since 1945. You can also browse everything in the 20th century.