Sunday, March 02, 2014

Logarithms

Logarithms are used to describe the complexity of algorithms and in public-key crytpography.

Logarithms are just exponents rearranged.

Let's take these variables:

T = Total
b = Base
e = exponent

Using an exponent we can say:

T = be

So let's assign numbers.

b =2
e = 3

2 x 2 x 2 = 8

Therefore

T = 8

The logarithm is just where the exponent (e) is the answer to the equation. In other words e is the exponent when applied to the base (b) that produces the total (T).

So we can rearrange the above formula like this:

e =logb(T)

or

3 = log2(8)

Since b = Te we can also say:

e = logb(be)

or

3 = log2(23)

And why do we care anyway? Ah. Because we can shorten up numbers to do calculations.

Because:

logb(xy) = logb(x) + logb(y)

More on logarithm:
http://en.wikipedia.org/wiki/Logarithm