Mathematical Background
Check your understanding of some mathematical notations and tools.
We'll cover the following...
In this lesson, we review some mathematical notations and tools used throughout this course, including logarithms, big-Oh notation, and probability theory. This review will be brief and is not intended as an introduction.
Exponentials and logarithms
The expression denotes the number raised to the power of .
The expression denotes the number raised to the power of . If is a positive integer, then this is just the value of multiplied by itself times:
When is a negative integer, . When , . When is not an integer, we can still define exponentiation in terms of the exponential function (see below), which is itself defined in terms of the exponential series, but this is best left to a calculus text.
In this course, the expression denotes the logarithm of . That is, the unique value that satisfies
Most of the logarithms in this course are base 2 (binary logarithms). For these, we omit the base, so that is shorthand for .
An informal, but useful, way to think about logarithms is to think of as the number of times we have to divide by before the result is less than or equal to . For example, when a binary search is done, each comparison reduces the number of possible answers by a factor of . This is repeated until there is at most one possible answer. Therefore, the number of comparisons done by binary search, when there are initially at most possible answers, is at most .
Another logarithm that comes up several times in this course is the natural logarithm. Here we use the notation to denote , where —Euler’s constant—is given by
The natural logarithm comes up frequently because it is the value of a particularly common integral:
Two of the most common manipulations we do with logarithms are removing them from an exponent:
and changing the base of a logarithm:
For example, we can use these two manipulations to compare the natural and binary logarithms.
...
Create a free account to access the full course.
By signing up, you agree to Educative's Terms of Service and Privacy Policy