Prim’s algorithm may informally be described as performing the following steps:
-
Initialize a tree with a single vertex, chosen arbitrarily from the graph.
-
Grow the tree by one edge: of the edges that connect the tree to vertices not yet in the tree, find the minimum-weight edge, and transfer it to the tree.
-
Repeat step 2 (until all vertices are in the tree) Here we have to start with vertex a so first edge must be (a,b) next either ( b.c) or (a,h) {hence option B,D are out if we go with (b,c) then next must be (c,i) followed by (c,f) (f,g) then (g,h) and (c,d) and (d,e) which is option C) hence it is correct ans
if we go with (a,h) next must be (h,g) or (g,h) as in option A hence is also correct (although order is changed)
Both A, C are correct as per offiical key