Proving n^2 + 3n^3 is Θ(n^3) for n >= 0

Click For Summary
SUMMARY

The discussion centers on proving that the function n² + 3n³ is Θ(n³) for n ≥ 0. The user successfully demonstrated that n² + 3n³ is O(n³) by establishing the inequality 4n³ ≤ c * n³ with c = 4. The user also acknowledges the need to prove that the function is Ω(n³) to complete the Θ proof. The professor's explanation emphasizes that the highest power in the polynomial dictates the scaling complexity, confirming the user's approach.

PREREQUISITES
  • Understanding of Big O notation and its implications
  • Familiarity with asymptotic notation, specifically Θ and Ω
  • Basic knowledge of polynomial functions and their growth rates
  • Experience with mathematical proofs in algorithm analysis
NEXT STEPS
  • Study the formal definitions of Θ, O, and Ω notations
  • Learn how to construct mathematical proofs for algorithm complexity
  • Explore polynomial growth rates and their implications in algorithm analysis
  • Review examples of proving Θ notation with various functions
USEFUL FOR

Students preparing for exams in algorithm analysis, computer science majors, and anyone interested in understanding asymptotic notation and polynomial complexity proofs.

benarceneaux
Messages
4
Reaction score
0
Member advised to use the homework template for posts in the homework sections of PF.
First off I'm studying for an exam tomorrow, this isn't homework. Also, I've already written the proof and verified I've gotten the correct answer. I'm here to ask some questions about the solution that I am not completely confident I understand.

Here's the problem:
Prove that n2 + 3n2 is Θ(n3)

Here's what I did:
  • 3n^3 + n^2 <= c * n^3
  • 3n^3 + n^3<= c * n^3
  • 4n^3 <= c * n^3
  • 4n^3 <= 4n^3
This is for big O(To get Θ I know that I also need to prove that the algorithm is Ω(n3)

My problem is that I'm not sure what it means to do this really. My professor first language clearly is not English. I actually went to his office hours today to get some help from him and he was very helpful one on one and I can come up with correct solutions for the proofs. However, his English is so poor that he is unable to convey the meaning behind what we're doing. Instead it's all broken English or pieces of sentences. I'm not making fun of him, he's very intelligent, it's just very difficult to understand what he's trying to say and no one in class asks him to clarify anything. I suppose because it's a room full of shy geeks : P

I'll post here the solution given by the professor from the home work. See, I know that 4n^3 is part of the correct solution. I know I also need to find Ω[g(n)] but I'll ask that question when I get to it lol. So hopefully someone can tell me WHY my answer is correct and how it is similar to what my professor has given as the correct answer.

Here's the answer from the professor:

We show that n^2 + 3n^3 is O(n^3) because for n >= 0,
n^2 + 3n^3 <= 4n^3
We can take c = 4, N = 0 to obtain our result.
 
Physics news on Phys.org
It's nothing more than a series of inequalities: we know that for ##n > 1##, ##n^2 < n^3##. So,
3n^3 + n^2 &lt; 3n^3 + n^3 = 4 n^3
So the complexity scales as the cube of ##n## - that's what the big O notation ##\mathcal{O}(n^3)## means.

But you will and should find that the largest power in the polynomial will be the one that determines the scaling complexity of the algorithm, which makes sense because all the lower powers of ##n## are much smaller. So in general, the complexity is governed by the highest power in the polynomial.
 
benarceneaux said:
Here's the problem:
Prove that n2 + 3n2 is Θ(n3)
Surely there's a typo here...
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
1K
Replies
2
Views
3K
  • · Replies 17 ·
Replies
17
Views
3K
  • · Replies 11 ·
Replies
11
Views
2K
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 1 ·
Replies
1
Views
2K