Minimum spanning tree with degree limits

Source: Internet
Author: User

concept : In an no-map, The smallest spanning tree that is found when a particular point is limited to a condition that must be K degrees.


some elaborated :

[ about Letters ] :

set the edge set to e , special point is v0 , minimum limit spanning tree is d .

Hi represents V0 the degree is I the minimum spanning tree.

[ about Operations ] :

Delete add: Add a vertex to the tree V0 The point in the formed ring, delete the other V0 The associated edge.

Maximum deletion: Remove the largest one in the ring when adding V0 The associated edge.

Maximum difference: The maximum of the added edge and the maximum value of the deletion added.


principle : See Black Book p300-p303.

proved somewhat complex, so skipped the proof to get theorem one:

ifTto beV1 ... Vnthe smallest spanning tree, if the edge(I,J)does not belong toT, you(I,J)does not belong toD.


This greatly reduces the range of edges you select.


Theorem Two:

H1 to be T on the basis of adding a shortest (V0,VI)

H1 can be done by k-1 Minor Difference Minimum delete add operation obtained Hk .


this will facilitate our H1 gradually pushed to Hk


Specific steps :

1 . find V1 ... for all connected blocks of Vn, the smallest spanning tree of each connected block is obtained .

2. selects a minimum and connected side [ if the number of blocks t>k Span style= "font-family: Founder su new poetry Liu Yu simplified;" > no solution ] , thus getting ht .

3.fori=t+1 to K

through Hi-1 To Add and remove an edge by adding and removing the "minimum difference" Hi .

where the difference is minimized the optimization of the addition operation can be used: MakeMaxirepresentsVito theV0the maximum edge on the path, then connect the(V0,VI)the price isf (Vi) =w (v0,vi)-maxi, allf (Vi)the minimum value in the difference is the least-added operation.

Maxithe preprocessing needsO (n)fromV0StartDFS, each time you choose a(V0,VI)then you need to start fromViOne more run, too.O (n)the.

4. Output Answer

Topic Practice : Poj Picnic planning Picnic Plan

Haven't hit the code yet ... Not to be continued

Minimum spanning tree with degree limits

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.