Introduction to algorithms: Minimum Spanning Tree P (353) for sparse graphs)

Source: Internet
Author: User

You just don't have the patience to read .....

 

 

Let's talk about simple understanding, MST-REDUCE preprocessing, for each node u, if u is not in any set, find the edge e (u, v), where W (u, v) is the smallest, that is, finding the shortest edge connected to U and adding U and V to a collection, that is, shrinking the edge U-V, merge the two vertices into one vertex. In this way, each vertex is processed, and a new vertex is formed. Of course, the scaled edge must be the edge in the Minimum Spanning Tree, this and the Kruskal algorithm is an idea, but the MST-REDUCE is to get a new graph, the number of nodes in this graph V '. v' <v/2.

Then enumerate each edge. If this edge is connected to a set of two different points, select the shorter side as the edge connecting the two points set, that is, in the new graph, the link is reduced to the edge between the point set of a point... too much nonsense .. that is, the edge of the New Graph...

After talking about this for a long time, we seem to be talking about the Kruskal algorithm. But the difference is that the above processing results in a new figure .......

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.