Fundamental Counting
Multiplication (AND). A task done in independent stages with ways per stage has total outcomes. Addition (OR). Disjoint cases add: . Ex. 2 letters then 3 digits: plates.
Arrange of distinct objects in ordered slots:
Ex. Gold/silver/bronze among runners: .
Choose of distinct objects, ignoring order:
Ex. A -person committee from : .
Arrange objects with copies of type ():
Ex. MISSISSIPPI: .
Arrangements around a circle count only relative position (fix one seat to remove rotations):
Ex. people at a round table: .
Tip. Titles, ranks, and ordered slots signal permutations; committees, subsets, and hands signal combinations. Labeled chairs make a “circular” problem linear again (, not ).
Counting Strategies
Split into disjoint, exhaustive cases; count each; add. Choose the split that makes each case easy and keeps cases from overlapping. Ex. Rolls of two dice summing to a multiple of : cases sum give .
Count the opposite and subtract from the total: . Ideal for “at least one.” Ex. -digit numbers with a digit : .
Build a valid object step by step, multiplying the choices available at each step (keep the count per step constant, or split into cases). Ex. books, dictionary on an end: .
Count an easy ordered/labeled way, then divide by the symmetries you introduced: rotations (), reflections (), interchangeable groups (). Ex. Split players into unlabeled pairs: .
If a set is hard to count, find a one-to-one correspondence with a set you can count; equal sizes. Ex. Grid paths strings of R's, U's: .
Tip. “At least one” complement. When a direct build overcounts by a fixed factor, count with order and divide. A clever bijection often turns a messy object into a simple string or lattice path.
Distributions: Stars & Bars
The number of solutions to with each (identical items into distinct boxes) is
Ex. identical candies among kids: .
For , give each variable one unit first ():
Ex. candies, each kid at least one: .
For upper bounds like , subtract the “overflow” cases with inclusion--exclusion (give a violating variable units, then recount). Ex. , each : .
Split distinct items into labeled groups of sizes :
Ex. Deal distinct cards into piles of : .
Tip. Stars and bars needs identical items and distinct boxes. “Each at least one” subtracts from first; upper bounds require inclusion--exclusion; distinct items use the multinomial instead.
Binomial Theorem & Identities
Ex. Coefficient of in is .
Ex. .
Ex. Subsets of a -set: ; equal numbers of even- and odd-sized subsets.
Ex. .
Ex. Pick from boys girls: .
Ex. ; paths to : .
Tip. Prove identities combinatorially (count one set two ways) when algebra stalls. To evaluate a weird sum, match it to the binomial theorem by choosing clever (e.g. gives ; gives ).
Inclusion--Exclusion, Derangements & Pigeonhole
Ex. divisible by or : .
Ex. letters, wrong envelopes: .
Functions from an -set onto a -set, by PIE:
Ex. Onto maps : .
Place items into boxes: some box holds at least items (basic case: a box has ). Ex. people share a birth month: some month has .
Tip. PIE shines for “at least one property” with overlapping conditions. For pigeonhole, the art is choosing the pigeons and holes; look for a quantity forced to repeat.
Recursion, Catalan & Generating Functions
Set up from smaller cases by conditioning on the last choice. Tiling a strip with and pieces:
Ex. strip: tilings.
Counts balanced parentheses, non-crossing paths, triangulations, binary trees. Ex. Valid sequences of pairs of parentheses: .
Encode a sequence as coefficients of ; products of series combine choices. Key:
Ex. Ways to make from parts : coefficient of in is .
Tip. When a count depends on a process built up one step at a time, define a recurrence by conditioning on the first or last move. Recognize Catalan whenever “balanced/non-crossing/never-dips-below” appears.
Probability Fundamentals
Ex. Two dice sum to : .
Compute favorable and total outcomes with the same counting rules (order-consistent on both). Ex. aces in a -card hand: .
Events are independent iff
Ex. Two coins both heads: .
When outcomes fill a continuous region, probability is a ratio of measures (length, area, volume):
Ex. Random point in with : area , so .
Tip. Keep numerator and denominator counted the same way (both ordered or both unordered). “At least one” in probability also loves the complement: .
Conditional Probability & Bayes
Ex. Die shows even, chance it's : .
Ex. Two cards, both hearts (no replacement): .
For a partition of the sample space:
Ex. Urn A (bag ): .
Ex. Test accurate, disease rate : .
Tip. “Given that” conditional; restrict the sample space to the given event. When you know but want , use Bayes. Rare conditions make “accurate” tests deceptively unreliable.
Expected Value
Ex. One fair die: .
Always true, even for dependent variables:
Ex. Sum of dice: .
Let if event occurs, else ; then and . Ex. Expected fixed points of a random permutation of : .
Let be the expected value from a state; condition on the next step and solve the resulting equation(s). Ex. Flips until first head: .
Geometric waiting time for a prob- event: . Collecting all coupons:
Ex. All die faces: .
Tip. “Expected number of ” almost always means indicators linearity --- never fight the dependence. For a repeating process with memory, set up a states equation and solve for .
Problem-Solving Playbook
multicols2
- 3pt
- order matters, no repeat
- order doesn't matter
- repeated letters/objects multinomial
- around a circle
- “at least one” complement
- distribute identical items stars and bars
- distinct items into groups multinomial
- overlapping conditions / “or” inclusion--exclusion
- nothing in its place derangement
- something forced to repeat pigeonhole
- balanced / non-crossing Catalan
- process built step by step recursion
- “given that” / updated info conditional / Bayes
- continuous / random point geometric probability
- expected count of something linearity + indicators
- repeated states with memory expectation via states
- time until first success waiting time
- weird binomial sum known identity / count two ways
multicols
Master flow. (1) AND multiply, OR add. (2) Does order matter? (3) Did I overcount by symmetry? (4) Is the complement easier? (5) For probability, count favorable and total the same way; for expectation, reach for linearity before anything clever.
Reference Tables
Row sums to ; entry is ; each entry is the sum of the two above it (Pascal's rule).
Advanced Reference
The number of distinct configurations under a symmetry group equals the average number of colorings fixed by each group element:
Ex. -color a necklace of beads under rotations: .
partitions an -set into nonempty unlabeled blocks; Bell number counts all partitions:
Surjections from -set onto -set . Ex. , so onto maps number .
Since converges to fast,
Ex. .
To sum binomial coefficients over in one residue class mod , average over the -th roots of unity :
Ex. for .
For any real (or complex) with , and the negative-power expansion:
Here . Ex. has coefficient (stars and bars).
and Vandermonde (the squared sum is its case). Ex. ; .
Counts: balanced parentheses, Dyck paths never dipping below the axis, triangulations of an -gon, full binary trees with leaves, and non-crossing chord matchings. Ex. .
For , solve . Distinct roots give ; a root of multiplicity contributes . Fix constants from initial values. Ex. has double root : (arithmetic).
Multiply the recurrence by , sum over , and solve for as a rational function; expand via partial fractions and to read off . Ex. Fibonacci: .
Advanced Expectation & Markov Chains
Beyond linearity and indicators (), for a nonnegative integer use the tail sum:
Geometric wait for a prob- event: . Coupon collector over types: . Ex. Rolls to see all faces: .
Updating hypothesis against on evidence multiplies prior odds by the likelihood ratio:
Ex. Prior odds , likelihood ratio posterior odds , i.e. .
Define hitting probabilities/times per state and condition on the first step. Fair-coin gambler's ruin from $ with absorbing barriers and :
Ex. Start at $ of $: reach goal with prob , expected steps.
A distribution is stationary for transition matrix when it is unchanged by a step:
For an irreducible chain the long-run fraction of time in state is , and the mean return time is . Ex. Two-state chain with rates (out of ), (out of ): .
Tip. “Distinct up to rotation/reflection” Burnside. “Partition into groups” (unlabeled) Stirling/Bell. A weird sum over every -th term roots of unity filter. For long-run behavior of a random process, solve ; for hitting probabilities, use first-step analysis.
Row sums give the Bell numbers.
counts all set partitions of an -set; .