Solve the following recurrence relation using recurrence tree and iteration methods
T(n) = T(n-1) + n
recurrence tree
t(n) n
t(n-1) n-1
t(n-2) n-2
...
t(1) 1
t(n)=∑i=1ni=n(n+1)2t(n)=\sum\limits_{i=1}^n i=\frac{n(n+1)}{2}t(n)=i=1∑ni=2n(n+1)
iteration methods
t(n)=n+t(n−1)=n+(n−1)+t(n−2)=...=∑i=1ni=n(n+1)2t(n)=n+t(n-1)=n+(n-1)+t(n-2)=...=\sum\limits_{i=1}^{n}i=\frac{n(n+1)}{2}t(n)=n+t(n−1)=n+(n−1)+t(n−2)=...=i=1∑ni=2n(n+1)
Need a fast expert's response?
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!
Comments