Consider an undirected graph G = (V, E) with an injective cost function c: E → N. Suppose T is a minimum spanning tree of G for cost function c. If we replace each edge cost c(e), e ∈ E, with cost c'(e) = c(e)2 for G, is T still a minimum spanning tree of G? Briefly justify your answer.
YES. The MST of G will not change as all the edges belong to the set of Natural numbers and suppose, if we square the set of sorted natural numbers, then the set will again be sorted.
Example: Suppose we have a set of Natural Numbers, {1,2,3,4,5,6}, if we square each entry of this set, then the set becomes {1,4,9,16,25,36}, which is again sorted, hence, the MST is not bound to change.
But the MST can change if our graph contains negative weights. For example, refer to the image below:
Get Answers For Free
Most questions answered within 1 hours.