The second smallest spanning tree algorithm (unfinished)

  It refers to small times spanning a minimum spanning tree, in addition to a small second spanning tree, so it is derived in the minimum spanning tree algorithm. First, after obtaining the minimum spanning tree, if we want to add the outer side of a tree, which would form a closed loop, then the biggest of the closed loop

Edge deletion, then the rest is still a tree, if the tree <= minimum spanning tree, then it is the second smallest spanning tree.

  If we want to increase the edge, then certainly the plus side of the tree outside, this with an array of tags on the line, then we have to find the maximum value side of the closed loop,

1. secondprim algorithm

 

Guess you like

Origin www.cnblogs.com/mzchuan/p/11828010.html