Quant Ladder

Combinatorics: Counting Without Enumerating

2 min read

Most probability questions are secretly counting questions: favorable outcomes over total outcomes. Fluency means recognizing which counting pattern you're looking at within seconds.

The core four

Ordered, no repetition (permutations). Ways to arrange kk of nn distinct items: n!(nk)!\frac{n!}{(n-k)!}. All nn: just n!n!.

Unordered, no repetition (combinations). (nk)=n!k!(nk)!\binom{n}{k} = \frac{n!}{k!(n-k)!} — choose a committee, a poker hand, a subset. The identity (nk)=(nnk)\binom{n}{k} = \binom{n}{n-k} (choosing who's in ≡ choosing who's out) saves arithmetic constantly.

Ordered, with repetition. nkn^k — passwords, dice sequences (the 666^6 in the all-faces-distinct question).

Unordered, with repetition (stars and bars). Ways to put kk identical balls into nn boxes: (k+n1n1)\binom{k + n - 1}{n - 1}. The disguises are many: non-negative integer solutions of x1++xn=kx_1 + \cdots + x_n = k, dice-sum counts, distributing $10 among 4 traders.

The meta-skill is classification: before computing anything, ask "does order matter? can items repeat?" — two binary questions, four formulas.

Inclusion-exclusion

To count a union, add the pieces, subtract the overlaps, add back the triple overlaps:

ABC=A+B+CABACBC+ABC|A \cup B \cup C| = |A| + |B| + |C| - |A\cap B| - |A\cap C| - |B\cap C| + |A\cap B\cap C|

The classic application: derangements — permutations with no fixed point ("no one gets their own hat"). Inclusion-exclusion gives

Dn=n!k=0n(1)kk!n!eD_n = n!\sum_{k=0}^{n}\frac{(-1)^k}{k!} \approx \frac{n!}{e}

so the probability a random permutation has no fixed point converges to 1/e37%1/e \approx 37\% — nearly independent of nn, a genuinely shocking fact that makes it a recurring interview closer. (Companion fact via linearity: the expected number of fixed points is exactly 1, for any nn.)

Symmetry and overcounting

The professional's move is dividing out overcounting rather than counting directly:

  • Circular arrangements: nn people around a table: n!n=(n1)!\frac{n!}{n} = (n-1)! — divide by rotations.
  • Poker probabilities: P(full house) =13(43)12(42)(525)0.14%= \frac{13 \cdot \binom{4}{3} \cdot 12 \cdot \binom{4}{2}}{\binom{52}{5}} \approx 0.14\%. Structure: choose the rank triple, its suits, the pair rank, its suits; divide by all hands. Every poker question has this choose-the-structure shape, and SIG in particular loves them.
  • Grid paths: lattice paths from (0,0)(0,0) to (m,n)(m,n) moving only right/up: (m+nm)\binom{m+n}{m} — arrange the sequence of moves. Add a forbidden diagonal and you're at the reflection principle and Catalan numbers 1n+1(2nn)\frac{1}{n+1}\binom{2n}{n} — worth recognizing, rarely required in full.

The interview version

"8 people, split into two teams of 4 — how many ways?"(84)/2=35\binom{8}{4}/2 = 35: the division by 2 (unlabeled teams) is the entire point of the question. "How many ways to give 10 identical chips to 4 players?" — stars and bars, (133)=286\binom{13}{3} = 286. "Five letters into five envelopes at random — P(nobody gets theirs)?"D5/5!=44/1200.3671/eD_5/5! = 44/120 \approx 0.367 \approx 1/e. Classify first, compute second, and say the classification out loud — the narration is most of the grade.