Definition. Big O Notation

[comp1110-22]

A function \(f(x)\) is in the set \(\mathrm {O}(g(x))\) if and only if there exists constants \(c\) and \(n_0\) such that for any \(n\geq n_0\), \(f(n)\leq c \cdot g(n)\).

It's a common convention that when we say a function \(f(x)\) is \(\mathrm {O}(g(x))\), we mean that \(g(x)\) provides the tighest possible upper bound (as described above) for \(f(x)\).

bars magnifying-glass caret-down plus minus arrow-right xmark