Suppose $T$ is a complete binary tree with $n$ leaves Let $e$ denote the sum of the lengths of the leaves, $i$ denote the sum of lengths of the internal nodes. Prove that $e=i+2(n-1)$.
My attempt: Consider a complete binary tree. If we look at some node we can have two cases:
Case 1: only a single node
Case 2:from the node below we have a complete binary tree
If we have only a single node "tree", we get $0=0$. Because of Case 2, we need to show that for any binary tree $e=i+2(n-1)$ holds if it holds for every one of the subtrees of the root. But I do not know how to do that.
Edit: I have been thinking of partitioning a tree into its right subtree and left subtree (and its root). For better overview I will denote the sum of the lenghts of the leaves of a tree $T$ with $e_T$ from here on and the sum of the lengths of the internal nodes with $i_T$, $n_T$ is the number of leaves of $T$.
I got the following equations $e_L=\frac{e_T}{2}-n_L$ $e_R=\frac{e_R}{2}-n_R$ and $e_T=e_R+E_L+2$. and $i_L+i_R=i_T-2$.
How do I continue from here on?