1
votes

Is it possible to have an MST that has no common edges with the shortest path tree in an undirected graph with distinct positive edges?

I've been trying to draw out different examples, but it seems like it is impossible. The shortest path edge in the shortest path tree should also be included in an MST it seems.

1
Can you clarify what you mean with shortest path tree? Am I correct in assuming that it is a tree of shortest paths from a particular node v to all other nodes? - ilim
Yes, arbitrarily picking a node as the source, it is the tree of shortest paths from the source to all other nodes - user3628240
algorithm ? no. This should be moved to comp-sci - gen-y-s

1 Answers

1
votes

Considering Prim's algorithm, you start from a vertex v and start connecting the other vertices to it in a manner which costs the least. So, for any other vertex u you connect to the connected component you are growing with Prim's algorithm(i.e. the one that includes vertex v), although there may exist(I think) a vertex w that can reach u in a shorter distance, there is no shorter way of reaching to u from v, as Prim's algorithm dictate that you extend the connected component you start from by going to whichever node is the cheapest to add.

Consequently, as there is no shorter way of reaching from v to u, there must be at least 1 edge common in MST generated by starting from v and the shortest path tree of v.

Even if the roots of the node of MST(say, rootA) and shortest path tree(say, rootB) differ, while building MST, Prim's algorithm should reach rootB using an edge that is on the shortest path from rootB to rootA on the shortest path tree, as by its definition the shortest path tree should help rootB reach rootA in the shortest way possible.