Dominant term- Complexity of function

248 Views Asked by At

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?

1

There are 1 best solutions below

0
On

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?