Ex 5_22 Here we give a new minimum spanning tree algorithm based on the following properties ... _ Nineth time job

Source: Internet
Author: User

(a) The set of vertices of the ring is V, E (u,v) is the most weighted edge, if the V is divided into two parts v1,v2. Where V1 contains u,v2 contains V, because V is a ring, there are at least two edges that connect U and v. Therefore, in addition to E, there is at least one other side that connects U and V, so there must be a minimum spanning tree that does not contain E.

(b) Each time the algorithm deletes the most important edge of the ring, the property of the problem indicates that the algorithm is correct.

(c) Jotu is a connected graph, then the depth-first traversal can be used to generate a depth-first search tree with all the vertices. If the graph is not a connected graph, the depth-first traversal is not used to access all vertices. So the two vertices of e are u,v. First assume that e does not exist, and then do a depth-first traversal from U, and if you can reach V it proves that there is a ring between U and V.

(d) A depth-first traversal algorithm is to be made for each edge, so the total elapsed time of the algorithm is

Ex 5_22 Here we give a new minimum spanning tree algorithm based on the following properties ... _ Nineth time job

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.