Click to See Complete Forum and Search --> : Mst
shekabdulla
November 18th, 2005, 05:36 AM
hi friends,
i want to convert a MST obtained by Kruskal's algorithm to a rooted tree,
and count number of descendants of every vertex.any arbitrary vertex can be taken as a root vertex.
thanks in advance
Wenter
November 19th, 2005, 05:09 AM
That tree as you told in your post's last statement turns out to be an unrooted tree, Kruskal algorithm is not the most optimized one for MST, i guess.Plus, if you want to count vertex, why not delve into the Kruskal with reference counter iterated and that you might want to again take a look at journals, recent research papers out there should shed some more light on what you are trying to accomplish.
savlord
December 26th, 2005, 02:51 AM
Undirected and acyclic, I hope. Would this work? - Assume any leaf of the MST as the root. Then do a depth first search, constructing the tree as you go down. The number of descendants should be simple after that.
Andreas Masur
December 26th, 2005, 08:33 AM
[ Moved thread ]
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.