Question: Let T be any binary tree with leaves S1, ..., Sl. Let W1, ..., We E R be an assignment of weights such that si

 Let T be any binary tree with leaves S1, ..., Sl.

Let T be any binary tree with leaves S1, ..., Sl. Let W1, ..., We E R be an assignment of weights such that si receives weight Wi. For non-leaf vertices, we iteratively define the weight of a vertex to be the sum of the weights of their children. (See below for an example.) Prove that the average weighted depth of T is equal to the sum of the weights of non-leaf vertices of T. wi + W2+W3 + 24 + 25 + w6+ 27 W1 + W2 + W3 W4+ W5 + W6 + W7 W1 + W2 W3 W5 + w6+w7 W4 W6 + W7 W1 W2 W3 W5 W6 W7 (Note: Your proof must apply for all binary trees, not just the example given.)

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!