Given the weighted graph Execute Prims minimum spanning tree
Given the weighted graph: Execute Prim\'s minimum spanning tree algorithm starting with vertex G. List the edges and their weights in the order they are added to the tree. Also, calculate the total weight for the spanning tree.
Solution
Let\'s choose F as the Root node,then we will take FI as the next node as it has the smallest weight.From I we will take IG edge having 1 as the weight.From G we will take GH which has the weight 4.From H we will take C, which has the weight 3.From C, CD and from D, DE.To reach A we need to go to G again. So, From G we will take GA and from A, we will take AB.
Hence the weight of the spanning tree is
5+1+4+3+3+2+4+3=25
