this post was submitted on 30 May 2024
395 points (87.8% liked)

AnarchyChess

5194 readers
155 users here now

Holy hell

Other chess communities:
!Chess@lemmy.ml
!chessbeginners@sh.itjust.works

Matrix space

founded 1 year ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] lugal@sopuli.xyz 2 points 5 months ago (2 children)

According to that logic, everything is O(1) because at some point you go out of memory or your computer crashes.

"How fast is your sorting algorithm?" – "It can't sort all the atoms in the universe so O(1)."

That's not how O notation works. It is about asymptomatics. It is about "What if it doesn't crash", "what if infinity".

So, again, what exactly is your question if your answer is O(1)?

[–] kogasa@programming.dev 2 points 5 months ago (1 children)

O notation has a precise definition. A function f : N -> R+ is said to be O(g(x)) (for some g : N -> R) if there exists a constant c so that f(n) <= cg(n) for all sufficiently large n. If f is bounded, then f is O(1).

[–] lugal@sopuli.xyz 1 points 5 months ago

If n is in O(1), than any O(f(n)) is O(1) but who says the number of lemmy users is bounded? We will grow and we will continue to grow. When economists calculate with infinite growth, so can we

[–] Sotuanduso@lemm.ee 1 points 5 months ago (1 children)

Yeah, you're right, I'm not being rigorous here. I'm just co-opting big O notation somewhat inaccurately to express that this isn't going to get as big as it seems because the number of upvotes isn't going to increase all that much.

[–] lugal@sopuli.xyz 1 points 5 months ago

I guess I have a different intuition. For me, O notation applied normally shows that it will not get far because it rises exponentially or if you count the steps in relation to the number of users, it's O(log n) which doesn't go high. No need to apply it inaccurately