-1

Is it true that for all k, n^k is O(2^n)?

What I actually want to know whether this upper bound is correct. Like we can say n^2 is O(n^3) since it's true that n^2 < c * n^3, where c is a constant. SO similarly can I say that n^k < c * 2^n, for all value of k?

russell
  • 3,668
  • 9
  • 43
  • 56

1 Answers1

0

To show that there is always a constant c for any constant k such that n^k < c * 2^n, consider this: (n+1)^k / n^k = ((n+1)/n)^k. As n increases, (n+1)/n tends to 1, thus ((n+1)/n)^k tends to 1. This implies that the relative increase between values decreases as n increases.

Now consider 2^(n+1) / 2^n. This is clearly 2. Thus the relative increase stays the same as n increases. Thus there will be a c for every k such that n^k < c * 2^n

Benson Lin
  • 1,394
  • 13
  • 17