( (log log no(log ( ) (no(nlog no( ( ( we only consider the principal growth classso when adding functions from different growth classestheir sum will always be in the larger growth class this allows us to simplify terms for examplethe growth class of ( log can be determined as follows the summand with the largest growth class is (we say that this is the 'principal sub-termor 'dominating sub-termof the function)and we are allowed to drop constant factorsso this function is in the class ( when we say that an algorithm 'belongs tosome class ( )we mean that it is at most as fast growing as we have seen that 'linear searching(where one searches in collection of data items which is unsortedhas linear complexityi it is in growth class (nthis holds for the average case as well as the worst case the operations needed are comparisons of the item we are searching for with all the items appearing in the data collection in the worst casewe have to check all entries until we find the right onewhich means we make comparisons on averagehoweverwe will only have to check / entries until we hit the correct oneleaving us with / operations both those functionsc(nn and (nn/ belong to the same complexity classnamely (nhoweverit would be equally correct to say that the algorithm belongs to ( )since that class contains all of (nbut this would be less informativeand we would not say that an algorithm has quadratic complexity if we know thatin factit is linear sometimes it is difficult to be sure what the exact complexity is (as is the case with the famous np problem)in which case one might say that an algorithm is 'at most'sayquadratic the issue of efficiency and complexity classand their computationwill be recurring feature throughout the to come we shall see that concentrating only on the complexity classrather than finding exact complexity functionscan render the whole process of considering efficiency much easier in most caseswe can determine the time complexity by simple counting of the loops and tree heights howeverwe will also see at least one case where that results in an overestimateand more exact computation is required