The Shortest Path Algorithm