recurrence relation and sigma notation

103 Views Asked by At

Can anyone help me and explain with sigma notation rules how does this equation solved

The problem for me that $T(i)$ and $T(i-1)$ are inside sigma notation(not i) so i am confused. Please anyone show me how is it calculated ?

enter image description here

1

There are 1 best solutions below

0
On

$$ \forall n\in\mathbb{N}, n>1,T(n)=\sum\limits_{i=1}^{n-1}(T(i)+T(i-1)+c)\\ \forall n>2, T(n-1)=\sum\limits_{i=1}^{n-2}(T(i)+T(i-1)+c) $$ Now: $$ \begin{align} T(n)&=\sum\limits_{i=1}^{n-1}(T(i)+T(i-1)+c)\\ &=T(n-1)+T(n-2)+c+\underbrace{\sum\limits_{i=1}^{n-2}(T(i)+T(i-1)+c)}_{=T(n-1)}\\ &=T(n-1)+T(n-2)+c+T(n-1)\\ &=2T(n-1)+T(n-2)+c \end{align} $$