To get Minimum Spanning Tree with 0 as leaf node, we must first remove node 0 from the graph. Then we must find MST for the remaining graph and then join 0 to the obtained MST with minimum weight edge. Well this was somewhat obvious.
But how to solve it in most efficient way? We should not draw the graph and then look for MST, it will take lot of time. Instead we should make use of the given weight matrix to find the MST, as shown below:
As node 0 is removed, we won't consider 0th row and 0th column.
Now, list down edges in increasing order of their weight:
(3-4) => 2, (2-4) => 3, (1-3) => 4, (2,3) => 7 and so on..
To get MST, we must form edges in the above increasing order such that there is no cycle until all vertices are covered.
Joining node 0 to the MST with minimum edge weight.
So minimum possible weight = 2+3+4+1 = 10