I was reading dynamic programming chapter from famous book Introduction To Algorithm
In rod cutting problem it gives simple algorithm as follows:
cutRod(p,n)
{
if (n == 0)
{
return 0
}
q = -∞
for (i=1 to n)
{
q = max(q,p[i]+cutRod(p,n-i))
}
return q
}
It then says:
T(n)
be the total number of calls made tocutRod()
when called with its second parameter equal to n. T(n) equals the number of nodes in a subtree whose root is labeled n in the recursion tree. The count includes the initial call at its root. Thus,
T(0) = 1 and
T(n) = ${\sum\limits_{j=0}^{n-1} T(j)}$
Exercise at the end of this chapters asks to prove from above two that in fact
T(n) = 2$^n$
How can we go about proving this?