algorithm - Determine the Big O Notation: -


5n^5/2 + n^2/5

i tried eliminating lower order terms , coefficients, not producing correct answer.

not sure if should use logs?

let f(n) = (5n^5)/2 + (n^2)/5 = (5/2)*n^5 + (1/5)*n^2

the big o notation f(n) can derived following simplification rules:

  • if f(n) sum of several terms, keep 1 largest growth rate.
  • if f(n) product of several factors, constant omitted.

from rule 1, f(n) sum of 2 terms, 1 largest growth rate 1 largest exponent function of n, is: (5/2)*n^5

from rule 2, (5/2) constant in (5/2)*n^5 because not depend on n, omitted.

then: f(n) o(n^5)

hope helps. check introduction algorithms


Comments

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -