Let G be a graph with n vertices and m edges; that the weight of any edge e is equal to W (e); and that P is a tree with a minimum weight on G that weighs the cost (W, P).
Let δ = be the minimum positive difference between any two edge weights. (If all the weights of the edges are the same, then δ is indeterminate, but in this case any ST is MST, so it does not matter.) Take ε such that δ> n · ε> 0.
Create a new weight function U () with U (e) = W (e) + ε when e is in P, otherwise U (e) = W (e). Compute Q, MST of the group G under U. If Cost (U, Q) <Cost (U, P), then Q ≠ P. But Cost (W, Q) = Cost (W, P) by construction of δ and ε. Therefore, P and Q are different MSTs of G under W. If Cost (U, Q) ≥ Cost (U, P), then Q = P and different MSTs of G under W do not exist.
The method above determines if there are at least two different MSTs in time O (h (n, m)) if O (h (n, m)) limits the time spent by the MST of G.
I do not know if a similar method can handle the presence of three (or more) different MSTs; its simple extensions fall into simple counterexamples.
James Waldby - jwpat7
source share