Unformatted text preview: n order of
depth starting from the deepest node, calculating the size of the full subtree rooted at each node. 5 Stop once a subtree
with size � to is found. Cut the single edge connecting this subtree to the rest of the tree. �� � The only point to prove is that we will always ﬁnd a subtree of the correct size. Assume for the sake of contradiction
. If is
that the smallest subtree with a size at least � that we can ﬁnd is rooted at a node and has a size of
). If has � child � , then the subtree
a leaf, then we are done, because the size of the tree rooted at is � (and � �
rooted at � has size � �, which is better. Suppose instead that has two children � and � . Then the size of is one
more than the sum of the sizes of � and � . Thus, the sum of the sizes of the two subtrees is at most , and it follows
that one of the subtrees must be at least �, which generates a contradiction. �� � 4 not
5 For � � �
�� � � �� � �
� � � �...
View Full Document
This document was uploaded on 03/20/2014 for the course EECS 6.896 at MIT.
- Spring '07