Given the predecessor matrix , we can print the shortest path from i to j:
Print-Path(, i, j) if i = j then print i else if = NIL then print ``no path exists from i to j'' else Print-Path(, i, ) print j