So a quick thought; Could one argue that O(∞) is actually O(1)?
Or is the only 'correct' way to express it O(∞)?
Infinity is not a number, or at least not a real number, so the expression is malformed. The correct way to express this is to simply state that a program doesn't terminate. Note: program, not algorithm, as an algorithm is guaranteed to terminate.
(If you wanted, you might be able to define big-O notation on transfinite numbers. I'm not sure if that would be of any use, though.)
Your argument is not quite correct.
Big O notation disregards constant multiples; there's no difference between O(1)
and O(42)
, or between O(log(n))
and O(3π log(n))
.
Standard convention is to not use any constant multiples.
However, O(∞)
would mean an “algorithm” that never terminates, as opposed to O(1)
which will terminate at some point.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With