Recurrence Relations, finding f(n)

ramenmeal
Messages
4
Reaction score
0

Homework Statement


Find f(n) when n = 2^k, where f satisfies the recurrence realtion f(n) = f(n/2) +1 with f(1) = 1

Homework Equations


f(n) = a*f(n/b) + c
when n = b^k, where k is a positive integer,
f(n) = C1n^(log a base b) + C2

C1 = f(1) +c/( a-1) and C2 = -c/ (a-1)

keep in mind i may be trying to use the wrong equation...

The Attempt at a Solution



a =1, b = 2, c = 1

then C1 = 1+ 1/0 and C2 = -1/0

i'm not sure what i can do from here... c1 and c2 both include undefined #'s

perhaps I'm not even approaching the problem correctly?
 
Physics news on Phys.org
Hi,
Now I am not sure if I understood it correctly, but it seems to be much simpler:
if n = 2^k and f(n) = f(n/2) + 1
f(n) = f(2^k) = f(2^(k-1)) + 1 = ... = f(2^(k-j)) + j

Now, the answer should be obvious.
 
I would start by calculating some values. f(20)= f(1)= 1, f(21)= f(2)= f(1)+ 1= 2, f(22)= f(4)= f(2)+ 1= 3, f(23)= f(8)= f(4)+1= 4, f(24)= f(16)= f(8)+ 1= 5. Looks obvious to me. Of course, you still have to prove that obvious "guess". Proof by induction should work.
 
Prove $$\int\limits_0^{\sqrt2/4}\frac{1}{\sqrt{x-x^2}}\arcsin\sqrt{\frac{(x-1)\left(x-1+x\sqrt{9-16x}\right)}{1-2x}} \, \mathrm dx = \frac{\pi^2}{8}.$$ Let $$I = \int\limits_0^{\sqrt 2 / 4}\frac{1}{\sqrt{x-x^2}}\arcsin\sqrt{\frac{(x-1)\left(x-1+x\sqrt{9-16x}\right)}{1-2x}} \, \mathrm dx. \tag{1}$$ The representation integral of ##\arcsin## is $$\arcsin u = \int\limits_{0}^{1} \frac{\mathrm dt}{\sqrt{1-t^2}}, \qquad 0 \leqslant u \leqslant 1.$$ Plugging identity above into ##(1)## with ##u...
Back
Top