Floyd Warshall

Demo

  • The Aij element of the distance table represents the shortest distance between the i and the j node at that particular instance of time.
  • There are 4 iterations and in each iteration, there are 6 steps to move from 1 step to the other click on the next or previous button.

Observation

  • After each step observe whether the distance array is highlighted with red or yellow colour.
  • Red color denotes that the value is updated whereas yellow denotes that the value is not updated.

Practice

  • The Aij element of the distance table represents the shortest distance between the i and j node at that particular instance of time.
  • For each iteration, you need to fill in the table. You can fill the table using numbers or inf/INF.
  • On iteration number x you need to consider node x as the middle element. For example in iteration 2 you need to find the shortest distance between nodes 1 and 3, it will be given by a minimum of dist(1,3) and dist(1,2) + dist(1,3).
  • After filling the table click on Next Iteration Button
  • You can move to previous iterations to see the distance table.

Observation

  • Check the observation tab to check whether the table is correctly filled or not.
  • Highlighted fields in the table represent that the values are incorrectly marked.

Exercise

  • There are 4 iterations go to every iteration and complete the distance table.
  • You can fill the table using numbers or inf/INF.
  • After completion click on submit button.

Observation

  • Check the observation tab to check whether the table is correctly filled or not.
  • Observation tab shows from which iteration the answer started to get off track.