Proof by induction when upper bound isn't $n$

373 Views Asked by At

I'm new to doing proofs by induction and am having trouble. I am wondering if a sum having an upper bound not equal to $n$ changes the problem. The initial is

$$\sum_{i=0}^{n-1} \frac{i}{2^i} = 2 - \frac{n+1}{2^{n-1}}$$

I can do the base case where $n = 1$. However, because of the bound, I'm not sure what to do next. I'm not sure what to do with the bounds because when I did

$$2 - \frac{k+1}{2^{k-1}}+\frac{k+1}{2^{k+1}}$$

which is $\sum_{i=0}^{k-1} \frac{i}{2^i}$ + $P(k+1)$ I ended up with $$2 - \frac{{(k+1)}{(2^{k+1}+2^{k-1}})}{2^{2k}}$$ which I cannot figure out how to use to solve the proof, and I'm not confident that it's correct.

Since the bound ends at $k-1$, not $k$, should I set up the second part as $$2 - \frac{k+1}{2^{k-1}}+\frac{k}{2^{k}}?$$

2

There are 2 best solutions below

2
On BEST ANSWER

\begin{align} \sum_{i\le n}\frac{i}{2^i}&=\sum_{i\le n-1}\frac{i}{2^i}+\frac{n}{2^n} \\ &=\left(2-\frac{n+1}{2^{n-1}}\right)+\frac{n}{2^n} \\ &=2-\frac{2n+2}{2^{n}}+\frac{n}{2^n} \\ &=2-\frac{n+2}{2^{n}}. \end{align}

0
On

Let $f(n)=\sum_{i=0}^{n-1}(\frac {i}{2^i})$ and $g(n)=2-\frac {n+1}{2^{n-1}}.$ $$\text {We have }\quad f(n+1)-f(n)=\frac {n}{2^n}......(A).$$ $$\text { We have }\quad g(n+1)-g(n)=\left(2-\frac {n+2}{2^n}\right)-\left(2-\frac {n+1}{2^{n-1}}\right)=$$ $$=\left(-\frac {n+2}{2^n}\right)+\left(\frac {n+1}{2^{n-1}}\right)=$$ $$=\left(-\frac {n+2}{2^n}\right)+\left(\frac {2n+2}{2^n}\right)=$$ $$=\frac {n}{2^n}......(B).$$ From $(A)$ and $(B)$ we have $f(n+1)-f(n)=g(n+1)-g(n)$ for every $n.$ So if $f(n)=g(n)$ then $$f(n+1)=(f(n+1)-f(n))+f(n)=$$ $$=(g(n+1)-g(n))+f(n)=$$ $$=(g(n+1)-g(n))+g(n)=g(n+1).$$ So, by induction, $f(1)=g(1)$ implies that $f(n)=g(n)$ for every $n,$ and we do indeed have $f(1)=g(1)=0.$

This method is applicable to a wide variety of problems.