What is the time complexity of given function,
f(n)= 5n2+3n+4 ?
Solution:
Given,
f(n)=5n2 +3n+4
- 5n2 +3n+4>=5n2 +3n+4 for all n>=1
- 5n2 +3n+4>= 5n2 +3n for all n>=1
- 5n2 +2n+4>=5n2 for all n>=1
- f(n)>=5n2 for all n>=1
Compare with the standard Big omega notation equation that is,
f(n)>=c*g(n) for all n0>=n
So here c =5, g(n)=n2 and n0 =1
- f(n)=Ω(g(n))
- f(n)=Ω(n2)