I've seen the following in a text:
$\mathcal{O}(\sqrt{n})\cdot \mathcal{O}(n\log n)$
How is that even defined?
Ok, I guess one can replace it with:
$\mathcal{O}(\sqrt{n} \, n\log n)$
Is that right?
I've seen the following in a text:
$\mathcal{O}(\sqrt{n})\cdot \mathcal{O}(n\log n)$
How is that even defined?
Ok, I guess one can replace it with:
$\mathcal{O}(\sqrt{n} \, n\log n)$
Is that right?
Suppose that $f \in (\sqrt n)$ and $g \in O(n \log n)$. Pedantically, this means that there are constants $c_f$, $c_g$, $N_f$, $N_g$ such that
Call $N = \max\{ N_f, N_g\}$ and $c = c_f c_g$. Then it is also true that for all $n > N$, $\lvert f(n)\rvert < c \sqrt n$ and $\lvert g(n)\rvert < c n \log n$, and thus it's true that $fg \in O(n\sqrt n \log n)$.
We've shown that it does make sense to talk about $O(\sqrt n) \cdot O(n\log n)$, and the result is $O(n \sqrt n \log n)$ as expected.