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


Solution 1

Note that

2n+1 = 2(2n)
22n = (2n)2

From there, either use the rules of Big-O notation that you know, or use the definition.

Solution 2

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.

Solution 3

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)

Solution 4

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.

Solution 5

2n+1 = O(2n) because 2n+1 = 21 * 2n = O(2n). Suppose 22n = O(2n) Then there exists a constant c such that for n beyond some n0, 22n <= c 2n. Dividing both sides by 2n, we get 2n < c. There's no values for c and n0 that can make this true, so the hypothesis is false and 22n != O(2n)

Author by


Updated on July 15, 2022


  • JuggernautDad
    JuggernautDad 3 months

    Is 2(n+1) = O(2n)?

    I believe that this one is correct because n+1 ~= n.

    Is 2(2n) = O(2n)?

    This one seems like it would use the same logic, but I'm not sure.