logoalt Hacker News

hansvm • today at 6:38 AM • 0 replies • view on HN

Is literally anyone confused by the notation? Constrained to this problem: There exists an algorithm achieving Θ(n^2.25) runtime. There does not exist an algorithm achieving o(n^2.25) runtime. If we want to be pedantic about function classes vs other extensions of Big-O notation then we can talk about the runtime of some specific class of algorithms associated with this problem and manufacture the function everyone is implicitly referring to. It's a perfectly fine shorthand phrasing, especially given that the domains are different for that overlap in vocabulary.

The best/average/worst case stuff is similarly quite easy. For best, take the lowest runtime for the algorithm across all inputs of length n. Do Big-O on that sequence. Worst-case is the same technique applied to the highest runtime. Average is a bit messy since it pulls in an undefined measure which may or may not related to your application, but once you have a measure it's no harder than the other two to analyze. These are rudimentary functions satisfying the pedantry you're asking for and also exactly corresponding to the normal engineering mentality when they reach for that verbal shorthand. Why do they need further elaboration?