1/17
Vocabulary flashcards covering definitions and key rules about logarithms and exponentials.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
Logarithm
logb(a) = c if bc = a. The exponent to which base b must be raised to yield a.
Exponent–Log Inverse Rule 1
blogb(n) = n. Raising base b to the logarithm of n with base b recovers n.
Exponent–Log Inverse Rule 2
logb(bk) = k. Logarithm of a base-b power returns the exponent k.
Common Mistake: b * logb(n) ≠ n
Multiplying log by the base is not equivalent to n; the correct inverse is exponential: blogb(n) = n.
Change of Base Formula
logb(n) = logk(n) / logk(b). Used to convert a logarithm from an original base b to a new desired base k. For the formula to be valid, all variables (n, b, k) must be positive, and both bases (b and k) cannot be equal to 1.
Exponent Law: Product
bx * by = b(x+y).
Exponent Law: Quotient
bx / by = b(x-y).
Exponent Law: Power
(bx)y = b(xy).
Logarithm Law: Product
logb(xy) = logb(x) + logb(y).
Logarithm Law: Quotient
logb(x/y) = logb(x) - logb(y).
Logarithm Law: Power
logb(xk) = k * logb(x).
Special Logs: logb(1)
logb(1) = 0 because b0 = 1.
Special Logs: logb(b)
logb(b) = 1 because b1 = b.
Growth Comparison: log(n) < n^ε
For any ε > 0, log(n) grows slower than any polynomial.
Growth Comparison: nlogb(a) in Master Theorem
The term nlogb(a) often appears as a critical growth factor in the Master Theorem, a method used to solve recurrence relations of the form T(n) = aT(n/b) + f(n) for divide and conquer algorithms.
‘a’ represents the number of subproblems.
‘n/b’ is the size of each subproblem.
‘f(n)’ is the cost of the work done outside the recursive calls (e.g., combining solutions)
Common Pitfalls: 2 * log2(n) ≠ n
Multiplying a log by 2 does not equal n; only 2log2(n) = n.
Common Pitfalls: base of log
In CS and in math, log often means log2.
Pitfall: log(n2) vs (log(n))2
log(n2) = 2*log(n); beware that (log(n))^2 is NOT the same as log(n^2).