Also $T(1)=\cdots =T(10)=1$. We need to show that there exists $n_0\in\mathbb{N}$ and a positive real number $c$ such that for all $n\geq n_0$, $T(n)\leq cn$. Here $[x]$ denotes the largest integer not greater than $x$.
Asked
Active
Viewed 70 times
-1
-
@MartinR It does answer the question. However the answer provided by Brian Moehring is more elegant and much shorter, in my opinion, than the answers in the link. – Ryszard Szwarc May 26 '24 at 18:24
2 Answers
4
Note that $$\frac{T(n)}{n} = \frac{T([n/10])}{n/10} + \frac1{\sqrt{n}} \leq \frac{T([n/10])}{[n/10]} + \frac1{\sqrt{10^{[\log_{10}n]}}},$$
so that we may inductively show $$\frac{T(n)}n \leq \sum_{k=0}^{[\log_{10}n]} \frac1{\sqrt{10^k}} \leq \sum_{k=0}^\infty \frac1{(\sqrt{10})^k} = \frac{\sqrt{10}}{\sqrt{10}-1}.$$
Note: If you consider the $n = 10^N$ for natural $N$, then every $\leq$ except the last one becomes an equality, which shows that the constant found here is the lowest possible.
Brian Moehring
- 24,014
1
By Akra-Bazzi we have $$T(x) \in \Theta\left(x \left(1 + \int_1^x\frac{\sqrt{u}}{u^2}\,\mathrm{d}u\right)\right) = \Theta\left(x \left(3 - \frac{2}{\sqrt{x}}\right)\right) = \Theta(x)\,.$$