0

I'm fairly certain that if f(n) = Θ(g(n)) is true, if f(n) is asymptotically equal to g(n). However, I'm concerned I might be overlooking something. Am I correct in thinking that f(n) = Θ(g(n)) then f(n) is asymptotically equal to g(n)? or am I overlooking something?

I'm trying to compare different algorithms with respective runtimes of f(n) and g(n) and prove that f(n) = Θ(g(n)), but I'm not sure if I'm on the right way or not.

A.  f(n) = log(n^100), g(n) = log(n^2) 
lim n->∞ f(n)/g(n) = lim n->∞ log(n^200)/log(n^2) = 100
Since the result is a constant, we conclude that f(n) ∈ ϴ(g(n)), hence f(n) = ϴ(g(n)). 

B. f(n) = sqrt(n), g(n) = log(n)
lim n->∞ f(n)/g(n) = lim n->∞ sqrt(n)/log(n) = ±∞, in my case ∞, hence f(n) ≠ ϴ(g(n)).

C. f(n) = 3^n, g(n) = 5^n
lim n->∞ f(n)/g(n) = lim n->∞ 3^n/5^n = 0, hence f(n) ≠ ϴ(g(n)).

D. f(n) = sin(n)+3, g(n) = cos(n)+1
lim n->∞ f(n)/g(n) = lim n->∞ sin(n)+3/cos(n)+1 = 4/3, hence f(n) ≠ ϴ(g(n)).

Please tell me, am I on the right way?

Mar17
  • 1
  • 1

1 Answers1

0

Am I correct in thinking that if f(n) = Θ(g(n)) then f(n) is asymptotically equal to g(n)?

No, asymptotic equality is a stronger claim than asymptotically bound. The opposite is true: when () is asymptotically equal to (), then () is Θ(())

As defined on Wikipedia - Asymptotic Analysis:

if and only if

     ()
lim  ──── = 1 
→∞  ()

the functions and are said to be asymptotically equivalent.

For the first example where () = log¹⁰⁰ and () = log², this equivalence does not hold:

log¹⁰⁰ / log² = log¹⁰⁰ − log² = log⁹⁸, whose limit diverges to infinity and so () and () are not asymptotically equal.

See also Wikipedia - Family of Bachmann–Landau notations

trincot
  • 317,000
  • 35
  • 244
  • 286