Useful theorems¶
Stirling's factorial approximation theorem
Theorem
Theorem
Let \(m\in\mathbb{N}\). Then
proof
For \(m=1\), since
it is clear that the theorem holds.
Assume the theorem holds for some \(s\in\{1,2,\dots,m-1\}\), where \(m\ge 2\). Since
By induction hypothesis, for \(s\in\{1,2,\dots,m-1\}\), we have
Since \(1+n^{m+1}\) is of \(\Theta(n^{m+1})\), RHS is also of \(\Theta(n^{m})\), and combining the induction hypothesis,
Because \(\Theta(n^m+n^{m-1}+\dots+n)=\Theta(n^{m})\), this forces \(\sum_{k=1}^{n}k^{m}=\Theta(n^{m+1})\), which completes the induction.
Theorem
\(f(n)=\Theta(g(n))\) if and only if \(f(n)=O(g(n))\) and \(f(n)=\Omega(g(n))\).
usage
Show that
proof
Since
\(\lg n!=O(n\lg n)\).
Since
\(\lg n!=\Omega(n\lg n)\).
Polynomially boundedness¶
Polynomially boundedness
\(f(n)\) is said to be polynomially bounded if \(f(n)=\Theta(n^m)\) for some \(m\in\mathbb{N}\).
Theorem
\(f\) is polynomially bounded if and only if \(\lg f(n)=O(\lg n)\).
proof
Suppose \(f\) is polynomially bounded. There are \(m,n_0\in\mathbb{N}\) and \(c_1\ge c_2>0\) such that
for \(n\ge n_0\).
Since \(\lg x\) is strictly increasing, for \(n\ge n_0\), we have
i.e., \(f(n)=O(\lg c_1+m\lg n)=O(\lg n)\).
Suppose that \(\lg f(n)=O(\lg n)\). Then there are \(c_1\ge c_2>0\) and \(n_0\in\mathbb{N}\) such that if \(n\ge n_0\),
Therefore, \(f\) is polynomially bounded.