Let $f(N)$ be the average number of full nodes (nodes with two children) in an $N$-node binary search tree.
Determine the values of $f(0)$ and $f(1)$.
Given that for $N > 1$,
$\qquad \displaystyle f(N) = \frac{N-2}{N} + \frac{1}{N} \sum_{i=0}^{N-1} [f(i) + f(N - i - 1)]$,
show that $f(N) = \frac{N - 2}{3}$.
Using this information, show that the average number of nodes with one child in a binary search tree is $\frac{N + 1}{3}$.
I know that for (1) both values are $0$. I mainly need help proving (2). I also found some hints for (2) and (3) but I can't figure it out:
(2) The root contributes $\frac{N − 2}{N}$ full nodes on average, because the root is full as long as it does not contain the largest or smallest item. The remainder of the equation is the expected contribution of the subtrees.
(3) The average number of leaves is $\frac{N + 1}{3}$.
Any help would be appreciated, even just pointing me in the right direction. Thanks!