What is the dominant term of a function and its complexity?

In summary, the function $g(n)$ is asymptotically equal to $10\cdot \log(n^{30}+30)+2$, and the dominant term is $10\cdot \log(n^{30}+30)$.
  • #1
evinda
Gold Member
MHB
3,836
0
Hey again! (Smile)

I want to find the complexity of $g(n)=10 \cdot \log (n^{30}+30)+2 $.

We will find that $g(n)=\Theta(\log n)$, right? (Thinking)

What can I say at the beginning? Which is the dominant term of the function? (Thinking)
 
Technology news on Phys.org
  • #2
evinda said:
Hey again! (Smile)

I want to find the complexity of $g(n)=10 \cdot \log (n^{30}+30)+2 $.

We will find that $g(n)=\Theta(\log n)$, right? (Thinking)

What can I say at the beginning? Which is the dominant term of the function? (Thinking)

Hi again! (Happy)

Since $30$ can be neglected with respect to $n^{30}$, I'd say that the dominant term is $10\cdot \log(n^{30})$.
 
  • #3
I like Serena said:
Hi again! (Happy)

Since $30$ can be neglected with respect to $n^{30}$, I'd say that the dominant term is $10\cdot \log(n^{30})$.

A ok! (Nod) This is equal to $10 \cdot 30 \cdot \log n$, right?
 
  • #4
evinda said:
A ok! (Nod) This is equal to $10 \cdot 30 \cdot \log n$, right?

Right! (Mmm)
 
  • #5
I like Serena said:
Right! (Mmm)

So, could we say that the dominant term is equal to $\log n$ ? (Thinking)
 
  • #6
evinda said:
So, could we say that the dominant term is equal to $\log n$ ? (Thinking)

I guess it depends a bit how the phrase "dominant term" is defined exactly. (Wondering)

Taken literally, it's the term that grows more rapidly than any other in the expression.
As such your dominant term would be $10\cdot \log(n^{30}+30)$. (Nerd)
 
  • #7
I like Serena said:
I guess it depends a bit how the phrase "dominant term" is defined exactly. (Wondering)

Taken literally, it's the term that grows more rapidly than any other in the expression.
As such your dominant term would be $10\cdot \log(n^{30}+30)$. (Nerd)

So, in this case $g(n)$ isn't equal to $\Theta( \text{ dominant term})$, right? (Thinking)

What else could I write at the beginning, to say that $g(n)=\Theta(\log n)$ ? :confused:
 
  • #8
evinda said:
So, in this case $g(n)$ isn't equal to $\Theta( \text{ dominant term})$, right? (Thinking)

But it is equal to that! (Wait)

It's just that $\Theta(10\cdot \log(n^{30}+30)) = \Theta(\log(n))$. (Nod)
What else could I write at the beginning, to say that $g(n)=\Theta(\log n)$ ? :confused:

Well, you could say that the dominant term is $10\cdot \log(n^{30}+30)$, so $g(n)$ is asymptotically equal to $10\cdot \log(n^{30}+30)$.

And since the dominant term of $n^{30}+30$ is $n^{30}$, it follows that $g(n)$ is asymptotically equal to $10\cdot \log(n^{30})$, which is the same as $300\log(n)$.

In turn, that is asymptotically equal to $\log(n)$.

So:
$$g(n) = \Theta(10\cdot \log(n^{30}+30)) = \Theta(10\cdot \log(n^{30}))
=\Theta(300 \log(n))=\Theta(\log(n))$$
(Mmm)
 
  • #9
I like Serena said:
But it is equal to that! (Wait)

It's just that $\Theta(10\cdot \log(n^{30}+30)) = \Theta(\log(n))$. (Nod)

Well, you could say that the dominant term is $10\cdot \log(n^{30}+30)$, so $g(n)$ is asymptotically equal to $10\cdot \log(n^{30}+30)$.

And since the dominant term of $n^{30}+30$ is $n^{30}$, it follows that $g(n)$ is asymptotically equal to $10\cdot \log(n^{30})$, which is the same as $300\log(n)$.

In turn, that is asymptotically equal to $\log(n)$.

So:
$$g(n) = \Theta(10\cdot \log(n^{30}+30)) = \Theta(10\cdot \log(n^{30}))
=\Theta(300 \log(n))=\Theta(\log(n))$$
(Mmm)

I understand! (Nod) Thank you very much! (Smile)
 

FAQ: What is the dominant term of a function and its complexity?

1. What is the dominant term of a function?

The dominant term of a function is the term that grows the fastest as the input value increases. It is also known as the leading term.

2. How do you find the dominant term of a function?

To find the dominant term of a function, you can look at the highest power of the independent variable in the function. This term will have the largest impact on the overall behavior of the function.

3. Why is the dominant term important in understanding a function?

The dominant term allows us to determine the long-term behavior of a function. It helps us understand whether the function will increase or decrease without bound as the input value increases, and whether it will approach a specific value or not.

4. Can a function have more than one dominant term?

Yes, a function can have more than one dominant term. This can happen when there are multiple terms with the same highest power of the independent variable. In this case, both terms will have a significant impact on the overall behavior of the function.

5. How does the dominant term relate to the rate of change of a function?

The dominant term of a function is directly related to the rate of change of the function. The coefficient of the dominant term represents the slope or rate of change of the function, and the power of the independent variable represents the degree of the change.

Similar threads

Replies
5
Views
2K
Replies
13
Views
3K
Replies
1
Views
1K
Replies
24
Views
4K
Replies
1
Views
802
Replies
17
Views
1K
Replies
4
Views
2K
Replies
5
Views
314
Back
Top