DSCI 220, 2025 W1
October 7, 2025
Goal. To prove \(f(n)=O(g(n))\), show there exist constants \(c>0\) and \(n_0\) such that
for all \(n\ge n_0\), \(f(n)\le c\,g(n)\).
Pick your region.
Choose \(n_0\) where simple comparisons are true (e.g., for \(n\ge 1\), \(n^2\ge n\); for \(n\ge e\), \(\log n\ge 1\)).
Dominate each term by \(g(n)\).
On \(n\ge n_0\), bound every term of \(f\) by a constant multiple of \(g\):
\(f(n)=\text{(term}_1)+\dots+\text{(term}_k)\ \le\ a_1 g(n)+\dots+a_k g(n)\).
Add and name the constant.
Sum the multipliers: \(f(n)\le (a_1+\cdots+a_k)\,g(n)\).
Set \(c=a_1+\cdots+a_k\).
State the line that matters.
“For all \(n\ge n_0\), \(f(n)\le c\,g(n)\). Therefore \(f(n)=O(g(n))\).”
Claim: \(n^3+100n^2\log n=O(n^3)\)
Proof:
Fill in the blanks with an appropriate response:
To find a simple asymptotic upper bound of \(f(n)\), ignore lower order terms.
and ignore constant coefficients.
A tight bound is most useful, but looser bounds fit the definition.
There is an equivalent definition for an asymptotic lower bound, called “big-Omega” (\(\Omega\)).
And finally, if functions are both \(\leq\) (big-O) and \(\geq\) (big-Omega) then they are said to be “big-Theta” of one another (\(\Theta\)). This is “asymptotic equality.”
Suppose someone claims
\[n^2\log n = O(n^2).\]
Are they correct? _____
How can you disprove?