Solve the following recurrence equation using the characteristic equation.
$T(n)=2T(\frac{n}3)+\log_{3}n$ for $n>1$, $n$ a power of $3$
$T(1)=1$
I'm not quite sure I understand exactly what to do here. I've done this much on my own
Let $n=3^k$, $k=\log_{3}n$ $T(3^k)=2T(\frac{3^k}{3})+k$
$T(3^k)=2T(3^{k-1})+k$
Let $t_{k}=T(3^k)$
$t_{k}=2t_{k-1}+k$
But that's as far as I can get. After that, I'm completely lost. Even when I'm trying to follow the example in the book, it seems like either a lot of intermediate steps are skipped or the example doesn't fit my question. Any assistance would be appreciated.
You have $t_k - 2t_{k-1} = k$ with the condition $t_0 = 1$ (why?)
The characteristic equation would have been $x-2 = 0$ if the equation was homogeneous (i.e. RHS was $0$). This would have given us the solution $t_k = a 2^k$. However given that there is a linear function in the RHS, we should explore solutions of form $t_k = a 2^k + (bk + c)$.
Substitute in the recurrence and see if we can find values for $b, c$ s.t. the recurrence holds for all $k$. Then use the initial condition to find $a$...