-1

I have the runtime below:

  T(n) = (1- (1/2^n)) ((n+1)/2)

I know its upperbound can be something like : O(2^n)

But I couldn't find its lowerbound or omega. Is it possible that an algorithm has no lower bound? What about theta ? little oh and little omega?

alyssaeliyah
  • 2,214
  • 6
  • 33
  • 80

2 Answers2

2

The inverse exponential is negligible in front of 1, so Θ(n), which implies all other bounds.

1

As 1- 1/2^n >= 0.5 for all n >= 1, we can say T(n) >= 0.5(n+1)/2 = (n+1) /4. Hence, T(n) = \Omega(n). Also, as 1- 1/2^n < 2 for all n >= 0, T(n) <= n + 1 we can say T(n) = O(n). Therefore, we can say T(n) = \Theta(n).

OmG
  • 18,337
  • 10
  • 57
  • 90