Question: Define the internal path length, I(T), of a tree T to be the sum of the depths of all the internal nodes in T. Likewise,

Define the internal path length, I(T), of a tree T to be the sum of the depths of all the internal nodes in T. Likewise, define the external path length, E(T), of a tree T to be the sum of the depths of all the external nodes in T. Show that if T is a binary tree with n internal nodes, then E(T) = I(T)+2n.

Step by Step Solution

3.37 Rating (169 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Proof by induction on the number of internal nodes n Base ca... View full answer

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 Data Structures Algorithms Questions!