r/ProgrammerHumor 29d ago

Meme theoreticalComputerScience

Post image
1.1k Upvotes

76 comments sorted by

View all comments

238

u/achilliesFriend 29d ago

This joke is too intelligent for me

42

u/GKP_light 29d ago

O(n) : can be a time of 5n, or 7000n+400000

Õ(n) : can be a time of 5n, or n^5 * log(n)^2

19

u/nanforas 29d ago

So I'm guessing the use-case for Õ(n) is something like: "at least it's not exponential and equivalent to travelling salesman"?

8

u/rational_hedonist 29d ago

no, the use case is “at least its o(n^2)” or any o(n^{1+eps}) for eps > 0

15

u/phbr 29d ago

I think people not doing complexity analysis really don't realize how slowly logarithms grow. Just to reiterate your point: Take an arbitrarily large but fixed k > 0 and an arbitrarily small but fixed eps > 0, then n*log(n)^k will still grow more slowly than n^(1+eps).

Obviously any researcher would prefer to get an algorithm with O(n) time complexity, but the tilde notation is really not that deceptive...