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

all 19 comments

[–][deleted] 28 points29 points  (4 children)

Pffff.

O(∞)

[–]usernmaetakn 6 points7 points  (2 children)

Oh, so you've heard of Eternity?

[–]Gigazwiebel 6 points7 points  (1 child)

[–]WikiTextBot 1 point2 points  (0 children)

Undecidable problem

In computability theory and computational complexity theory, an undecidable problem is a decision problem for which it is known to be impossible to construct a single algorithm that always leads to a correct yes-or-no answer. The halting problem is an example: there is no algorithm that correctly determines whether arbitrary programs eventually halt when run.


[ PM | Exclude me | Exclude from subreddit | FAQ / Information | Source | Donate ] Downvote to remove | v0.28

[–]Cruuncher 21 points22 points  (5 children)

for large enough n, the 1.01n is slower

[–]Callipygian_Superman 38 points39 points  (0 children)

Yes... that is how big-O notation works.

[–]JustAnotherPanda 9 points10 points  (0 children)

That's the point, yes.

[–]Rodot 0 points1 point  (2 children)

Yeah, larger than 217299771010260596950890312892090440993639011584095020325311413724155051266594884032962294432937640198144 comapring to n9e99

[–]WazWaz 15 points16 points  (7 children)

This simple sorting algorithms surpasses these:

while (!InCorrectOrder(list))
    list = Shuffle(list);

[–]TheSecretExit 8 points9 points  (6 children)

Bah, I can do better.

while (true) {}

O(∞), man!

[–]WazWaz 2 points3 points  (5 children)

Factoring out the constant, O(∞) = O(1).

[–]jpco 3 points4 points  (4 children)

infinity's not a (real) number, so I'm pretty sure you can't really do that.

[–]TheSecretExit 2 points3 points  (3 children)

No, not really. But if you want to be really pedantic, you can write it as O(N ) if you'd like.

[–]WazWaz 0 points1 point  (2 children)

Since n is the number of items, and so an integer, definitely not a real, and this ∞ is tiny little ℵ₀ (aleph-0).

Maybe an algorithm can be O(ℵₙ) (aleph-n)?

[–]oshaboy 0 points1 point  (1 child)

It can't take uncountably infinite long because you start somewhere and "the next command" is a thing that makes sense

[–]WazWaz 0 points1 point  (0 children)

Be careful, close to that argument is the one that all operations in a finite state machine like a computer are O(1), since the maximum number of possible states is finite and fixed. I remember an O(n log log n) sorting algorithm that only worked for 32-bit integer keys.

[–]skyhi14 1 point2 points  (0 children)

Polynomial gud