recursion - T(n)=T(n-1)+O(log n)$is T(n)=O(n^2) or T(n)=O(n log n) -


I have a recurrence relationship: T (n) = t (n -1) + o (log n)

What is the solution? T (n) = o (n ^ 2) or t (n) = o (n log n)

What I did: I think that T (n) & lt; = O (n ^ 2) ... Enter image details here

And this I o (n ^ 2), am I right? Or is i mistake? (I have heard from someone that he has found O (n log n) and if i am right or do kiray ...)

Thank you!

If T (n) = T (N-1) + C logs for some C.

=> T (n) and lt; = T (N-2) + C Log (N -1) + C Log N

=> T (N) & LT; = T (N-3) + C Log (N -2) + C Log (N -1) + C Log N

Type: T (N) & lt; = T (0) + sum_ {i = 1 .. n} c log I = O (n log n)

but o (n ^ 2) is also true but less specific, because t ( N) = O (n ^ 2) means

some A, M such that T (n) & lt; = All for n = 2 ^ n> = m


Comments

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -