Using only the definition of O()?
Asked
Active
Viewed 3,780 times
2 Answers
1
You want to calculate the limit of
(n * log(n)) / (n ^ 2) =
= log(n) / n =
= 0 if n approaches infinity.
because log(n)
grows slower than n
.
-
I would give this a +1, except that the question really deserves a -1. – Philip Sheard Feb 04 '13 at 08:56
-
-
-
1I mean this is not a formal proof, ie it doesnt use the definition of Big-O as the OP requested. – UmNyobe Feb 04 '13 at 09:08
1
You need to prove by contradiction. Assume that n^2
is O(n*log(n))
. Which means by definition there is a finite and non variable real number c
such that
n^2 <= c * n * log(n)
for every n bigger than some finite number n0
.
Then you arrive to the point when c >= n /log(n)
, and you derive that as n -> INF
, c >= INF
which is obviously impossible.
And you conclude n^2
is not O(n*log(n))

UmNyobe
- 22,539
- 9
- 61
- 90