Site navigation

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 f(n)=4n2f(n)=4n^2 for all n and g(n)=ng(n)=n if n>100n>100 and n3n^3 if n≤100n\le100, then :

Select one answer
Answer and explanation

Correct answer A

g(n) is of O(f(n))O(f(n)). For all n greater than 100, g(n)/f(n)g(n)/f(n) =n/(4n2)=n/(4n^2) =1/(4n)=1/(4n), 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)

Related question papers

Related exam syllabi

Related questions in this topic