Question #254909

A particular algorithm increases in time as the number of operations, n, increases.


Suppose the time complexity of this algorithm is given by: f(n) =4n3+5n2 * log(n).

Show that f(n) is O(g(n)) for g(n) = n3.



1
Expert's answer
2021-10-25T17:27:35-0400

f(x)=O(g(x))f(x)=O(g(x)) if there exists a positive real number M and a real number x0 such that

f(x)Cg(x)|f(x)|\le Cg(x) for all xx0x\ge x_0


So, we have:

f(n) =4n3+5n2 * log(n) < 5g(x)=5n35g(x)=5n^3 for x2x\ge 2

where C=5,x0=2C=5,x_0=2


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!
LATEST TUTORIALS
APPROVED BY CLIENTS