in Algorithms
847 views
1 vote
1 vote
Assuming that the graph can contain repeated edge weights, we have a single tree at any instance when applying Prim's algorithm.

Justify this statement.
in Algorithms
847 views

4 Comments

I think the question meant to ask for connectedness! thanks
0
0

@just_bhavana, consider the following line carefully

we have a single tree at any instance when applying Prim's algorithm.

Keyword - at any instance

According to CLRS - "Prims Algorithm will always generate connected tree at any instance of time during the process of generation of MST but Kruskal may give forest(a collection of disconnected trees) or a single tree" 

1
1
yes, got it. Thanks @Shubhanshu
0
0

Please log in or register to answer this question.

Related questions