← All Posts
Math · Probability & Statistics · Combinatorial Analysis· Part 2 of 7

The Basic Principle of Counting

Almost every counting formula in this series — factorials, $P(n,r)$, $\binom{n}{r}$, the multinomial coefficient, and stars-and-bars — is built on top of one rule. Ross calls it the basic principle of counting and dedicates the very first section of Chapter 1 to it. Get this right, and the rest of combinatorics turns into bookkeeping.

Statement of the Rule

Basic principle of counting. Suppose two experiments are to be performed. If the first experiment can result in any one of $m$ possible outcomes and if, for each outcome of the first experiment, there are $n$ possible outcomes of the second experiment, then the two experiments together have

$m \cdot n$

possible outcomes.

The phrase “for each outcome of the first experiment” is the part most students miss. The rule does not say "the first experiment has $m$ outcomes and the second has $n$ outcomes". It says: no matter what happens in the first experiment, the second experiment still has $n$ choices. In other words, the count of stage-two options must not depend on what stage one produced.

Why It Works

Imagine drawing a tree. The root branches into $m$ outcomes for stage 1. From each of those $m$ nodes, $n$ further branches sprout for stage 2. The leaves of the tree are exactly the (stage-1, stage-2) pairs.

Counting the leaves in two different ways forces the formula:

The "for each outcome" clause is exactly what guarantees the second-stage subtree has the same size $n$ at every stage-1 node. If the size differed, the count would be a sum, not a product.

▶ Visual: Choices on a Tree

Pick a starter (3 options) and then a main course (4 options). Step through to see why the answer is $3 \times 4 = 12$.

The Generalised Counting Rule

Generalised principle of counting. If $r$ experiments are to be performed and the $i$-th experiment can result in any one of $n_i$ outcomes regardless of what happened in the previous experiments, then the $r$ experiments together have

$n_1 \cdot n_2 \cdot n_3 \cdots n_r$

possible outcomes.

The proof is induction on $r$, repeatedly applying the two-stage rule. Each new stage multiplies the running total by its own $n_i$.

The "no matter what" condition is crucial. If the number of options at stage $i$ depends on outcomes from earlier stages, you cannot just multiply $n_1 n_2 \dots n_r$. You either fix the dependence by re-stating the stages, or split into cases and add.

Worked Examples

Ross 1.2a — License plates

How many different 7-place license plates are possible if the first 3 places are letters and the final 4 places are digits?

Each of the 3 letter slots has 26 choices (independent of the others) and each of the 4 digit slots has 10 choices. By the generalised rule:

$26 \cdot 26 \cdot 26 \cdot 10 \cdot 10 \cdot 10 \cdot 10 = 26^3 \cdot 10^4 = 175{,}760{,}000.$

Ross 1.2a (variation) — License plates without repetition

Same problem, but no letter and no digit may be repeated.

The first letter slot has 26 choices, the second has 25 (any of the 26 except the one we used), the third has 24. Similarly the digit slots have 10, 9, 8, 7. The independence required by the rule still holds — the count of remaining options at each stage is the same regardless of which specific letter or digit we previously picked. So:

$26 \cdot 25 \cdot 24 \cdot 10 \cdot 9 \cdot 8 \cdot 7 = 78{,}624{,}000.$

Subtle but important. The rule needs the stage-two count to be constant, not the stage-two options. After picking letter A at stage one, the remaining 25 letters are $\{B,C,\dots,Z\}$; after picking B, the remaining 25 letters are $\{A,C,\dots,Z\}$. Different sets, same count. That is enough for the rule to apply.

Ross 1.2b — Counting functions

How many functions $f: \{1, 2, \dots, n\} \to \{1, 2, \dots, m\}$ are there?

A function is determined by choosing $f(1), f(2), \dots, f(n)$. Each $f(i)$ can independently be any of $m$ values. So the total is $\underbrace{m \cdot m \cdots m}_{n\text{ times}} = m^n.$

Counting subsets

How many subsets does an $n$-element set have?

Build a subset $A$ by walking through each element and answering “include it?” — yes or no. There are $n$ independent yes/no decisions, so the count is $2^n$ (this counts the empty set and the full set as well).

The Addition Rule (Disjoint Cases)

The multiplication rule combines stages of a single experiment. The addition rule combines mutually exclusive cases of an experiment.

Addition rule. If an experiment can be split into disjoint cases $C_1, C_2, \dots, C_k$ — meaning every outcome belongs to exactly one $C_i$ — and case $C_i$ contains $a_i$ outcomes, then the experiment has $a_1 + a_2 + \dots + a_k$ outcomes.

Whenever the multiplication rule's "no matter what" condition fails, splitting into cases that do satisfy it is the standard fix.

Worked: 6-character passwords with at least one digit

How many 6-character passwords use lowercase letters and digits with at least one digit?

It is easier to count by complement: total passwords minus passwords with no digit.

Pattern. “At least one” is almost always easier to count by complement: count the “none” case and subtract from the total.

When Multiplication Quietly Fails

Beginners overuse multiplication. Two classic traps:

  1. Stages that depend on each other. “How many ways to seat 4 people in a row so that Alice and Bob are not adjacent?” The number of allowed positions for Bob depends on where Alice sat, so direct multiplication overcounts. Either solve by complement (total seatings minus seatings where they are adjacent) or split into cases.
  2. Order vs. no order confusion. “How many handshakes happen among 5 people?” You might say each person has 4 partners, so $5 \cdot 4 = 20$. But every handshake is counted twice (once from each shaker), so the answer is $\tfrac{20}{2} = 10$. Multiplication is correct; you also need a "remove order" step. We will formalise this next post.

A Template for Multi-Stage Problems

When a problem looks complicated, write down the stages explicitly:

StageDecisionNumber of options
1Pick the first item.$n_1$
2Pick the second item.$n_2$ (must be the same regardless of stage 1)
$\vdots$$\vdots$$\vdots$
$r$Pick the last item.$n_r$

Then check, for each row, whether the count is truly independent of what came before. If yes, multiply. If not, split into cases until each case satisfies the rule.

Worked: Counting paths on a grid

How many paths go from $(0,0)$ to $(3,2)$ using only steps right (R) and up (U)?

Every valid path is a sequence of 5 moves containing exactly 3 Rs and 2 Us. We could do this with combinations (and we will, in Part 4), but the basic rule already gives a brute-force route: at each of the 5 stages, the move depends on how many Rs and Us we have left. The stage counts are not constant — they vary by case. So we cannot just multiply $5 \cdot 4 \cdot 3 \cdot 2 \cdot 1$.

What we can do is rephrase the experiment: instead of choosing a move per stage, choose which 3 of the 5 stages will be R. Now stage one is “decide if move 1 is R” subject to having enough Rs, again messy. The cleanest approach is to wait for combinations. This example is a preview of why we need a separate “choose without order” tool.

Common Mistakes

Summary

Practice Problems