Solution

ID: past-exam-of-the-year-1-of-the-computer-science-course-of-the-university-of-oxford/2015/functional-programming-design-and-analysis-of-algorithms/8/b/solution

No: equal-length shortest paths permit different trees. Consider edges , all of weight one. Both routes to have length two. A shortest-path tree may therefore choose either or as the predecessor of .
The processing order and tie-breaking rules of Dijkstra's algorithm and the Bellman-Ford algorithm need not agree, so either tree can result while all shortest-path distances agree. If every reachable vertex has a unique shortest path from , then both correct algorithms must select those same paths.

New to topics? Read the docs here!