algorithm - Giving a simple function so that sum S(n) is O(f(n))? -
Stuck on for some time
Consider the amount S (n) = one? ?? Logs (i). Give a simple task f (n) so that zeros are s (n) o (f (n)). Explain
(Sigma starts with = 1 and ends at n) How can I do this? Please explain step by step. Just because then it and to confirm that We can not improve this compulsion: then it is
log is monotonic:
sum [i = 1..n] log (i)
o (n * log (n))
amount [i = 1..n] log (i) & gt; = Yoga [i = n / 2..n] log (i) & gt; = Sum [i = n / 2..n] log (n / 2) = (n / 2) * log (n / 2)
omega * Log (n))
Comments
Post a Comment