Grade 10
Counting principles
The addition and multiplication rules for counting outcomes, the foundation of combinatorics.
IntuitionIntuition: choices and branching paths
Imagine choosing an outfit: one shirt from several colors, then one pair of pants from several sizes. If you draw every possible outfit as a tree — one branch per shirt, and from each shirt branch, one twig per pair of pants — the outfits are exactly the leaves of the tree. Counting principles let you count those leaves without drawing the whole tree: add when a task splits into separate, non-overlapping cases, and multiply when a task is a sequence of independent steps that must all happen.
SchoolThe addition rule and the multiplication rule
Definition: Addition rule (sum principle)
If a task can be completed by exactly one of mutually exclusive methods, and method has possible outcomes, with no outcome shared between two methods, then the total number of outcomes is .
Here , , , are pairwise disjoint sets of outcomes: each outcome belongs to exactly one of them, so listing every outcome once is the same as listing each set separately and adding the counts.
If instead a task consists of successive independent steps, and step can be done in ways no matter what happened before, the total number of ways to complete the whole task is the product .
| Rule | When it applies | Formula |
|---|---|---|
| Addition rule | The task is done by exactly one of disjoint cases | |
| Multiplication rule | The task is a sequence of independent steps, all of which must happen |
UndergraduateRigorous statement and proofs
Let , , , be pairwise disjoint finite sets, meaning whenever . Then .
Why is it true?
This formalizes the everyday habit of counting each disjoint case separately and adding: it is valid precisely because disjointness prevents any outcome from being counted twice.
Proof
Step 1 (base case ): suppose and are disjoint, so . Every element of lies in or in , and disjointness rules out lying in both. Splitting into the two disjoint pieces and and counting each piece once therefore gives .
Step 2 (induction on ): assume the formula already holds for any pairwise disjoint sets, so . Set . Because is disjoint from every with , it is also disjoint from their union . Applying the base case to and gives .
Step 3 (combine): substituting the inductive hypothesis for into the last equality gives , which is exactly the addition rule for sets. Since the base case holds and each step from to preserves the formula, it holds for every by induction.
Let a task consist of successive steps , where step can be performed in ways regardless of which choices were made in the earlier steps. Then the number of ways to carry out the whole sequence is .
Why is it true?
Because each step's number of choices does not depend on earlier steps, every combination of choices is a distinct legal outcome, and the count of combinations multiplies exactly like counting cells in a rectangular grid.
Proof
Step 1 (base case ): with a single step there are trivially ways, matching the formula for .
Step 2 (base case ): for each of the ways to perform step 1, step 2 can still be done in ways, since its count does not depend on step 1's outcome. This splits all pairs of choices into disjoint groups of size (one group per outcome of step 1), so the addition rule gives a total of added to itself times, i.e. .
Step 3 (induction on ): assume the formula holds for steps, so the first steps together admit outcomes. Treat those steps as one combined "super-step" with outcomes, and step as a second, independent step with outcomes (its count still does not depend on earlier choices). Applying the two-step base case to this pair gives , which is . By induction the formula holds for every .
UndergraduateReal-World Applications and Worked Examples
Counting principles are the first tool used whenever a computer scientist estimates how many passwords, IP addresses or test cases exist, whenever a cryptographer sizes a key space, or whenever a statistician counts a sample space before assigning probabilities. The two examples below apply the multiplication rule directly to license plates and passwords.
Example: Counting license plates
A license plate has the format: 2 uppercase letters (A–Z) followed by 5 digits (0–9), and any letter or digit may repeat. How many different plates are possible?
Solution
Step 1: break the plate into 7 independent positions: 2 letter positions and 5 digit positions, filled in sequence.
Step 2: each letter position has choices (repetition allowed), so by the multiplication rule the two letter positions together give outcomes.
Step 3: each digit position has choices independently of the others, so the five digit positions give outcomes.
Step 4: since all 7 positions are filled independently in sequence, the multiplication rule applies once more across the whole plate: total plates
Example: Counting passwords over a mixed alphabet
A website requires passwords of exactly 4 characters, where each character is either a lowercase letter (26 choices) or a digit (10 choices), and repetition is allowed. How many different passwords are possible?
Solution
Step 1: for a single character, apply the addition rule first, since a character is either a letter or a digit, never both: the number of choices per character is .
Step 2: this per-character count does not depend on which characters were chosen in the other positions, so the 4 positions are independent successive steps in the sense of the multiplication rule.
Step 3: applying the multiplication rule across the 4 positions gives as the total password count.
Step 4: computing, distinct passwords.
A class has 15 boys and 12 girls. How many ways are there to choose one student to represent the class, if any student may be chosen?
A set menu offers a choice of 3 soups and, independently, a choice of 4 main dishes; a customer must choose exactly one soup and one main dish. How many different meals are possible?
How many license plates of the form 2 uppercase letters (A–Z) followed by 3 digits (0–9) are possible, if letters and digits may repeat?
A password must be either 4 lowercase letters (26 choices each) or 4 digits (10 choices each), but never a mix of the two kinds in the same password. How many different passwords are possible?
References
- Richard A. Brualdi (2009). Introductory Combinatorics
- Kenneth H. Rosen (2019). Discrete Mathematics and Its Applications