Good evening people,
I would like some help to compare a big-O and a Θ algorithm.
I can understand how to compare two big-O’s but something troubles
my understanding on how to compare big-O with Θ or big-O with Ω etc etc.
I will post some examples below :
Θ(2ⁿ) vs Ο(2ⁿ)
Θ(n0.6) vs Θ(nlogn)
O(n) vs Ω(n⋅logn)
I have one thing that’s the same size as an elephant[*], and another thing that’s no bigger than an elephant. Compare their sizes.
n^log nis bigger thann^0.6, becauselog nis bigger than a constant. But I can’t be bothered thinking of animals for them.I have one thing that’s no bigger than a mouse, and another thing that’s no smaller than a cat. Compare their sizes.
[*] erm… as the thing and the elephant tend to infinity they’re the same size, anyway. The analogy isn’t perfect, but the point is that big-O means “is no bigger than”, big-Omega means “is no smaller than”, and big-Theta means, “is both no bigger than and no smaller than”. “Bigger” and “smaller” are both judged by the same standard, actually meaning “
f(n)no bigger/smaller in magnitude than a constant multiple timesg(n), for sufficiently largen“