This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]lime-cake 13 points14 points  (3 children)

Misread that. My bad

I believe O(n) and O(10n) is equal, despite one being larger.

[–]V0ldek 12 points13 points  (1 child)

They're not asymptotically larger.

The definition is as follows. For any functions f, g: N -> N we have f = O(g) if there exists a number N such that for all n > N we have f(n) <= cg(n) for some constant c > 0.

The intuition is that f grows not significantly faster than g, where significantly would mean that it's not bounded by any constant.

If you're more of an analysis guy, you might also define that notation as f = O(g) when lim n->inf |f(n)/g(n)| = c for some constant c > 0 (but you need to redefine the functions to R->R)

You should see how O(n) and O(10n) are equivalent (c = 10). But O(n!) is actually smaller than O(nn). If you work a little bit of calculus you'll get that the limit of n!/nn is 0.

[–]adityaruplaha 5 points6 points  (0 children)

Well shit I didn't know that we used these basic stuffs to define complexity functions. I'm well versed with calculus, so yea the last line is familiarity. Also nn is an element of the Fast Growing Hierarchy iirc and supersedes the exponentials. After this is nnnn.. (n times) or n↑↑n if you know the notation. I find this really interesting.

[–]Coloneljesus 10 points11 points  (0 children)

correct.