Solve $T(n)=T(n-2)+\frac{1}{\log(n)}$ for $T(n)$.
I am getting the answer as $O(n)$ by treating $1/\log(n)$ as $O(1)$. The recursive call tree of this is a lop-sided tree of height $n$. Hence, considering the amount of work done in each step, the answer comes out to be $O(n)$. Please verify my answer, and tell me if I am correct.
And if that is the case then the inequality is wrong. Also, I did not understand that how you arrived at this equation.
– V K Jun 01 '20 at 04:51$\frac12\int_8^n\frac{\mathrm{d}x}{\log(x)} \le\int_8^n \frac{(1)}{\log(x)} -\frac{(1)}{\log(x)^2 }\mathrm{d}x$
If we solve this inequality further we will get that[I ingnored the integrals, solving the term inside it]:
$$ -\frac12 \frac{1}{\log(x)} \le -\frac{1}{\log(x)^2} \tag{a}$$ $$ \frac12 \frac{1}{\log(x)} \ge \frac{1}{\log(x)} \tag{b}$$
which is not true. So, what is it that I am doing wrong here?
– V K Jun 02 '20 at 05:01