Question: (30 pt) Given an undirected weighted graph G with n nodes and m edges, and we have used Prim's algorithm to construct a minimum spanning

 (30 pt) Given an undirected weighted graph G with n nodes

(30 pt) Given an undirected weighted graph G with n nodes and m edges, and we have used Prim's algorithm to construct a minimum spanning tree T. Suppose the weight of one of the tree edge ((u,v)T) is changed from w to w, design an algorithm to verify whether T is still a minimum spanning tree. Your algorithm should run in O(m) time, and explain why your algorithm is correct. You can assume all the weights are distinct. (Hint: When an edge is removed, nodes of T will break into two groups. Which edge should we choose in the cut of these two groups?)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!