Counting and recurrences
The rules of counting, permutations and combinations, the pigeonhole principle, inclusion-exclusion, and recurrence relations that describe recursive processes.
About 7 hours of study
Learning objectives
- Choose between permutations and combinations
- Use the pigeonhole principle and inclusion-exclusion
- Solve simple recurrences and read algorithm costs from them
Lessons
- 1
Counting: permutations and combinations
The sum and product rules, permutations and combinations with and without repetition, Pascal's triangle and the binomial theorem.
- 2
The pigeonhole principle and inclusion-exclusion
If there are more items than boxes, some box holds two; the generalized form; the birthday problem; and counting a union of three sets.
- 3
Recurrence relations Intermediate
Sequences defined by earlier terms: the Tower of Hanoi and Fibonacci, solving by unrolling, the characteristic equation, and divide-and-conquer recurrences.
Module practice
- Permutations and combinationsEasy
- Sharing sweetsMedium
- Paths around obstaclesHard
- At least how many in one box?Easy
- Divisible by at least oneMedium
- DerangementsHard
- Tower of HanoiEasy
- Terms of a linear recurrenceMedium
- Solve with the characteristic equationHard