Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Given the following recurrence equation:

$T(n)=T\left(\dfrac{n-1}{2}\right)+2$ , $T(1)=0$

How would you set this equation up in order to allow you to solve it using telescoping?

Thanks in advance.

share|improve this question

2 Answers 2

$T(n)=T\left(\dfrac{n-1}{2}\right)+2$

$T(2^n-1)=T\left(\dfrac{2^n-2}{2}\right)+2$

$T(2^n-1)=T(2^{n-1}-1)+2$

$T(2^n-1)=2n+C$

$T(n)=2\log_2(n+1)+C$

$T(1)=0$ :

$2+C=0$

$C=-2$

$\therefore T(n)=2\log_2(n+1)-2$

share|improve this answer
    
How did you get from $T(2^n-1)=T(2^{n-1}-1)+2$ to $T(n)=2\log_2(n+1)+C$? Thanks! –  David Faux Feb 2 at 8:30

$T_1=0$

$T_3=T_1+2$

$T_7=T_3+2$

$T_{15}=T_7+2$

$...$

$T_{2^n-1}=T_{2^{n-1}-1}+2$

Sum up all these, you'll get what you want.

For those $T_k$, which $k$ can't be expressed as the form $2^n-1$ where $n\in\mathbb N$, are not defined.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.