Therefore, Prim s algorithm operates much like Dijkstra s algorithm for finding shortest paths in a graph. Prim s algorithm has the property that the edges in the set S always form a single tree. This strategy is greedy because the tree is augmented at each step with an edge that contributes the minimum amount possible to the tree s weight. The same proof shown in Kruskal s algorithm can be used in the proof of correctness of the Prim s algorithm. It is a contradiction.
Answer is yes .