Revised Matrix Algorithms for Shortest Paths