Search code examples
complexity-theorybig-orecurrence

Big-O complexity of c^n + n*(logn)^2 + (10*n)^c


I need to derive the Big-O complexity of this expression:

c^n + n*(log(n))^2 + (10*n)^c

where c is a constant and n is a variable.
I'm pretty sure I understand how to derive the Big-O complexity of each term individually, I just don't know how the Big-O complexity changes when the terms are combined like this.
Ideas?

Any help would be great, thanks.


Solution

  • The O() notation considers the highest term; think about which one will dominate for very, very large values of n.

    In your case, the highest term is c^n, actually; the others are essentially polynomial. So, it's exponential complexity.