Sign up ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Is there a term for $O( (m+n) \log{mn})$? I remember seeing it often in some context but can't remember.

share|cite|improve this question
Note that it's the same class as $O((m+n)\log(m+n))$ which is just $O(n\log n)$ with $n_{\rm new} = m+n_{\rm old}$. –  Henning Makholm Nov 14 '12 at 21:25
Could show why $O(\log{m}+\log{n}) = O(\log{(m+n)})$ in an answer? –  Jacob Nov 14 '12 at 23:42

1 Answer 1

up vote 1 down vote accepted

Note that $O(\log mn)$ is the same class as $O(\log(m+n))$.

Assume $m,n\ge 1$ (since only the behavior for large $m$ and $n$ interests us). Then in one direction we have $$\log mn = \log m + \log n \le 2 \max(\log m,\log n) \le 2\log\max(m,n) \le 2\log(m+n)$$ and in the other direction $$\log(m+n) \le \log(2\max(m,n)) = 1+\max(\log m,\log n) \le 1 + (\log m + \log n) = 1+\log mn$$

Therefore $O((m+n)\log mn)$ is just $O(k\log k)$ for $k=m+n$.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.