G
is an undirected connected graph with positive costs on all edges. Given is edge e
whose cost is strictly more than 10. We need to answer whether the MST cost will improve if the cost of e
is reduced by 10.
I know of a solution that involves generating a new graph with only edges with cost<cost(e)-10
. What's wrong with this much simpler solution:
Take one of e
's vertices v
. Find the minimal cost edge incident to v
. Now reduce e
's cost and find the minimal cost edge incident to v
again. If there was a change, it means that prim
would find a better MST and the cost is improved. If not, it means that prim would find the same MST and the cost stays the same.
What's wrong with this logic?
related to Update minimum spanning tree with modification of edge