I know that $O(\max(m, n)) = O(m + n)$, but is there a similar simplification for $O(\min(m, n))$? It could be $O(n) \cap O(m)$ but it does not simplify the notation that much…
Asked
Active
Viewed 467 times
1
-
3I don't think there's anything simpler than that. – integrator Oct 22 '20 at 10:57
-
3In fact, $\max(m,n) = \Theta(m+n)$. Unfortunately, nothing similar can be said about $\min(m,n)$. – Yuval Filmus Oct 22 '20 at 10:58
-
2Hard to call it simplify, but $\min(m,n)=\frac{m+n-|m-n|}{2}$. – plop Oct 22 '20 at 12:58
1 Answers
3
Based on definition for non negative functions $$O(f)=\{g: \exists C>0, \exists N \in \mathbb{N}, \forall n>N, g(n) \leqslant Cf(n)\}$$ I prefer to consider your question as about $O(\min(f,g))$.
Now, if from one hand $O(f) \cap O(g) \subset O(\min(f,g))$: $\phi \leqslant C_1 \cdot f$ and $\phi \leqslant C_2 \cdot g$ we obtain $\phi \leqslant C \cdot \min(f,g)$. Reverse can be show in same way, so we can be sure that $$O(f) \cap O(g) = O(\min(f,g))$$

zkutch
- 2,364
- 1
- 7
- 14