Find Function-O Function

Please help me with two functions, I need to simplify them.

O (nlogn + n ^ 1.01)

O (log (n ^ 2))

My current idea

O (nlogn + n ^ 1.01) = O (nlogn)

O (log (n ^ 2)) = O (log (n ^ 2))

Please kindly help me in these two simplification issues and explain briefly, thanks.

+3
source share
3 answers

For the second, you have O (lg (nΒ²)) = O (2lg (n)) = O (lg (n)).

For the first you have O (nlg (n) + n ^ (1.01)) = O (n (log (n) + n ^ (0.01)), you must decide that log (n) or n ^ (0,01 ) is growing more.

n ^ 0,01 - lg (n) , n β†’ : 0,01/x ^ (0,99) - 1/; ^ 0,99, , , ^ 0,01 , log (n), O (n ^ 1,01).

+12

:

log (x * y) = log x + log y

n^k , log n k>0.

+7

O(n*log(n)+n^1.01), , .. nlog(n) > n^1.01 n , 3, O(nlog(n))

, KennyTM,

O(log(n^2)) = O(log(n*n)) = O(log(n)+log(n)) = O(2*log(n)) = O(log(n))

.

+1

Source: https://habr.com/ru/post/1731747/


All Articles