This is an old revision of the document!


Section 2.2 Asymptotic Order of Growth

An algorithm's worst-case running time can be tested quantitatively by computing its algorithmic upper and lower bounds. To prove that an algorithm has an asymptotic upper bound of n2 we can imagine one whose worst-case running time T(n) is f(n) = pn2+qn+r. We can prove that this function is O(n2) with the inequality T(n)=pn2+qn+r⇐p2+q2+r2=(p+q+r)n2 thus T(n)⇐cn2 where c = p+q+r

courses/cs211/winter2018/journals/holmesr/section_2.2.1516158964.txt.gz · Last modified: by holmesr
CC Attribution-Noncommercial-Share Alike 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0