considering
log(sqrt(n)) = (1/2)log(n)
And if for asymptotic analysis we don't consider the constant terms so, is O(log(sqrt(n))) is as good as O(log(n))?
As per my understanding log(sqrt(n)) will grow slowly in comparison to log(n) if we increase the size of n. But I am not able understand the glitch in moving power of (1/2) at front? Is it just this that factor 1/2 only slows down the rate?
consider the case when we have log(n*n) represented as 2log(n) , and log(n)?
It is the same asymptotically:
O(log(sqrt(n))) = O(log(n^1/2)) = O(1/2 log(n)) = O(log(n))
You are right, O(log(sqrt(n))) is the same as O(log(n)) by the reasoning given in your question.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With