I am having trouble figuring out how to prove that
t(n) = sqrt(31n + 12n log n + 57)
is
O(sqrt(n) log n)
I haven’t had to deal with square root’s in big O notation yet so I am having lots of trouble with this! Any help is greatly appreciated 🙂
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.
Big O notation is about how algorithm characteristics (clock time taken, memory use, processing time) grow with the size of the problem.
Constant factors get discarded because they don’t affect how the value scales.
Minor terms also get discarded because they end up having next to no effect.
So your original equation
immediately simplifies to
Square roots distribute, like other kinds of multiplication and division, so this can be straightforwardedly converted to:
Since logs convert multiplication into addition (this is why slide rules work), this becomes:
Again, we discard constants, because we’re interested in the class of behaviour
And, we have the answer.
Update
As has been correctly pointed out,
does not become
So the end of my derivation is wrong.