Skip over navigation

Searches: Efficiency

Problems

Abstract Time

Efficiency and Big-O notation

Problem : Define "abstract time".

Real time would be measured in some real unit, such as seconds. Abstract time is measured in abstract units, such as the number of significant steps performed in an execution of an algorithm, or the number of some significant operations performed, such as comparisons, multiplications, copies, etc.

Problem : Define "asymptotic analysis".

An asymptotic analysis of a function gives the limiting behavior of the execution time of an algorithm, usually denoted in Big-O notation (we'll cover this in the next section), as the size of the problem approaches infinity. This is helpful in comparing the efficiency of two functions given relatively large input sizes.

Problem : What is the asymptotic bound of the function f (n) = 7logn + 2n 2 + nlogn ?

As n approaches infinity, the only term that matters at all in this equation is the 2n 2 . Therefore, the asymptotic bound of this function is n 2 .

Problem : What is the asymptotic bound of the function f (n) = 100n 5 +2000n 4 + 18/n ?

As n approaches infinity, the dominant term in this equation is the 100n 5 , so the asymptotic bound of this function is n 5 .

Problem : What is the asymptotic bound of the function f (n) = 100/n 2*nlogn .

f (n) = 100/n 2*nlogn = 100logn/n Therefore the asymptotic bound is logn/n .

Follow Us