I am learning algorithms.. So, I came along with something very interesting.
The asymptotic bound of linear equation ( (a*n)+b ) is O(n^2).. for all a>0.
This is same that of not so surprising.. a* n^2 + b* n + c
Why?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Because big-oh gives you an upper bound. Your first function is also
O(n^3), O(n^4), O(n^2012)etc.The definition of big-oh basically says that
f(n) is O(g(n))if there exists someksuch that, for alln > k, we haveg(n) > f(n).Look into big-theta for stronger / tight bounds.