r/computerscience
•
u/Significant_Virus142
•
Sep 17 '26
•
1
Help Why use Big O notation?
If someone asks for big O time complexity of an algorithm but expects only the minimum of the possible big Os then is that even Big O notation anymore? cuz if the big o time complexity of an o(n) algorithm is asked then according to the condition of big O notation O(n square) would also be a valid answer
120
Upvotes
View all comments
Show parent comment
10
u/JoJoModding Sep 17 '26
Because we often can't find an actual tight bound. Sure, list sorting is in Theta(n log n) but it's one of the few problems where we can actually do this.
For example for matrix multiplication, it is not known what the fastest algorithm ist. It is known to be Omega(n²). Since the fastest currently known algorithm has a runtime of about O(2^(2.371177)). But this is an upper bound, in a few years they will probably found a slightly lower value for the exponent.
We care about the best currently known upper bound. And upper bounds means big-O.