Why is the $min\{r,f\} = O(r)$ = $O(r)$?

33 Views Asked by At

$min\{r,f\} = O(r)$

Can someone explain why this is true? My current understanding is that $O(r)$ means an upper bound for $r$, so then anything asymptotically "smaller" than $r$ would fall under the umbrella of $O(r)$ So if $r$ were smaller than $f$, then it is arbitrarily true.

But if $f$ is smaller than $r$, then say $f=n^2$ and $r=n$, then is the statement true because $n\in O(n^2)$? This is my understanding at the moment.

Any help is appreciated, thanks!