You are on page 1of 3

Asympto(c

 
Analysis  

Big-­‐Oh:  Defini(on  
Design  and  Analysis  
of  Algorithms  I  
Big-­‐Oh:  English  Defini(on  
Let  T(n)  =  func(on  on  n  =  1,2,3,…  
[usually,  the  worst-­‐case  running  (me  of  an  algorithm]  

Q  :  When  is  T(n)  =  O(f(n))  ?  


A  :  if  eventually  (for  all  sufficiently  large  n),  T(n)  is  bounded  
above  by  a  constant  mul(ple  of  f(n)  

Tim  Roughgarden  
Big-­‐Oh:  Formal  Defini(on  
Formal  Defini(on  :  T(n)  =  O(f(n))  if  
and  only  if  there  exist  constants          
       such  that  

For  all  

Warning  :                      cannot  depend  on  n  

Tim  Roughgarden  

You might also like