Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Asymptotic notation big(O) and Big(Omega)

f(n) = 6*2^n + n^2

big(O) = 2^n

big(Omega) = 2^n

In above equation both big(O) and big(Omega) has same value. If big (O) is upper bound and big(omega) is lower bound shouldn't big(omega) = n^2. Why the both have same value?

like image 378
Pegasus008 Avatar asked Feb 06 '23 01:02

Pegasus008


1 Answers

It's true that O and Ω are upper and lower bounds, respectively, but they are more similar to and than to < and >. Just like it's possible that, simultaneously a ≥ b and a ≤ b (without contradiction), so can a function be both O and Ω of a different function (in fact, that's one of the ways to define Θ).

Here, for large enough n,

  • 6 2n + n2 ≤ 12 2n so 6 2n + n2 grows at most (up to a multiplicative constant)like 2n does (it is O of it).

  • Conversely, 6 2n + n2 ≥ 0.1 2n so 6 2n + n2 grows at least (up to a multiplicative constant) like 2n does (it is Ω of it).

Note that you don't have to use the same multiplicative constants. The conclusion is that 6 2n + n2 = Θ( 2n)

like image 178
Ami Tavory Avatar answered Feb 27 '23 22:02

Ami Tavory