What property of the graph will result in prim's and kruskal's algorithm giving different minimum spanning tree's?
Please help.
This is a discussion on Prim's Kruskal Algorithm within the C Programming forums, part of the General Programming Boards category; What property of the graph will result in prim's and kruskal's algorithm giving different minimum spanning tree's? Please help....
What property of the graph will result in prim's and kruskal's algorithm giving different minimum spanning tree's?
Please help.
I believe that if the graph allows for negative weights, then the two algorithms will produce different results.
are you sure that the algorithm runs for graph's containing negative edge's?
Prim's algorithm cannot handle negative edges. Kruskal, OTOH, doesn't care.
For information on how to enable C++11 on your compiler, look here.
よく聞くがいい!私は天才だからね! ^_^
can Prim’s yieeld different MST’s dependiing on which verteex was set as the startting point?
Do you have a theory? Have you thought about the question?
For information on how to enable C++11 on your compiler, look here.
よく聞くがいい!私は天才だからね! ^_^
I am asking if you have put any thought to the question. For example, have you tried to think what happens if you changed the starting point? Have you tried doing an experiment by writing down on a paper or some such?
Why do you think it won't change?
For information on how to enable C++11 on your compiler, look here.
よく聞くがいい!私は天才だからね! ^_^
i think the edges in the graph can change but the total edge cost cannot change. Any don't agree?