Graph algorithm, approximation algorithm

After removing the leaves of the dfs tree of a random graph, suppose that the number of remaining edges is | S |, we can prove that the comparison for this graph will be | S | / 2?

+3
source share
1 answer

Here is the proof.

Theorem. Let T- any tree with leaves i. There Tis a correspondence (|T|-i)/2.

Proof: by induction. If it Tis a tree with leaves i, let it be T'a tree that is obtained by removing all leaves from T. T'has j <= i. Similarly, let there T''be a tree that is obtained by removing all leaves from T'. T''has k <= j.

Apply the theorem by induction to T'', so there is a size comparison (|T''|-k)/2 = (|T|-i-j-k)/2in T''. The set of edges T-T'contains at least jedges that do not fall into any edge in T''or to each other (select one incident for each sheet in T'), so add these edges to make a match in Tsize (|T|-i+j-k)/2. Since j >= k, these are no less than (|T|-i)/2ribs. Q.E.D.

/ /2, , , .

+2

Source: https://habr.com/ru/post/1788116/


All Articles