Is 2^(2n) = O(2^n)

First case is obviously true - you just multiply the constant C in by 2.

Current answers to the second part of the question, look like a handwaving to me, so I will try to give a proper math explanation. Let's assume that the second part is true, then from the definition of big-O, you have:

enter image description here

which is clearly wrong, because there is no such constant that satisfy such inequality.


Claim: 2^(2n) != O(2^n)

Proof by contradiction:

  1. Assume: 2^(2n) = O(2^n)
  2. Which means, there exists c>0 and n_0 s.t. 2^(2n) <= c * 2^n for all n >= n_0
  3. Dividing both sides by 2^n, we get: 2^n <= c * 1
  4. Contradiction! 2^n is not bounded by a constant c.

Therefore 2^(2n) != O(2^n)


I'm assuming you just left off the O() notation on the left side.

O(2^(n+1)) is the same as O(2 * 2^n), and you can always pull out constant factors, so it is the same as O(2^n).

However, constant factors are the only thing you can pull out. 2^(2n) can be expressed as (2^n)(2^n), and 2^n isn't a constant. So, the answer to your questions are yes and no.

Tags:

Big O

Math