chap mathematical preliminaries in this booknearly all logarithms used have base of two this is because data structures and algorithms most often divide things in halfor store codes with binary bits whenever you see the notation log in this bookeither log is meant or else the term is being used asymptotically and the actual base does not matter if any base for the logarithm other than two is intendedthen the base will be shown explicitly logarithms have the following propertiesfor any positive values of mnand rand any positive integers and log(nmlog log log( /mlog log log(nr log loga logb nlogb the first two properties state that the logarithm of two numbers multiplied (or dividedcan be found by adding (or subtractingthe logarithms of the two numbers property ( is simply an extension of property ( property ( tells us thatfor variable and any two integer constants and bloga and logb differ by the constant factor logb aregardless of the value of most runtime analyses in this book are of type that ignores constant factors in costs property ( says that such analyses need not be concerned with the base of the logarithmbecause this can change the total cost only by constant factor note that log when discussing logarithmsexponents often lead to confusion property ( tells us that log log how do we indicate the square of the logarithm (as opposed to the logarithm of )this could be written as (log ) but it is traditional to use log on the other handwe might want to take the logarithm of the logarithm of this is written log log special notation is used in the rare case where we would like to know how many times we must take the log of number before we reach value < this quantity is written logn for examplelog because log log log and log which is total of log operations these properties are the idea behind the slide rule adding two numbers can be viewed as joining two lengths together and measuring their combined length multiplication is not so easily done howeverif the numbers are first converted to the lengths of their logarithmsthen those lengths can be added and the inverse logarithm of the resulting length gives the answer for the multiplication (this is simply logarithm property ( ) slide rule measures the length of the logarithm for the numberslets you slide bars representing these lengths to add up the total lengthand finally converts this total length to the correct numeric answer by taking the inverse of the logarithm for the result