Search code examples
complexity-theoryasymptotic-complexitybig-o

Are 2^n and 4^n in the same Big-Θ complexity class?


Is 2^n = Θ(4^n)?

I'm pretty sure that 2^n is not in Ω(4^n) thus not in Θ(4^n), but my university tutor says it is. This confused me a lot and I couldn't find a clear answer per Google.


Solution

  • 2^n is NOT big-theta (Θ) of 4^n, this is because 2^n is NOT big-omega (Ω) of 4^n.

    By definition, we have f(x) = Θ(g(x)) if and only if f(x) = O(g(x)) and f(x) = Ω(g(x)).

    Claim

    2^n is not Ω(4^n)

    Proof

    Suppose 2^n = Ω(4^n), then by definition of big-omega there exists constants c > 0 and n0 such that:

    2^n ≥ c * 4^n for all n ≥ n0

    By rearranging the inequality, we have:

    (1/2)^n ≥ c for all n ≥ n0

    But notice that as n → ∞, the left hand side of the inequality tends to 0, whereas the right hand side equals c > 0. Hence this inequality cannot hold for all n ≥ n0, so we have a contradiction! Therefore our assumption at the beginning must be wrong, therefore 2^n is not Ω(4^n).


    Update

    As mentioned by Ordous, your tutor may refer to the complexity class EXPTIME, in that frame of reference, both 2^n and 4^n are in the same class. Also note that we have 2^n = 4^(Θ(n)), which may also be what your tutor meant.