Artificial intelligent assistant

Does the Prim algorith always create the same tree despite the starting node? Does the Prim algorith always create the same tree despite the starting node? PD: sorry for my english.

When the weights are all different, the minimum spanning tree is unique. So, in this case, yes. In the general case, it depends on how you break ties.

Try Prim's algorithm on the vertices and edges of a square to see what happens with ties.

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy 856bda4435dd19d5ff046c37ac9a722c