Introduction
Previously at the introductiory level of the AMC 8/10, just applying the formula itself is more prominent than the AMC 12 or early AIME level. However, harder problems are designed so that the method of direct counting is either impossible or significantly tedious. Therefore in this module, we will seek to explain many ways of restructuring an advanced counting problem to become solvable.
In the level of the AMC 12, a similar theme is that most hard counting problems have several representative patterns, transform the objects you are counting so they correspond to something simpler (bijection), count a large set and subtract the bad cases (inclusion-exclusion), or use symmetry to collapse the count (Burnside's Lemma), or using recurrences.
This module covers the core techniques, strategies, and the classical structures that appear, to give an understanding of advanced casework.
First, we recap some basic counting techniques.
Inclusion-Exclusion
Principle
For finite sets :
Equivalently, to count elements satisfying at least one of properties, we alternate between adding and subtracting the sizes of all intersections.
Hence, to count elements satisfying none of properties, otherwise known as the complement, we use
Furthermore, an element in exactly of the sets gets counted times in the first sum, subtracted times in the second, added times in the third, and so on. The total contribution is
for , and for . So every element in at least one set is counted exactly once. Therefore, this explains why inclusion-exclusion works.
Derangements
Another important technique that one should ensure to know is how to solve problems using derangements. A derangement of is a permutation where no element appears in its original position, or in other words, a permutation with no fixed points.
Let be the set of permutations where element is fixed. By the principle of inclusion-exclusion:
The values of derangements are hence , , , , , , .
The recurrence is often more useful in problems, as it directly comes from casework. Element goes to some position , and then either element goes to position ( arrangements) or it does not ().
As , . Something that is not necessary to know but is useful information is that for any large , about of all permutations are derangements.
Bijections and Double Counting
Bijections
A bijection between two sets and means that they have a one-to-one correspondence. Every element of maps to exactly one element of and vice versa. Hence if a bijection exists, .
The important idea of bijections is that to count a complicated set , we find a simpler set you already know how to count, and exhibit a bijection .
The Stars and Bars formula that is used for distributing identical objects into bins is itself a bijection between solutions to and -element subsets of .
Double Counting
Double counting means counting the same quantity in two different ways and equating the results accordingly. This often proves combinatorial identities or gives important information for a question that counting alone would not give.
Example. Prove .
We can think of this situation as the number of ways to choose people from a group of men and women. This gives . Alternatively, we choose men and women for each , giving
Since these are equal, we prove Vandermonde's identity in the symmetric case.
There are many other standard ways to do this.
Catalan Numbers
Catalan numbers are natural numbers that appear in many counting problems involving recursive or non-crossing structures.
The th Catalan number is
The first few values are
Some common appearances of Catalan numbers are:
The number of sequences of steps right and steps up from to that never go above the diagonal is .
The number of ways to fully parenthesize a product of factors is .
The number of ways to triangulate a convex -gon is .
The number of ways to connect points on a circle with non-crossing chords is .
More generally, the number of paths from to using unit right and up steps that never go above the diagonal , meaning there are always at least as many right steps as up steps, is
One way to prove this is by reflection. Count all paths from to , then subtract the bad paths that go above the diagonal. A bad path must touch the line . Reflecting the part of the path up to its first touch of this line gives a bijection with paths from to .
Thus,
For the special case , this becomes
Solving Linear Recurrences
Furthermore, linear recurrences with constant coefficients are another type of difficult competition problem.
The characteristic equation is
If its roots are , then the general solution is
where the constants are determined by conditions given in the question.
For the Fibonacci recurrence , the roots are and , which gives Binet's formula:
These are often for more complex problems, but it may be fruitful to know.
Examples
Example 1: Inclusion-Exclusion
Problem. How many permutations of have no two adjacent identical letters?
Solution. First, we calculate the total arrangements of :
Let be the arrangements with both A's adjacent, be the arrangements with both B's adjacent, and be the arrangements with both C's adjacent.
For each ,
If two pairs are adjacent, then there are
arrangements. Since there are choices for the two adjacent pairs, the total contribution is .
If all three pairs are adjacent, then there are
arrangements.
Thus, by inclusion-exclusion,
Arrangements with no two adjacent identical letters are therefore
Example 2: Derangements
Problem. Five students each write their name on a card, then the cards are shuffled and redistributed. What is the probability that no student receives their own card?
Solution. We first find the total amount of permutations: . Hence, the number of derangements is
Probability is therefore
Example 3: Catalan Numbers
Problem. How many sequences of and of length have all partial sums nonnegative? In other words, every prefix has at least as many s as s.
Solution. This is equivalent to counting sequences of steps right and steps up from to that stay below the diagonal.
Thus, this is the number of paths from to staying below , and the number of sequences of values and values with all partial sums nonnegative, starting from , is the Catalan number
For :
Example 4: Recursion
Problem. A frog starts at step of a staircase. At each jump, it can go up or steps. How many ways can it reach step ?
Solution. Let be the number of ways to reach step .
The recurrence is
with and .
Then
Practice Problems
| Status | Source | Problem Name | Difficulty | Tags | ||
|---|---|---|---|---|---|---|
| AMC 12 | Hard | Show TagsCasework, Combinatorics | ||||
| Berkeley Math Circle: Monthly Contest 8 | Hard | Show TagsCombinatorics | ||||
| MathNet | Hard | Show TagsCombinatorics | ||||
| Harvard-MIT Math Tournament | Hard | Show TagsCombinatorics | ||||
| Harvard-MIT Mathematics Tournament | Hard | Show TagsCombinatorics | ||||
| Harvard-MIT Mathematics Tournament | Hard | Show TagsCombinatorics | ||||
| Harvard-MIT Mathematics Tournament | Hard | Show TagsCombinatorics, Factorization techniques | ||||
| $10^{\text {th }}$ Annual Harvard-MIT Mathematics Tournament | Hard | Show TagsCombinatorics | ||||
| 12th Annual Harvard-MIT Mathematics Tournament | Hard | Show TagsCartesian coordinates, Circles, Combinatorics | ||||
| Harvard-MIT Mathematics Tournament | Hard | Show TagsCombinatorics, Enumeration with symmetry | ||||
| Harvard-MIT Mathematics Tournament | Hard | Show TagsCombinatorics | ||||
| Harvard-MIT November Tournament | Hard | Show TagsCombinatorics | ||||
| 13th Annual Harvard-MIT Mathematics Tournament | Hard | Show TagsCombinatorics | ||||
| Harvard-MIT November Tournament | Hard | Show TagsCombinatorics | ||||
| Harvard-MIT November Tournament | Hard | Show TagsCombinatorics | ||||
| Harvard-MIT November Tournament | Hard | Show TagsCombinatorics, Modular Arithmetic | ||||
| HMMT 2014 | Hard | Show TagsCombinatorics | ||||
| HMMT November 2017 | Hard | Show TagsCombinatorics, Determinants, Vectors | ||||
| HMMT November 2018 | Hard | Show TagsCombinatorics | ||||
| HMMT November 2018 | Hard | Show TagsCombinatorics, Other | ||||
| Berkeley Math Circle: Monthly Contest 4 | Hard | Show TagsCombinatorics | ||||
| HMMT November 2022 | Hard | Show TagsCombinatorics | ||||
| HMMT February 2023 | Hard | Show TagsCombinatorics | ||||
| HMMT February | Hard | Show TagsCombinatorics, Modular Arithmetic | ||||
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.
