If \(f(n)=4n^2\) for all n and \(g(n)=n\) if \(n>100\) and \(n^3\) if \(n\le100\), then :
g(n) is of \(O(f(n))\). For all n greater than 100, \(g(n)/f(n)\) \(=n/(4n^2)\) \(=1/(4n)\), which tends to zero. The finitely many smaller inputs do not alter the…
Choose your answer
If for all n and if and if , then :
Answer and explanation
Correct answer A
g(n) is of . For all n greater than 100, , which tends to zero. The finitely many smaller inputs do not alter the asymptotic bound.
Practice for these exams
-
Maharashtra and Goa SET (MH SET)