Sequences & Probability
Part 5 of 8 · Previous: Algebra · Index · Next: CS Notation
22. Sequence and recurrence notation
Sequence
means:
Recurrence
defines using a smaller input.
A recurrence normally needs a base case:
Then:
Common algorithm recurrence:
This describes an algorithm that:
- creates two subproblems of size ;
- performs additional work.
23. Asymptotic complexity
| Notation | Informal meaning |
|---|---|
| Grows no faster than , up to a constant | |
| Grows at least as fast as | |
| Grows at the same asymptotic rate | |
| Grows strictly slower | |
| Grows strictly faster | |
| Their ratio approaches 1 |
Big-O
formally means that there exist constants and such that:
for every:
Big-O is an upper bound, not automatically an exact bound.
Theta
means both:
and:
24. Probability notation
| Symbol | Meaning |
|---|---|
| or | Probability of event |
| Probability of , given | |
| and are independent | |
| Expected value of | |
| Variance of | |
| Standard deviation | |
| follows distribution | |
| Independent, identically distributed samples |
Conditional probability
Read:
Probability of , knowing that occurred.
Expected value
For a discrete random variable:
This is a probability-weighted average, not necessarily a value that actually occurs.