1

I have a few asymptotic notation problems I do not entirely grasp.

So when proving asymptotic complexity, I understand the operations of finding a constant and the n0 term of which the notation will be true for. So, for example:

Prove 7n+4 = Ω(n)

In such a case we would pick a constant c, such that it is lower than 7 since this regarding Big Omega. Picking 6 would result in

7n+4 >= 6n

n+4 >= 0

n = -4

But since n0 cannot be a negative term, we pick a positive integer, so n0 = 1.

But what about a problem like this:

Prove that n^3 − 91n^2 − 7n − 14 = Ω(n^3).

I picked 1/2 as the constant, reaching

1/2n^3 - 91n^2 - 7n -14 >= 0.

But I am unsure how to continue. Also, a problem like this, I think regarding theta:

Let g(n) = 27n^2 + 18n and let f(n) = 0.5n^2 − 100. Find positive constants n0, c1 and c2 such
that c1f(n) ≤ g(n) ≤ c2f(n) for all n ≥ n0.

In such a case am I performing two separate operations here, one big O comparison and one Big Omega comparison, so that there is a theta relationship, or tight bound? If so, how would I go about that?

Snyder-66
  • 19
  • 1

1 Answers1

2

To show n3 − 91n2 − 7n − 14 is in Ω(n3), we need to exhibit some numbers n0 and c such that, for all n ≥ n0:

n3 − 91n2 − 7n − 14 ≥ cn3

You've chosen c = 0.5, so let's go with that. Rearranging gives:

n3 − 0.5n3 ≥ 91n2 + 7n + 14

Multiplying both sides by 2 and simplifying:

182n2 + 14n + 28 ≤ n3

For all n ≥ 1, we have:

182n2 + 14n + 28 ≤ 182n2 + 14n2 + 28n2 = 224n2

And when n ≥ 224, we have 224n2 ≤ n3. Therefore, the choice of n0 = 224 and c = 0.5 demonstrates that the original function is in Ω(n3).

kaya3
  • 31,244
  • 3
  • 32
  • 61
  • May you please explain how you went from the third to fourth step? I understand that you summed the co-efficients but I am not sure why you did that. I thought I would perform this like a traditional 'find the root'. So I first tried to re-arrange and factor but couldn't because I had n(n^2 - 14) + 2(-91n^2 - 14), which doesn't factor out anymore, at least I don't think. – Snyder-66 Feb 14 '20 at 22:03
  • Because when n ≥ 1, we have 1 ≤ n^2, and we have n ≤ n^2. I've edited in a way which might make it clearer; each term in 182n^2 + 14n + 28 is less than or equal to the corresponding term on the right of the inequality. – kaya3 Feb 14 '20 at 22:06
  • 1
    @Snyder-66 The reason this works is that you don't need the smallest possible n0; any old n0 will do and this one is constructed to be convincing, which I think we can all agree on. – Patrick87 Feb 14 '20 at 23:41
  • Indeed; you aren't looking for a root (i.e. solving an equation), just a bound (i.e. satisfying an inequality), so you can be as inexact as you like, as long as you're inexact in the right direction. – kaya3 Feb 14 '20 at 23:43
  • If I recall, I was taught that any constant c can be used so long as, in this case specifically, it is smaller than the highest power coefficient- is that what you are alluding to? But still, doesn't n0 represent the starting value of when n^3 is Ω to the function? So wouldn't I need to be finding the smallest possible n0 to accurately describe the bound? Or is this fine because it is considering all values >= n0? – Snyder-66 Feb 15 '20 at 00:05
  • You just need any c and any n0 that you can prove the bound for. No obligation to make the bound tight. – kaya3 Feb 15 '20 at 01:23