1

I have a feeling this might be wrong an I'm looking for a counter example, however, I couldn't find one yet.. can anyone guide me in the right direction?

2 Answers2

2

Counter example: V={a,b,c,d}, E={(a,b), (a,c), (a,d), (b,c)}. A MST of this graph, rooted at a, could be: {(a,b), (a,d), (b,c)}. But this is not a SPT because the path a->c is of length 2 instead of 1 (a and c are directly connected in the original graph).

Harel
  • 36
  • 2
0

Shortest-path tree is defined for a graph and a root vertex.

Edit: My previous example was for a weighted graph, but still you can find counter-examples by choosing the root vertex carefully.

Shahaf Finder
  • 221
  • 1
  • 7