🏆 Subsection I · Core International Olympiad Pillars (Chapters 1–8)
5
Combinatorics II: Recurrence Relations, Catalan Numbers & Olympiad Probability
🔁 Core Pillar 5 — Recurrences, Markov States & Geometric ProbabilityIMO · NSMO · KAUST KMC · Linear recurrences & characteristic roots · Catalan numbers C_n (Dyck paths & triangulations) · Coupled Markov parity/state recurrences · Linearity of expectation & indicator variables · Continuous geometric probability on [0, L]²
Whenever direct casework explodes exponentially—tiling a 2 times n2×n strip, counting binary strings without forbidden substrings, or tracking random walks—Olympiad combinatorics conditions on the first or last step to derive a recurrence relation. Coupled with Catalan bijections, indicator linearity of expectation, and continuous area-ratio probability, these methods turn intricate stochastic and recursive systems into exact closed-form answers.
● Definition 5.1 — Linear Recurrences & The Catalan Sequence
1. Characteristic Polynomial: A homogeneous linear recurrence a_n = c_1 a_{n-1} + c_2 a_{n-2} an=c1an−1+c2an−2 has characteristic equation \( r^2 - c_1 r - c_2 = 0 \). If roots \( r_1 \ne r_2 \) are distinct, \( a_n = A r_1^n + B r_2^n \); if \( r_1 = r_2 = r \), \( a_n = (A + Bn)r^n \).
2. Catalan Numbers \( C_n \): Defined by \( C_0 = 1 \) and the convolution recurrence \( C_{n+1} = \sum_{k=0}^n C_k C_{n-k} \), with closed form:
\( C_n \) counts: (i) monotonic lattice paths from \( (0,0) \) to \( (n,n) \) never rising above \( y = x \) (Dyck paths), (ii) valid parenthesizations of \( n \) pairs, (iii) triangulations of a convex \( (n+2) \)-gon, and (iv) non-crossing chord matchings of \( 2n \) points on a circle.
● Theorem 5.2 — Linearity of Expectation & Continuous Geometric Probability
1. Linearity of Expectation (No Independence Required!): For ANY random variables \( X_1, X_2, \dots, X_n \) on the same sample space—even if heavily dependent—
In particular, if \( I_k \in \{0, 1\} \) is the indicator of event \( E_k \), then \( \mathbb{E}[I_k] = \mathbb{P}(E_k) \).
2. Geometric Probability Measure: When independent real parameters \( (X, Y) \) are chosen uniformly over a bounded region \( \Omega \subset \mathbb{R}^2 \) with \( \operatorname{Area}(\Omega) > 0 \), the probability of event \( A \subseteq \Omega \) is \( \mathbb{P}(A) = \frac{\operatorname{Area}(A)}{\operatorname{Area}(\Omega)} \).
◆ Proof — André’s Reflection Proof of C_n & Indicator Proof of Expected Fixed Points
1. André’s Reflection Method for \( C_n \): Total lattice paths from \( (0,0) \) to \( (n,n) \) equal \( \binom{2n}{n} \). Any "bad" path crossing above \( y = x \) hits the forbidden line \( y = x + 1 \) at some first point \( P \). Reflecting the prefix of the path before \( P \) across \( y = x + 1 \) maps the start \( (0,0) \) to \( (-1, 1) \), creating an exact bijection between bad paths and all paths from \( (-1,1) \) to \( (n,n) \), of which there are \( \binom{(n+1)+(n-1)}{n+1} = \binom{2n}{n+1} \). Subtracting gives \( C_n = \binom{2n}{n} - \binom{2n}{n+1} = \frac{1}{n+1}\binom{2n}{n} \).
2. Expected Fixed Points in a Random Permutation: For a uniform random permutation \( \pi \in S_n \), let \( I_k = 1 \) if \( \pi(k) = k \) and \( 0 \) otherwise. By symmetry \( \mathbb{P}(\pi(k) = k) = \frac{1}{n} \). Without touching derangements, linearity of expectation yields \( \mathbb{E}[\text{fixed points}] = \sum_{k=1}^n \mathbb{E}[I_k] = n \cdot \frac{1}{n} = 1 \) for every \( n \ge 1 \)! \( \blacksquare \)
If \(E_n + O_n = k^n\) and \(E_n - O_n = d^n\), then \(E_n = \frac{k^n + d^n}{2}\)
First-Step Markov Conditioning
For expected hitting time \(E\) from state \(s\): \(E_s = 1 + \sum_t P(s \to t) E_t\)
Meeting Band Area
In \([0,L]^2\), \(\mathbb{P}(|X-Y| \le d) = 1 - \left(1 - \frac{d}{L}\right)^2\) for \(0 \le d \le L\)
Continuous Olympiad meeting problem on \([0,6]^2\): two unshaded corner right triangles of leg \(6 - 2 = 4\) have combined area \(2 \cdot \frac{1}{2}(4^2) = 16\), so \(\mathbb{P}(|X - Y| \le 2) = \frac{36 - 16}{36} = \frac{20}{36} = \frac{5}{9}\).
Exact state probability \(p_n\) for \(p_n = (1-q)p_{n-1} + q(1-p_{n-1})\) and Catalan numbers \(C_n\)
Parameter / Invariant
Computed Value
Even-Parity \(\mathbb{P}(\text{even at } n)\)0.5156
Eigen-Decay \((1 - 2q)^n\)0.0313
Catalan Number \(C_n\)C₅ = 42
Because \(p_n - \frac{1}{2} = (1 - 2q)(p_{n-1} - \frac{1}{2})\), starting at \(p_0 = 1\) yields \(p_n = \frac{1 + (1 - 2q)^n}{2}\), converging exponentially to \(\frac{1}{2}\)!
Growth of \(C_n = \frac{1}{n+1}\binom{2n}{n}\) for \(n = 1, \dots, 6\): memorizing up to \(C_6 = 132\) saves crucial minutes on NSMO, KAUST KMC, and AIME polygon triangulation and Dyck-path problems.
Worked Example 5.A — Coupled Parity Recurrence Over Quarternary Digits (AMC 12 / NSMO Stage 2)
Problem. How many \( 6 \)-digit strings formed from the alphabet \( \{0, 1, 2, 3\} \) (leading zeros allowed) contain an even number of \( 0 \)s?
▸ Show step-by-step solution
Let \( E_n \) and \( O_n \) denote the number of \( n \)-digit strings over \( \{0,1,2,3\} \) with an even and odd number of \( 0 \)s, respectively. 1. Appending \( 1, 2, \) or \( 3 \) (\( 3 \) choices) preserves parity; appending \( 0 \) (\( 1 \) choice) flips parity: \[ E_n = 3E_{n-1} + O_{n-1}, \qquad O_n = E_{n-1} + 3O_{n-1}. \] 2. Add and subtract the two equations to diagonalize instantly: \[ E_n + O_n = 4(E_{n-1} + O_{n-1}) = 4^n, \qquad E_n - O_n = 2(E_{n-1} - O_{n-1}) = 2^n. \] 3. Averaging gives \( E_n = \frac{4^n + 2^n}{2} \). For \( n = 6 \): \[ E_6 = \frac{4^6 + 2^6}{2} = \frac{4096 + 64}{2} = \frac{4160}{2} = 2080. \]
Worked Example 5.B — Non-Crossing Chords & Polygon Triangulation via Catalan (KAUST KMC)
Problem. Ten distinct points \( P_1, P_2, \dots, P_{10} \) lie in cyclic order on a circle. In how many ways can we pair them up with \( 5 \) chords so that NO two chords intersect inside the circle?
▸ Show step-by-step solution
Label the points \( 1, 2, \dots, 10 \). Point \( 1 \) must pair with an even-indexed point \( 2k + 2 \) (for \( k = 0, 1, 2, 3, 4 \)), because otherwise an odd number of points would be trapped on each side of chord \( (1, j) \), forcing a crossing! Once chord \( (1, 2k+2) \) is drawn, the \( 2k \) points on one side and \( 8 - 2k \) points on the other side must independently form non-crossing matchings: \[ M_5 = \sum_{k=0}^4 M_k M_{4-k} = C_5 = \frac{1}{5 + 1}\binom{10}{5} = \frac{252}{6} = 42. \]
Worked Example 5.C — Expected Local Maxima via Indicator Variables (AIME / NSMO Finals)
Problem. The integers \( 1, 2, \dots, 12 \) are arranged in a uniform random permutation \( (a_1, a_2, \dots, a_{12}) \). An index \( i \) is called a peak if \( a_i \) is strictly greater than all of its immediate neighbors (note \( a_1 \) has only neighbor \( a_2 \), and \( a_{12} \) has only neighbor \( a_{11} \)). Find the expected number of peaks.
▸ Show step-by-step solution
Define indicator \( I_i = 1 \) if position \( i \) is a peak, and \( 0 \) otherwise. 1. At the two endpoints (\( i = 1 \) and \( i = 12 \)): \( a_1 > a_2 \) occurs in exactly half of all permutations by symmetry, so \( \mathbb{E}[I_1] = \mathbb{E}[I_{12}] = \frac{1}{2} \). 2. At each of the \( 10 \) interior positions (\( 2 \le i \le 11 \)): among the three adjacent elements \( \{a_{i-1}, a_i, a_{i+1}\} \), all \( 3! = 6 \) relative orderings are equally likely, and \( a_i \) is the largest of the three in \( 2 \) of the \( 6 \) orderings (probability \( \frac{1}{3} \)). Thus \( \mathbb{E}[I_i] = \frac{1}{3} \). 3. By Linearity of Expectation: \[ \mathbb{E}[\text{peaks}] = \frac{1}{2} + 10 \cdot \frac{1}{3} + \frac{1}{2} = 1 + \frac{10}{3} = \frac{13}{3}. \]
Worked Example 5.D — Markov Expected Waiting Time for Consecutive Heads (KAUST Finals)
Problem. A fair coin is tossed repeatedly until two consecutive Heads (\( HH \)) appear. Find the expected number of tosses required.
▸ Show step-by-step solution
Let \( E_0 \) be the expected remaining tosses from the start (or right after a Tail \( T \)), and let \( E_1 \) be the expected remaining tosses right after seeing a single Head \( H \). 1. From state \( 0 \): we toss once. With probability \( \frac{1}{2} \) we get \( T \) (staying in state \( 0 \)), and with probability \( \frac{1}{2} \) we get \( H \) (moving to state \( 1 \)): \[ E_0 = 1 + \frac{1}{2}E_0 + \frac{1}{2}E_1 \implies E_0 = 2 + E_1. \] 2. From state \( 1 \): we toss once. With probability \( \frac{1}{2} \) we get \( H \) (done! \( 0 \) more tosses), and with probability \( \frac{1}{2} \) we get \( T \) (resetting back to state \( 0 \)): \[ E_1 = 1 + \frac{1}{2}(0) + \frac{1}{2}E_0. \] 3. Substitute \( E_1 = 1 + \frac{1}{2}E_0 \) into \( E_0 = 2 + E_1 \): \( E_0 = 3 + \frac{1}{2}E_0 \implies \frac{1}{2}E_0 = 3 \implies E_0 = 6 \) tosses!
⚠ Olympiad Trap — Initial Offset Errors in Fibonacci-Type Recurrences
Both \( 2 \times n \) domino tilings \( T_n \) and \( n \)-bit strings without \( 11 \) \( S_n \) obey \( a_n = a_{n-1} + a_{n-2} \), yet \( T_1 = 1, T_2 = 2 \) while \( S_1 = 2, S_2 = 3 \)! Always compute \( a_1 \) and \( a_2 \) by hand before quoting a Fibonacci number.
Whenever a problem asks for ways to process \( n \) inflows and \( n \) outflows so the cumulative balance never goes negative (e.g., \( n \) buyers with 5-riyal notes and \( n \) with 10-riyal notes at an empty register), the answer is immediately \( C_n = \frac{1}{n+1}\binom{2n}{n} \) (multiplied by \( n! \cdot n! \) if people are distinguishable)!
[Practice 5.1 · NSMO Stage 1 / Easy] How many binary strings of length \( 7 \) (using digits \( 0 \) and \( 1 \)) do NOT contain two consecutive \( 1 \)s?
💡 Hint 1 of 3
Condition on the last bit: ending in \( 0 \) leaves \( S_{n-1} \) valid prefixes; ending in \( 01 \) leaves \( S_{n-2} \).
[Practice 5.2 · KAUST KMC Regional / Easy] In how many ways can a convex octagon (\( 8 \)-gon) be partitioned into \( 6 \) triangles by non-intersecting diagonals?
💡 Hint 1 of 3
Recall that triangulations of a convex \( (n+2) \)-gon equal the \( n \)-th Catalan number \( C_n \).
💡 Hint 2 of 3
For an \( 8 \)-gon, \( n + 2 = 8 \implies n = 6 \).
💡 Hint 3 of 3
Evaluate \( C_6 = \frac{1}{7}\binom{12}{6} \).
For a convex \( (n+2) \)-gon with \( n+2 = 8 \), \( n = 6 \), giving \( C_6 = \frac{1}{7}\binom{12}{6} = \frac{924}{7} = 132 \) triangulations.
Fit \( a_n = A \cdot 2^n + B \cdot 3^n \) to \( a_0 = 2 \) and \( a_1 = 5 \).
💡 Hint 3 of 3
Notice \( A = 1, B = 1 \), so \( a_n = 2^n + 3^n \)!
The characteristic equation \( (r - 2)(r - 3) = 0 \) gives \( a_n = A \cdot 2^n + B \cdot 3^n \). From \( A + B = 2 \) and \( 2A + 3B = 5 \), we get \( A = 1, B = 1 \). Hence \( a_5 = 2^5 + 3^5 = 32 + 243 = 275 \).
[Practice 5.4 · AMC 12 / KAUST KMC / Hard] Two researchers arrive independently and uniformly at random between 9:00 AM and 10:00 AM at a KAUST lab. Each waits \( 15 \) minutes for the other before leaving. Find the exact probability they meet.
💡 Hint 1 of 3
Model arrival times \( (X, Y) \in [0, 60]^2 \); they meet iff \( |X - Y| \le 15 \).
💡 Hint 2 of 3
Compute the combined area of the two corner triangles where \( |X - Y| > 15 \) (each has leg \( 60 - 15 = 45 \)).
On \( [0, 60]^2 \), the complement \( |X - Y| > 15 \) consists of two right triangles of leg \( 45 \), with area fraction \( \left(\frac{45}{60}\right)^2 = \left(\frac{3}{4}\right)^2 = \frac{9}{16} \). Thus \( \mathbb{P}(\text{meet}) = 1 - \frac{9}{16} = \frac{7}{16} \).
[Practice 5.5 · NSMO National Finals / AIME] A bug starts at vertex \( A \) of regular tetrahedron \( ABCD \) and each second walks along a random edge to one of the \( 3 \) adjacent vertices. What is the probability it is back at \( A \) after \( 4 \) steps?
💡 Hint 1 of 3
By symmetry, collapse vertices \( \{B, C, D\} \) into a single "not-\( A \)" state!
💡 Hint 2 of 3
Let \( p_n = \mathbb{P}(\text{at } A \text{ on step } n) \). If at \( A \), next step leaves \( A \); if not at \( A \), probability \( \frac{1}{3} \) returns to \( A \): \( p_n = \frac{1}{3}(1 - p_{n-1}) \).