Defined the shortest paths problem.