0

I'm currently reading about algorithms and big O notation.

I have come across som examples which for instance says the following:


n is O(n^2)

3n^2 + 7n is O(2n^2 + n)

5n^7 is O(2^n)


3^n is not O(n^4)

(1/n)^2 is not O((1/n)^3)

n^2 is not Ω(n^3)


Can somebody explain to me what is meant with these sentences?

I know what it means when an algorithm has running time O(1), O(N), O(N^2) etc.

But why is n equal to O(n^2) and why is 3^n not equal O(n^4) etc.?

Is there a way to calculate whether a formula containing n (the left side) is equal to another formula containing big O notation (the right side)?

0 Answers0