Given a graph G=(V,E) with positive edges weights, Is it possible to produce different shortest path trees for the Bellman-Ford algorithm and Dijkstra's algorithm?
1 Answer
$\begingroup$
$\endgroup$
If there are multiple shortest paths (equal distances), you could get different results even between two runs of Bellman Ford, if for instance, the two runs consider edges in different orders. But, for any graph with unique shortest paths, they obviously must both return the unique answer.