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 φ O(n3)
Here's what I did:
This is for big O(To get Θ I know that I also need to prove that the algorithm is Ω(n3)
- 3n3 + n2 <= c * n3
- 3n3 + n3<= c * n3
- 4n3 <= c * n3
- 4n3 <= 4n3
My problem is that I'm not sure what it means to do this really. My professor is very poor at speaking english. I actually went to his office hours today to get some help from him and I can at least come up with correct solutions for the proofs however he does not possess the ability to communicate effectively enough to convey the meaning behind the actual proofs. Instead it's all broken english and pieces of sentences. I'm not making fun of him, he's clearly really intelligent, he just doesn't know English very well.
I'll post here the solution given by the professor from the home work. So I know that 4n^3 is part of the correct solution. I know I also need to find omega 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 to go from what I have there to the solution given by the professor.
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.
Come and get some inspiration.