Current location - Training Enrollment Network - Mathematics courses - What is the weight in discrete mathematics?
What is the weight in discrete mathematics?
Kruskar algorithm for finding minimum spanning tree;

① connected weighted connected graph g =

② The two edges with the smallest weight constitute the edge set T0, that is, T0={e 1, e2}. Starting from e3, each edge is added to the set T0 one by one. If there is a cycle, the edge is excluded (not added), and this method is continued until em, and finally the set t0 of n- 1 edges is obtained = {e1.