I have a self study question and maybe very simple.
Can we conclude the following is true? Is it a property of asymptotic or log property?
$O(m \log n + n \log n )$ is equal to $O((m+n) \log n )$?
I have a self study question and maybe very simple.
Can we conclude the following is true? Is it a property of asymptotic or log property?
$O(m \log n + n \log n )$ is equal to $O((m+n) \log n )$?
Copyright © 2021 JogjaFile Inc.
If you look at the expression
$$ \mathcal{O}(m \log(n) + n \log(n) ) = \mathcal{O}((m+n) \log(n)) $$
this is just factoring the expression since
$$ m \log(n) + n \log(n) = (m+n)\log(n) $$
You'd probably be interested in the relationship between $m$ and $n$. Which one is larger?