How to find the asymptotic behavior of these sums?

125 Views Asked by At

Let $$X(n) = \displaystyle\sum_{k=1}^{n}\dfrac{1}{k}.$$ $$Y(n) = \displaystyle\sum_{k=1}^{n}k^{1/k}.$$ $$Z(n) = \displaystyle\sum_{k=1}^{n}k^{k}.$$


For the first, I don't have a formal proof but I know that $X(n)\in \cal{O}(\log n)$. For the rest, I think $Y(n)\in \cal{O}(n)$ and $Z(n)\in \cal{O}(n)$.


How to determine the asymptotic behavior of theses summations?

How to calculate the complexities with a formal proof?

2

There are 2 best solutions below

1
On BEST ANSWER

Assuming $k,n \in \mathbb{Z}_{>0}$ throughout.

X(n)

$$\ln n = \int_{1}^n \frac{\mathrm{d}x}{x} \leq \sum_{k=1}^n \frac{1}{k} \leq 1+\int_{1}^{n-1}\frac{\mathrm{d}x}{x} = 1+ \ln (n-1) < 1+\ln(n)$$

Therefore $X(n) \in O(\log n)$.

Y(n)

We find the largest possible value of the summand by finding the largest possible value of the expression as if the variable were a real number. $D_x(x^{1/x}) = 0 \implies x = \mathrm{e}^{1/\mathrm{e}} < 3/2$ and since the second derivative is negative here, this is a maximum. There is also no challenge in using the binomial theorem to show that the summands approach 1 from above as $k$ increases. We have $1 \leq k^{1/k} \leq 3/2$.

$$ (1)n \leq \sum_{k=1}^n k^{1/k} \leq (3/2) n $$

Therefore $Y(n) \in O(n)$.

Z(n)

$$n^n \leq \sum_{k=1}^n k^k \leq n^n + (n-1)(n-1)^{n-1} = n^n + (n-1)^n < 2 n^n $$

Therefore $Z(n) \in O(n^n)$.

0
On

I don't know how to use the integral test. As suggested by @Eric and others, I am trying to answer my question.

$$\begin{equation}\begin{split}1\leqslant k\leqslant n&\Leftrightarrow\dfrac{1}{n}\leqslant \dfrac{1}{k}\leqslant 1\\&\Leftrightarrow1\leqslant X(n)\leqslant n\\&\Rightarrow X(n)\in\cal{O}(n).\end{split}\end{equation}$$ which is not a tight approximation.


$$\begin{equation}\begin{split}1\leqslant k\leqslant n&\Leftrightarrow1\leqslant k^{1/k}\leqslant n^{1/k}\\&\Leftrightarrow n\leqslant Y(n)\leqslant \sum_{k=1}^{n}n^{1/k}=n+o(n)\\&\Rightarrow X(n)\in\Theta(n).\end{split}\end{equation}$$


I don't know what to do with $Z(n)$ because I will get $\displaystyle\sum_{k=1}^{n}n^k$.