How do minimal tree generators work?

  • Context: Undergrad 
  • Thread starter Thread starter esmeco
  • Start date Start date
  • Tags Tags
    Generators Tree
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
2 replies · 2K views
esmeco
Messages
144
Reaction score
0
I was wondering,could someone explain me how do minimal tree generators work?
 
Mathematics news on Phys.org
Is this a Graph Theory or discrete math topic? Is it the minimal tree of the entire graph or connected to some node? mathworld.com

either way its about having 2 sets...the set of Remaining Nodes A and the set of nodes you have visited B. The idea is to move nodes in A to B. The algorithm will always start off with the minimal edge(one with the smallest weight). From there you iterate till no more nodes can be connected to B or A is empty. The criteria for moving a node from A to B is simply the minimal edge that connects A to B.
 
Kruskal's algorithm works differently, starting with no edges and continuing to add the smallest-weight edge that does not form a cycle.