An old MST method, called Bar °uvka’s algorithm, works as follows on a graph
G having n vertices and m edges with distinct weights:
Let T be a subgraph of G initially containing just the vertices in V.
while T has fewer than n−1 edges do
for each connected componentCi of T do
Find the lowest-weight edge (u,v) in E with u in Ci and v not in Ci.
Add (u,v) to T (unless it is already in T).
return T
Prove that this algorithm is correct and that it runs in O(mlogn) time.
Sorry the answer is not available at the moment…
If you are able to find the answer, please make sure to post it here. So that your Juniors have smile on their lips and feel happy.
Spread the 'tradition of sharing'.