Appendix: Mathematics Review
A certain familiarity with certain mathematical concepts will help you when trying to analyze algorithms. This section is meant as a review for some commonly used mathematical concepts, notation, and methodology. Where possible analogies between mathematical and programming concepts are drawn
Mathematical Notations and Shorthands
Shorthands
| shorthand | meaning |
|---|---|
| iff | if and only if |
| therefore | |
| approximately | |
| a * b | |
| a * b | |
| absolute value of a | |
| ceiling, round aa up to next biggest whole number. Example: | |
| floor, round aa down to the next smallest whole number. Example: |
Variables
In math, like programming, we use variables. Variables can take on some numeric value and we use it as a short hand in a mathematical expression. Before using a variable, you should define what it means (like declaring a variable in a program)
For example:
"Let n represent the size of an array"
This means that the variable n is a shorthand for the size of an array in later statements.