the path matrix is modified warshall' algorithm warshall' algorithm can be modified to obtain matrix that gives the shortest paths between the nodes in graph as an input to the algorithmwe take the adjacency matrix of and replace all the values of which are zero by infinity (*infinity (*denotes very large number and indicates that there is no path between the vertices in warshall' modified algorithmwe obtain set of matrices qm using the formula given below qk[ ][jminimummk- [ ][ ]mk- [ ][kmk- [ ][ ] is exactly the same as with little difference that every element having zero value in is replaced by (*in using the given formulathe matrix qn will give the path matrix that has the shortest path between the vertices of the graph warshall' modified algorithm is shown in fig step [initialize the shortest path matrixqrepeat step for to - where is the number of nodes in the graph step repeat step for to - step if [ ][jthen set [ ][jinfinity (or else [ ][ja[ ][ [end of loop[end of loopstep [calculate the shortest path matrix qrepeat step for to - step repeat step for to - step repeat step for jto - step if [ ][ < [ ][kq[ ][jset [ ][jq[ ][jelse set [ ][jq[ ][kq[ ][ [end of if[end of loop[end of loop[end of loopstep exit figure modified warshall' algorithm example consider the unweighted graph given in fig and apply warshall' algorithm to it figure graph