0

What is if we have

f(n) = 15n^2logn  +500n^2,5 ,
 g(n) = n^3 + 1000 , 
h(n) = 21n^3logn , 
x(n) = 50n^2,5 +  n*log(n)

How to check " is f(n) O(g(n) or O(h(n)) , or O(x(n)) and why? and other examples? like is h(n) O(g(n)) or is f(n) O(n^2logn)

YokiT
  • 1
  • An easy way that works for most "nice" positive functions is that of evaluating the limit of the ratio of the two functions you are interested in as $n$ approaches $+\infty$. If $\lim_{n \to \infty} \frac{f(n)}{g(n)}$ exists and is finite then $f(n) = O(g(n))$. The converse is not true. This method works for all pairs of the above functions. – Steven Jul 05 '21 at 19:21
  • could be more specific? ok we will use DLH on the limit but what the result must to be ? could you provide me an example? thank you in advance – YokiT Jul 05 '21 at 19:23
  • See this answer, which also contains an example. – Steven Jul 05 '21 at 19:34
  • @Steven Okay thank you. One last question. Lets stay on f(n) . Is it correct that 500n^2,5 > 15^2logn so to the lim f(n) we can take n^2,5 only? – YokiT Jul 05 '21 at 20:14

0 Answers0