chap algorithm analysis many algorithms (or their instantiations as programs)it is easy to come up with the equation that defines their runtime behavior most algorithms presented in this book are well understood and we can almost always give th analysis for them however discusses whole class of algorithms for which we have no th analysisjust some unsatisfying big-oh and ohm analyses exercise presents shortsimple program fragment for which nobody currently knows the true upper or lower bounds while some textbooks and programmers will casually say that an algorithm is "order ofor "big-ohof some cost functionit is generally better to use th notation rather than big-oh notation whenever we have sufficient knowledge about an algorithm to be sure that the upper and lower bounds indeed match throughout this bookth notation will be used in preference to big-oh notation whenever our state of knowledge makes that possible limitations on our ability to analyze certain algorithms may require use of big-oh or ohm notations in rare occasions when the discussion is explicitly about the upper or lower bound of problem or algorithmthe corresponding notation will be used in preference to th notation simplifying rules once you determine the running-time equation for an algorithmit really is simple matter to derive the big-ohohmand th expressions from the equation you do not need to resort to the formal definitions of asymptotic analysis insteadyou can use the following rules to determine the simplest form if (nis in ( ( )and (nis in ( ( ))then (nis in ( ( ) if (nis in (kg( )for any constant then (nis in ( ( ) if (nis in ( ( )and (nis in ( ( ))then (nf (nis in (max( ( ) ( )) if (nis in ( ( )and (nis in ( ( ))then ( ) (nis in ( ( ) ( )the first rule says that if some function (nis an upper bound for your cost functionthen any upper bound for (nis also an upper bound for your cost function similar property holds true for ohm notationif (nis lower bound for your cost functionthen any lower bound for (nis also lower bound for your cost function likewise for th notation the significance of rule ( is that you can ignore any multiplicative constants in your equations when using big-oh notation this rule also holds true for ohm and th notations