Search code examples
big-olittle-o

Checking big theta, little oh and little omega with limits?


Say we have two functions f(n) and g(n). If we we wanted to check if f(n) is little oh o(g(n)) would it be valid to do the following:

lim n -> infinity f(n)/g(n) and the result would have to = 0 ?

So if the above comes out to 0, will it mean f(n) is o(g(n))? And how can we check the big theta and little omega with limits?


Solution

  • yes.

    o(g(n)) = { f(n): for all constants c > 0, there exists a constant n0 such that 0 ≤ f(n) < cg(n) for all n ≥ n0}. ALSO: 0 = lim f(n)/g(n)