Summary: Mathematical Background
Everything on one page, to review the appendix or to look up a formula.
Sums, logarithms and factorials
From Sums, Logarithms and Factorials:
| Result | Formula |
|---|---|
| Arithmetic series | |
| Sums of powers | |
| Geometric series, | Dominated by the last term |
| Geometric series, | Dominated by the first term |
| Harmonic numbers | |
| Stirling's formula | |
| Logarithm of the factorial |
- counts how many times can be halved.
- The base of a logarithm does not matter inside , but it does inside an exponent.
Induction, correctness and recurrences
From Induction, Correctness and Recurrences:
- Induction: base case plus inductive step. Strong induction may assume all smaller cases, which fits divide and conquer.
- A recursive algorithm is correct if its base cases are correct, its combination is correct assuming the recursive calls are, and every call reaches a base case.
- Loop invariants prove iterative algorithms: initialization, maintenance and termination.
- Recurrences are solved by unrolling, the recursion tree, guess and verify (with explicit constants), or, for linear recurrences, characteristic roots.
Saved only in your browser
Questions, or something wrong?
Errors, suggestions and public questions open a form on GitHub, visible to everyone.