When analyzing PSRS. Why is O (p ^ 2 log p ^ 2) = O (p ^ 2 log p)?

PSRS analysis (parallel sorting using regular sampling) In the calculation part. Why is Big-o sorting regular patterns: O (p ^ 2 log p ^ 2) = O (p ^ 2 log p)? Thanks for answering.

+3
source share
2 answers

Since log p² = 2 log p (which is a property of the logarithms) and using the Big-O notation you can ignore the multiplicative constant.

+5
source

O (p ^ 2 log p ^ 2) = O (2p ^ 2 log p), according to the properties of the logarithms. And O (kg) = O (g), where k is a constant. Therefore, you can remove 2 to reach O (p ^ 2 log p).

0
source

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


All Articles