3-1 Asymptotic behavior of polynomials
Let
\[p(n) = \sum_{i = 0}^d a_i n^i,\]where \(a_d > 0\), be a degree-\(d\) polynomial in \(n\), and let \(k\) be a constant. Use the definitions of the asymptotic notations to prove the following properties.
a. If \(k \ge d\), then \(p(n) = O(n^k)\).
b. If \(k \le d\), then \(p(n) = \Omega(n^k)\).
c. If \(k = d\), then \(p(n) = \Theta(n^k)\).
d. If \(k > d\), then \(p(n) = o(n^k)\).
e. If \(k < d\), then \(p(n) = \omega(n^k)\).
Let's see that \(p(n) = O(n^d)\). We need do pick \(c = a_d + b\), such that
When we divide by \(n^d\), we get
and
If we choose \(b = 1\), then we can choose \(n_0\),
Now we have \(n_0\) and \(c\), such that
which is the definition of \(O(n^d)\).
By chosing \(b = -1\) we can prove the \(\Omega(n^d)\) inequality and thus the \(\Theta(n^d)\) inequality.
It is very similar to prove the other inequalities.
本页面的全部内容在 小熊老师 - 莆田青少年编程俱乐部 0594codes.cn 协议之条款下提供,附加条款亦可能应用