an average-case analysis usually requires that we calculate expected running times based on given input distributionwhich usually involves sophisticated probability theory thereforefor the remainder of this bookunless we specify otherwisewe will characterize running times in terms of the worst caseas function of the input sizenof the algorithm worst-case analysis is much easier than average-case analysisas it requires only the ability to identify the worst-case inputwhich is often simple alsothis approach typically leads to better algorithms making the standard of success for an algorithm to perform well in the worst case necessarily requires that it will do well on every input that isdesigning for the worst case leads to stronger algorithmic "muscles,much like track star who always practices by running up an incline asymptotic notation in generaleach basic step in pseudo-code description or high-level language implementation corresponds to small number of primitive operations (except for method callsof coursethuswe can perform simple analysis of an algorithm written in pseudo-code that estimates the number of primitive operations executed up to constant factorby pseudo-code steps (but we must be carefulsince single line of pseudo-code may denote number of steps in some cases