Overview
Advanced counting often uses bijections or recursive structure. The goal is to rephrase the problem into a simpler counting model.
Recursion is especially powerful for tilings, strings with restrictions, and state-based counting processes.
Key Ideas
- Bijection: count a set by mapping it to another set of known size.
- Recursion: count size objects by splitting into smaller sizes.
- Invariants help track what must remain constant across transformations.
- Characteristic equations solve linear recurrences.
Core Skills
Build a State Recurrence
Define states by the last few choices and build a recurrence with transitions.
Use Inclusion-Exclusion Carefully
When constraints overlap, compute total minus overlaps instead of ad hoc casework.
Identify a Bijection
Map objects to lattice paths or subsets to simplify the count.
Worked Example
Let be the number of binary strings of length with no consecutive 's. Then by considering the last digit. This is Fibonacci.
More Examples
Example 1: Tilings
Let be the number of tilings of a board with dominoes. with , .
Example 2: Inclusion-Exclusion
How many permutations of have no fixed points?
.
Example 3: Bijection
Count binary strings of length with no consecutive 's.
Map them to tilings of a board with squares and dominoes.
Strategy Checklist
- Define states clearly for recurrences.
- Look for bijections to standard models.
- Use inclusion-exclusion for overlapping constraints.
Common Pitfalls
- Double-counting when states are not disjoint.
- Forgetting initial conditions in recurrences.
- Applying inclusion-exclusion without checking overlaps.
Recursion Patterns
Tilings
For a board tiled by dominoes, the final placement is vertical or two horizontals, giving .
Strings with Constraints
If a string must avoid a pattern, classify by the last few characters to build states. Each state contributes a recurrence.
Linear Recurrences
If , solve . Then with constants from base cases.
Example 1: Explicit Recurrence
Suppose with . The homogeneous solution is . A particular solution is . So .
Example 2: Catalan Bijections
Problem. How many permutations of have no three (not necessarily consecutive) entries in decreasing order from left to right? For example, is an example of such a permutation, while is not, because of .
Solution. We split the permutation into blocks according to its left-to-right maxima. A left-to-right maximum is a number that is larger than everything before it.
For example, in the permutation
the left-to-right maxima are
So we split the permutation right before each new left-to-right maximum:
Each block starts with its maximum. In this example, the block maxima are
Now the key observation is that in a -avoiding permutation, all the numbers that are not left-to-right maxima must appear in increasing order.
For example,
has non-left-to-right maxima
which are increasing.
Why must this happen? Suppose two non-left-to-right maxima appeared in decreasing order, say
Since is not a left-to-right maximum, there is some earlier number larger than . Then we would have
which forms a pattern.
For example, the permutation
does not work. The numbers and are non-left-to-right maxima, and they appear in decreasing order. Since comes before them and is larger than both, we get
which is a pattern.
So in a -avoiding permutation, once we know the left-to-right maxima and the sizes of the blocks, the rest of the permutation is forced.
For example, suppose , the block maxima are
and the block sizes are
Then the blocks must look like
The remaining numbers are
They must be placed in increasing order, so the only possible permutation is
As another example, suppose , the block maxima are
and the block sizes are
Then the blocks must look like
The remaining numbers are
They must go in increasing order, giving
Now we connect this to Catalan paths. Let the block maxima be
and let
be the ending position of the th block.
For example, in
we have
and the block ending positions are
So we get the points
These points all satisfy
because among the first positions, all numbers must be at most . This means the corresponding path stays on or below the diagonal .
Thus, each -avoiding permutation gives a path from to that never goes above the diagonal.
Conversely, given a Catalan path, we can read off the block maxima and block sizes from its corner points. Then we fill in all non-left-to-right maxima in increasing order. Since the filling is forced, this gives exactly one -avoiding permutation.
Therefore, the number of -avoiding permutations of
is the Catalan number
For example, if , the answer is
Indeed, the -avoiding permutations are
The only permutation that does not work is
If , the answer is
Practice Problems
| Status | Source | Problem Name | Difficulty | Tags | ||
|---|---|---|---|---|---|---|
| AIME | Very Hard | Show TagsCombinatorics, Recursion | ||||
| AIME | Very Hard | Show TagsBijection | ||||
| Berkeley Math Circle Monthly Contest 7 | Hard | Show TagsCounting two ways, Recursion, bijection | ||||
| Berkeley Math Circle Monthly Contest 5 | Hard | Show Tags3D Shapes, Counting two ways | ||||
| Berkeley Math Circle Monthly Contest 4 | Hard | Show TagsCounting two ways | ||||
| Berkeley Math Circle Take-Home Contest #2 | Hard | Show TagsCounting two ways, Invariants / monovariants | ||||
| Berkeley Math Circle | Hard | Show TagsCounting two ways, Graph Theory, Invariants / monovariants | ||||
| Berkeley Math Circle | Hard | Show TagsCounting two ways, Recursion, bijection | ||||
| Berkeley Math Circle Monthly Contest 2 | Hard | Show TagsCounting two ways, Sums and products | ||||
| Berkeley Math Circle Monthly Contest 6 | Hard | Show TagsCounting two ways, Enumeration with symmetry | ||||
| Berkeley Math Circle | Hard | Show TagsCounting two ways, Recursion, bijection | ||||
| Berkeley Math Circle Monthly Contest 4 | Hard | Show TagsCounting two ways, Invariants / monovariants | ||||
| Berkeley Math Circle | Hard | Show TagsCounting two ways, Factorization techniques, τ (number of divisors) | ||||
| MathNet | Hard | Show TagsCounting two ways, Graph Theory, Invariants / monovariants | ||||
| Berkeley Math Circle Monthly Contest 5 | Hard | Show TagsAngle chasing, Counting two ways | ||||
| Berkeley Math Circle: Monthly Contest 7 | Hard | Show TagsCounting two ways, Invariants / monovariants, Sums and products | ||||
| Berkeley Math Circle | Hard | Show TagsCauchy-Schwarz, Counting two ways | ||||
| Berkeley Math Circle | Hard | Show TagsColoring schemes, extremal arguments, Constructions and loci, Counting two ways | ||||
| Berkeley Math Circle Monthly Contest 7 | Hard | Show TagsCounting two ways, Invariants / monovariants | ||||
| Berkeley Math Circle | Hard | Show TagsColoring schemes, extremal arguments, Counting two ways, Floors and ceilings, Invariants / monovariants, Linear and quadratic inequalities | ||||
| Berkeley Math Circle | Hard | Show TagsColoring schemes, extremal arguments, Counting two ways | ||||
| Berkeley Math Circle Monthly Contest 6 | Hard | Show TagsCounting two ways, Pigeonhole principle | ||||
| Berkeley Math Circle Monthly Contest 4 | Hard | Show TagsCounting two ways, Floors and ceilings, φ (Euler's totient) | ||||
| Berkeley Math Circle: Monthly Contest 6 | Hard | Show TagsCounting two ways, Enumeration with symmetry | ||||
| Berkeley Math Circle Monthly Contest 6 | Hard | Show TagsCounting two ways, Recursion, bijection | ||||
Module Progress:
Join the Discord Community!
Stuck on a problem, or don't understand a module? Join the Discord and get help with your doubts while making more math friends.
