# Asymptotics of a function that decreases as n increases

A homework assignment asks me to state the complexity in Big-O notation of the function $$f(n) = 7n – 3n \log n + 100000$$

I graphed this function and decreases all the way down to zero nearly its entire lifespan. Therefore I concluded that the complexity is bounded by a constant and has the complexity $O(1)$.

Is this correct?

Also out of curiosity, what is the Big-Omega of this function is? The best it could ever run is also O(1). What about Big-Theta? I'm having trouble getting my head around these.

• a tricky one. did you think about $O(-n\log n)$? – Ran G. Mar 6 '13 at 5:07
• It does not just decrease to zero, it turns negative. – Karolis Juodelė Mar 6 '13 at 5:07
• Are you talking about time complexity? – Sid Mar 6 '13 at 5:18
• @RanG. negative values is an odd case for Big-O. I don't think it's ever come up... But, carefully check all the definitions, if it's valid, then ok. – Joe Mar 6 '13 at 5:27
• See also our reference question. You have to get your definitions straight! Note also that there is no algorithm anywhere in sight here! Clearly, $f$ can not be the runtime function of any algorithm. Furthermore, see here regardings using plots in this context. – Raphael Mar 6 '13 at 7:15

• $O(2^n)$,
• $O(n^4)$,
• $o(1)$ and
• $\Omega(-n^2)$,