Skip to content

Floyd-Warshall, every pair

networks

Level 3 of 3

Also called Floyd-Warshall algorithm and All-pairs shortest paths.

Finds the shortest way from every place to every other at once, in a table. Allow each place in turn as a stop on the way, and for every pair, see whether going through that stop beats the best way found so far.

the map

every pair, from the row's place to the column's

pairs tried
0
ways made shorter
0

step 1 of 1

Examples

Tap a spot to put your pen down there, then tap a spot next to it to draw a road. Keep tapping to draw on.

Places stand in two rows, A to D above and E to H below. A one-way road joins two places next to each other (one road across each square), with a > and a length from 1 to 99, such as A>B 4. Separate roads with commas, for example A>B 4, B>F 2, F>E 1.