Recurrence Relation $T_n=\sum_{r=0}^{n-1} T_r+2^n$

178 Views Asked by At

From a recent solution I posted here, working from an alternative path would have led to the following recurrence relation which involves a summation term:

$$T_n=\sum_{r=0}^{n-1}T_r+2^n; \qquad T_0=1\qquad (n>1)$$ How can this be solved?

Edit 3 (replaces previous edits) Initial condition is $T_0=1$. For the problem as stated, $T_1=3$ (not $4$) and does not need to be specified as an initial condition. This is actually different from the previous problem, which would have resulted in $T_n=\sum_{r=0}^{n-1}+2^{n+1}-1$.


For clarification

For the previous problem that I referred to here, the recurrence relatioships, the first two terms, and the closed form solution are as follows: $$T_n=2T_{n-1}+\color{blue}{2^n}\\ T_n=\sum_{r=0}^{n-1}T_r+\color{blue}{2^{n+1}-1}\\ T_0=1, T_1=\color{blue}4\\ T_n=(\color{blue}n+1)2^n$$

For the present problem as posted here, the recurrence relatioships, the first two terms, and the closed form solution are as follows: $$T_n=2T_{n-1}+\color{red}{2^{n-1}}\\ T_n=\sum_{r=0}^{n-1}T_r+\color{red}{2^n}\\ T_0=1, T_1=\color{red}3\\ T_n=(\color{red}{\frac n2}+1)2^n$$

3

There are 3 best solutions below

4
On BEST ANSWER

We have $$T_{n+1}-T_{n}=\left(\sum_{r=0}^{n}T_r+2^{n+1}\right)-\left(\sum_{r=0}^{n-1}T_r+2^n\right)=T_n+2^{n+1}-2^n,$$ i.e. $$T_{n+1}=2T_n+2^n$$ for $n\ge 2$. Dividing the both sides by $2^{n+1}$ gives $$\frac{T_{n+1}}{2^{n+1}}=\frac{T_n}{2^n}+\frac 12,$$ i.e. $$U_{n+1}=U_n+\frac 12\quad\quad (n\ge 2)$$ where $U_n=\frac{T_n}{2^n}$ which should be easy to deal with.

5
On

Put $S_n=\sum_1^n T_r$. Then $T_n=S_n-S_{n-1}=S_{n-1}+2^n$. A particular solution of the recurrence for $S_n$ is $n2^n$. The general solution is $S_n=n2^n+a2^n$, $a $ a constant.It is easy to finish.

0
On

Use generating functions. Define $T(z) = \sum_{n \ge 0} T_n z^n$, adjust indices in the recurrence:

$\begin{align} T_{n + 1} = \sum_{0 \le r \le n} T_r + 2 \cdot 2^r \end{align}$

Multiply by $z^n$ and sum over $n \ge 0$, recognize some sums in the result:

$\begin{align} \frac{T(z) - T_0}{z} = \frac{T(z)}{1 - z} + \frac{2}{1 - 2 z} \end{align}$

Plug in $T_0 = 1$, solve for $T(z)$ as partial fractions:

$\begin{align} T(z) &= \frac{1 - z}{1 - 4 z + 4 z^2} \\ &= \frac{1 - z}{(1 - 2 z)^2} \\ &= \frac{1}{2 (1 - 2 z)^2} + \frac{1}{2 (1 - 2 z)} \end{align}$

Using the binomial theorem and a geometric series:

$\begin{align} T_n &= \frac{1}{2} \cdot (-1)^n \binom{-2}{n} \cdot 2^n + \frac{1}{2} \cdot 2^n \\ &= \frac{1}{2} \binom{n + 2 - 1}{2 - 1} \cdot 2^n + \frac{1}{2} \cdot 2^n \\ &= (n + 2) \cdot 2^{n - 1} \end{align}$