Addition & Multiplication Principles
Multiplication Principle (AND). If a task splits into a sequence of independent stages, and stage can be done in ways regardless of the earlier choices, then the whole task can be done in
ways. Use it when you make choice 1 and choice 2 and …
Addition Principle (OR). If the outcomes split into disjoint cases (no outcome lands in two cases at once), add the counts of the cases:
Use it when an outcome comes from case 1 or case 2 or …
A plate has 2 letters (--) followed by 3 digits (--). How many plates are possible?
Solution. Five independent stages: . Now suppose the first symbol may be either a letter or a digit (so choices) while the rest stay as before: the count becomes . The “either/or” at one stage is an addition inside a multiplication.
How many 3-digit numbers (100--999) contain at least one digit equal to ?
Solution. Complementary counting is cleanest: total 3-digit numbers . Those with no : first digit has choices (-- except ), the other two have each, giving . So the answer is .
Pitfall. The multiplication principle requires the number of ways at each stage to be constant, not the specific choices. If choosing first changes how many options remain at stage 2 (versus choosing ), you must split into cases and add.
Factorials & Permutations
counts the orderings of distinct objects, with .
A permutation of objects chosen from distinct objects (order matters, no repetition) is
Read it as: fill ordered slots, with choices for the first, for the next, and so on.
In a race of runners, how many ways can the gold, silver, and bronze medals be awarded (no ties)?
Solution. Order matters and there is no repetition, so
How many ways can distinct books be lined up on a shelf if the dictionary must be on one of the two ends?
Solution. Place the dictionary first: end choices. Arrange the other books in the remaining slots: . Total . Handle the restricted object first.
Tip. because . When a problem says “arrange,” “order,” “line up,” or “rank,” you are almost always in permutation territory.
Combinations
A combination chooses objects from distinct objects when order does not matter:
Dividing by removes the orderings of each chosen set. Key identities:
From people, how many ways can we choose a committee of ?
Solution. Order is irrelevant:
A club has freshmen and seniors. How many -person committees have exactly freshmen?
Solution. Choose of freshmen and of seniors: . (Multiplication principle joins two independent choices.)
Pitfall. counts sets, not sequences. If you ever find yourself later imposing an order on a chosen set, you probably wanted a permutation, or you must multiply by the number of orderings.
Permutations with Identical Objects
The number of distinct arrangements of objects, where there are identical objects of type 1, of type 2, …, of type (with ), is the multinomial coefficient
Each group of identical objects contributes a overcount that must be divided out.
How many distinct arrangements of the letters in MISSISSIPPI are there?
Solution. There are letters: . So
How many shortest grid paths go from to moving only right (R) or up (U)?
Solution. Every path is a sequence of R's and U's, so we arrange steps:
Lattice-path counting is really “permutations with identical objects” in disguise --- a favorite contest trick.
Tip. The multinomial coefficient collapses to when there are only two types (a “ of one kind, of the other” string). Choosing positions and arranging identical objects are the same act.
Circular Permutations
Arrangements around a circle count only relative position: rotating everyone one seat gives the same arrangement. Fixing one person to kill the rotations gives
If arrangements that are mirror images (reflections) are also considered identical --- as with a bracelet or necklace of beads --- divide by an additional :
In how many ways can people sit at a round table if only relative order matters?
Solution. .
couples sit around a round table so that partners are adjacent. How many seatings (rotations equivalent)?
Solution. Treat each couple as a block: arrange blocks around the circle in ways, then order the two partners within each block: . Total .
Pitfall. Decide up front whether reflections count as the same. Seats fixed to the table (labeled chairs, a head of table, a clock face) make it linear again --- use , not .
Order Matters vs. Order Doesn't (Choosing vs. Arranging)
Before counting, ask: does swapping two chosen items produce a different outcome?
- 2pt
- Yes order matters arrangement/permutation: .
- No order irrelevant selection/combination: .
The bridge between them: . First choose the set, then arrange it.
From students:
- 2pt
- How many ways to pick a -person study group? (order doesn't matter).
- How many ways to pick a President, VP, and Treasurer? (distinct roles order matters).
Notice .
Tip. Titles, ranks, ordered slots, and positions signal “order matters.” Committees, teams, hands of cards, and subsets signal “order doesn't.”
Going Deeper: Subtleties, Overcounting & Symmetry
A circular arrangement treats only rotations as identical: . A necklace (or bracelet) treats rotations and reflections as identical: for . Always confirm whether the object can be physically flipped over. A round-table seating cannot be flipped (people keep their left/right neighbors distinct), but a bracelet of beads can.
How many distinct triangles can be drawn using points on a circle as vertices (no three collinear)?
Solution. A triangle is just an unordered choice of vertices, so . If you had counted ordered triples , you would be overcounting each triangle by its vertex orderings: . Recognizing the hidden symmetry factor is the whole game.
In how many ways can distinct players be split into unlabeled pairs?
Solution. If the pairs were labeled (Court 1, 2, 3), the count would be . But the orderings of the (identical-status) pairs are the same partition, so divide: . Dividing by the arrangements of interchangeable groups is the most common contest overcount.
How many -digit numbers (1000--9999) have at least one repeated digit?
Solution. Total . All-distinct: (first digit --, then any unused digit including ). At least one repeat . When “at least one” appears, subtract the “none” case.
Big picture --- recognizing when order matters. Every basic counting problem reduces to three questions, asked in order:
- 2pt
- Are stages joined by AND (multiply) or OR (add)? Split disjoint cases; never let one outcome fall into two cases.
- Within a stage, does order matter? Yes permutation ; No combination ; repeats among items divide by each group's factorial.
- Did symmetry make me overcount? Rotations (), reflections (), and interchangeable groups () each demand a division. When in doubt, count an easy way with order, then divide out exactly the symmetries you introduced.
The Bijection Principle
If there is a bijection (a one-to-one, onto pairing) between a finite set and a finite set , then . So to count a difficult set , build a reversible dictionary that turns each object of into exactly one object of an easier-to-count set --- and back again. The whole method is: define the map, check it is invertible, count .
The lattice-path count you already met is a bijection in disguise: paths words in R's and U's. Most “clever” contest counts are really the discovery of the right bijection.
How many ways can we write with each a nonnegative integer?
Solution. Encode a solution as a row of stars split into groups by bars, e.g.
Every solution gives exactly one such string of stars and bars, and every string decodes to exactly one solution --- a bijection. Counting the strings is a “permutations with identical objects” problem on symbols:
In general (nonnegatives) has solutions.
How many subsets of contain no two consecutive integers?
Solution. Suppose we pick elements with each gap . Define . This subtracts off the forced gaps, and the map is a bijection onto the -element subsets of with no restriction. Hence the count for each is , and summing over all :
(These are Fibonacci numbers --- a bijection can expose hidden structure, not just a number.)
Tip. To trust a bijection, exhibit the inverse: describe how to recover the original object from its image. If you cannot decode uniquely, the map is not a bijection and may fail. “Shift the indices” () is the single most useful bijection trick for turning a spacing constraint into a free choice.
Counting Functions Between Finite Sets
Let (the domain) and (the codomain). Think of each element of as choosing a target in .
- 2pt
- All functions : each of the inputs picks any of outputs independently, giving @@BLOCK0@@
- Injective (one-to-one) functions: distinct inputs need distinct outputs, so fill the inputs with a falling factorial of choices: @@BLOCK1@@ which is when (pigeonhole: too many inputs to keep distinct).
- Surjective (onto) functions: every output in must be hit at least once. There is no bare product formula; inclusion--exclusion (a later unit) gives @@BLOCK2@@
Let and , so , .
Solution.
- 2pt
- All functions: .
- Injective functions: impossible, since ; count .
- Surjective functions:
Sanity check: a surjection from a -set onto a -set forces exactly one output to be used twice. Choose the doubled output ( ways), choose which of the inputs share it (), then biject the remaining inputs to the remaining outputs (): . ✓
Tip. “Number of functions” problems are pure multiplication-principle problems wearing a costume: the domain elements are the independent stages. Watch the direction --- functions give , not . The base is the size of the codomain (the menu); the exponent is the size of the domain (the diners).
The Multinomial Coefficient as a Distribution
For nonnegative integers with , define
This single number counts three equivalent things:
- 2pt
- Arrangements: distinct orderings of objects where are of type (the
MISSISSIPPIidea). - Distributions: ways to deal distinct objects into distinct labeled boxes so box receives exactly objects.
- Ordered set partitions: ways to split into an ordered list of blocks of sizes .
It also names the coefficients in the Multinomial Theorem
Find the coefficient of in the expansion of .
Solution. Here with exponents , which sum to :
In how many ways can a standard -card deck be dealt into four labeled hands (North, East, South, West) of cards each?
Solution. This is a distribution of distinct objects into labeled boxes of size :
If instead the four hands were unlabeled (just a partition into four piles of , no seat names), we would divide by the orderings of the interchangeable piles: .
Identity worth knowing. The multinomial factors through binomials:
This is just “fill box , then box from what remains, …” --- the multiplication principle. Summing all multinomials of order gives (set in the theorem), matching the “each of objects picks one of boxes” count.
Orientation: The Twelvefold Way
Almost every elementary counting problem is “put balls into boxes.” The answer depends on two switches --- are the balls distinguishable? are the boxes distinguishable? --- and on any restriction (no limit / at most one per box / at least one per box). The resulting grid is the classic Twelvefold Way. Reading it now shows how the tools of this unit fit together and previews later units.
1.5
Here is a Stirling number of the second kind (partitions of a set into nonempty blocks), counts partitions of the integer into exactly positive parts, and is if the condition holds and otherwise.
Distribute balls into boxes; compare the four “any” entries for small cases.
Solution.
- 2pt
- Distinct balls, distinct boxes, : functions boxboxbox, so .
- Identical balls, distinct boxes, : stars and bars, .
- Distinct balls, identical boxes, into at most nonempty groups: .
- Identical balls, identical boxes, into at most parts: partitions of with parts: , so .
Same phrase, four genuinely different answers --- the two “distinguishable?” switches are everything.
Big picture. The top row (distinct/distinct) is this unit's home turf: functions, falling factorials, and surjection counts. The second row (identical balls, distinct boxes) is the stars-and-bars world of the next unit. The bottom two rows introduce set partitions () and integer partitions (), the subject of still later units. When a problem stumps you, first locate its cell: are the balls alike? are the boxes alike? is there a per-box constraint?
Formulas, Proofs & Tips
What it means. Permutations count ordered arrangements; combinations count unordered selections.
Example. and .
Why it works. Filling ordered slots from items gives choices. If order does not matter, every group of has been counted times — once per arrangement — so divide by .
Tip. Ask "would swapping two picks give a different outcome?" Yes permutation. No combination.