Asymptotic Notation
Big-O, Θ, Ω — what the symbols promise and what they don't.
Last updated 27 June 2026
Definitions
For functions
Definition (Big-O).
Reading code
def has_duplicate(xs):
seen = set()
for x in xs: # n iterations
if x in seen: # O(1) expected
return True
seen.add(x)
return False # total: O(n) expected, O(n) space
Compare with the
A decision habit
The flowchart is the discipline: an upper bound alone is a claim about your proof, not about the algorithm. Tightness is a separate theorem. This connects directly to the machine model — asymptotics are only meaningful relative to a cost model.
The extreme case: galactic algorithms, asymptotically optimal but useless below astronomical input sizes. ↩︎