|
|
|
|
|
by svat
2988 days ago
|
|
That's not “worse”, that's the entire point of using O() notation! The beauty of O() notation is that it lets us carry out, fully rigorously, computations like (n + O(√n))(n + O(log n))^2 = (n + O(√n)(n^2 + O(n)) = n^3 + O(n^(5/2)) without dealing with a mess of sets and quantifiers. Please take a look at some works where asymptotic expressions are dealt with proficiently; you'll understand. (de Bruijn's book https://news.ycombinator.com/item?id=16834297 for example, or at least Chapter 9 of Concrete Mathematics.) I recently worked out an example here: https://cs.stackexchange.com/a/88562/891 — replacing all O() equations with “∈” and “⊆”, though it can be done ( https://math.stackexchange.com/a/86096/205 ), is just cumbersome and only distracts from what's going on. |
|
In any case your notation works perfectly fine as an equality of sets. It's not that unusual to add and multiply sets together, there's really only one sensible definition, and the slight abuse of notation to use x instead of {x} is perfectly acceptable if you're careful.
The problem is that f = h + O(g) is generally used in a way that's false as an equality of sets, it's usually used to mean f ∈ h + O(g), which just makes using '=' needlessly sloppy notation (especially since you can make it correct by just changing a single character, no mess or quantifiers required).
Still, that's nothing compared to the suggestions on stack overflow which suggest using = to mean ⊆. Which is a terrible idea, equivalent to using = instead of ≤. In fact you point out one of the reasons it's terrible yourself, when you note that all equality signs only work one way, going against all mathematical convention.
Even stronger, ⊆ has some very nice properties. It's a total order on the big O sets, which is one of the nicer properties you can have (it's merely a partial order on the f + O(g) sets, but you can't have everything). Why on earth would you sacrifice all that just so you can avoid a scary math symbol?