6

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.

Nibble
  • 75
  • 1
  • 1
  • 3
  • 1
    You've already got quite a few answers, so I guess this should remain, but... A question like this is a *lot* better suited for [CS Exchange](http://cs.stackexchange.com/). SO is more for code and such, not theory. And on CS you have actual scientists :) – Ordous Sep 30 '14 at 11:49
  • 3
    True - as programmers, both are in Θ(don't do that) – MSalters Sep 30 '14 at 11:54

4 Answers4

10

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.

Community
  • 1
  • 1
chiwangc
  • 3,566
  • 16
  • 26
  • 32
  • 3
    It's also worth mentioning that what the OPs professor *meant* is **likely** `complexity classes` which is **different** to being in the same big-theta. In that frame of reference, both `2^n` and `4^n` are in the same class, namely `exptime`. Just like `n^2` and `n^3` are in `polytime`, even though they are not in big-theta of each other. The motivation for these classes (polynomial reduction) may also be useful. – Ordous Sep 30 '14 at 11:52
  • Isn't it easier to just say that `4^n = 2^n * 2*n`? Here you see plainly that the two differ by a non-const factor that depends on n. – Ulrich Eckhardt Oct 02 '14 at 05:43
  • My solution gives a **formal mathematical proof** why a non-constant factor *implies* `2^n is not Ω(4^n)`, @ajcr has also described the corresponding argument in plain words in his edit. – chiwangc Oct 03 '14 at 02:38
1

Yes: one way to see this is to notice 4^n = 2^(2n). So 2^n is the same complexity as 4^n (exponential) because n and 2n are the same complexity (linear).

In conclusion, the bases don't affect the complexity here; it only matters that the exponents are of the same complexity.

Edit: this answer only shows that 4^n and 2^n are of the same complexity, not that 2^n is big-Theta of 4^n: you're correct that this is not the case as there is no constant k such that k*n^2 >= n^4 for all n. At some point, n^4 will overtake k*n^2. (Acknowledgements to @chiwangc / @Ordous for highlighting the distinction in their answer/comment.)

Alex Riley
  • 169,130
  • 45
  • 262
  • 238
0

Yes. Both have exponential complexity.

Claudio
  • 10,614
  • 4
  • 31
  • 71
0

Yes theta is possible even though big omega did not satisfied but equality exist by using stirling approximation. hence (2^n)=θ(3^n).