I am looking for some feedback/guidance on how to solve this recurrence relation.
$\mathit f(n)$ = $\mathit f \left( \frac n 2 \right) +1$ where $\mathit n=2^{k}$, $\mathit k = 1, 2, 3 . . . $ and $\mathit f(1) = 1$
So far this is what I have, but I am not sure if it is correct. Any hints would be greatly appreciated.
$\mathit f(n)$ = $\mathit f \left( \frac n 2 \right) +1$, $\mathit n=2^{k}$, $\mathit k = 1, 2, 3 . . . $ and $\mathit f(1) = 1$
$\mathit n=2^{k}, n = 2, 4, 8, 16 . . . $
$\mathit f(2)=f(1)+1=1+1=2, k=1, n=2$
$\mathit f(4) = f(2)+1=2+1=3, k=2, n=4$
Thus we can observe that for any value $\mathit k$, we have $\mathit f(n)$ always being $\mathit +1$ greater than $\mathit k$, and thus $\mathit f(n) = k+1$.
Thanks for the help!