I want to find the complexity of the function $g(n)=10 \cdot \log (n^{30}+30)+2$.
We will find that $ g(n)=\Theta(\log n)$, right?
But what can I say about the dominant term at the beginning?
I want to find the complexity of the function $g(n)=10 \cdot \log (n^{30}+30)+2$.
We will find that $ g(n)=\Theta(\log n)$, right?
But what can I say about the dominant term at the beginning?
Copyright © 2021 JogjaFile Inc.
Let's transform the expression under the logarithmic function:
$$10 \cdot \log(n^{30} + 30) + 2 = 10 \cdot \log(n^{30}\cdot(1 + \frac {30} {n^{30}})) + 2 = 10\cdot\log(n^{30}) + 10\cdot\log(1+\frac {30} {n^{30}}) + 2$$
And you see the dominant term now, right?