Question: (20 points) In this problem, we consider completely full binary trees with N nodes and height H (so that N = 2 H+1 1 )

(20 points) In this problem, we consider completely full binary trees with N nodes and height H (so that N = 2H+1 1 ) (a) (5 points) Show that the sum of the heights of all of the nodes of such a tree can be expressed as (20 points) In this problem, we consider completely full binary trees with

(b) (15 points) Prove by induction on H that the above sum of the heights of the nodes is N - H - 1. You may base your proof on the summation from part (a) (so you don't need to refer to trees at all), or you may do our "standard" binary tree induction based on the subtrees (using the definition that a non-empty binary tree has a root plus left and right subtrees). We find the tree approach more straightforward, but you may use the summation if you prefer.

H-k C TM k=0

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!