invisible miller

Page 1

Exponentiation and Logarithms Jesper Larsson, IT University of Copenhagen Important basic knowledge required for the course Foundations of Computing – Algorithms and Data Structures.

Exponentiation Exponentiation is written x n , where x is called the base and n is the exponent. It is a shorthand for repeated multiplication: x n = |x · x · x · {z · · · n times

· x}

Clearly,

Verify that you are able to deduce these equations yourself!

x n · x m = x n+m and

xn = x n−m xm It is convenient to generalize to non-positive exponents, and define x0 = 1 for any x 6= 0, and x −n = 1/x n , which makes sense for the equations above. (Why?) Then, we can generalize exponentiation to fractions. We should have x1/2 · x1/2 = x1/2+1/2 = x, which is fulfilled if and only if we √ √ define x1/2 = x. By the same argument, x1/3 = 3 x.

Logarithm Applying a logarithm is the opposite of exponentiation. The base b logarithm of the number x is the number n such that bn = x: logb x = n

⇐⇒

bn = x

Memorize!

In other words: blogb x = x Another, perhaps more intuitive, way to think of logb x is “the number of times you can divide x by b before you get down to 1.” In algorithm analysis, we are usually concerned with the base two logarithm, also called binary logarithm. We use this special notation for the binary logarithm: lg x = log2 x When x = 2n for some integer n (in other words, x is a power of two), lg x is an integer. But the logarithm is well-defined for any √ positive number. For instance, lg 2 = 1/2, by the generalization above. The exact definition of the logarithm of any positive number is beyond our scope. But we can get an idea of the approximate value of, for example, lg 10, if we note that if a < b < c, for positive a, b, and c, then we should also have lg a < lg b < lg c (why?). Therefore,

Deduce and memorize!


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.