Permutations and Combinations
A committee of is chosen from men and women, and must contain at least women. A common line of reasoning says: pick women to satisfy the condition, then pick any of the remaining people. That gives .
The true answer is .
The method double-counts. Take the committee . It is produced when the reserved pair is and arrives later, and again when the reserved pair is , and again when it is — three times over, and there is nothing in the count that removes the duplicates.
Two repairs work. Split into disjoint cases by the exact number of women:
Or count the complement: from total committees, remove those with no woman, , and those with exactly one, , leaving .
This is the whole discipline of the chapter. Every valid count is a sum over cases that are disjoint and exhaustive, and the fastest way to get a wrong answer is to satisfy a condition first and then count freely, because the object no longer remembers which part satisfied the condition.
1. Arrangements when some objects are alike
Arranging objects of which are of one kind, of another and so on gives
because each genuinely different arrangement is produced times when the identical objects are treated as distinct. Dividing by the size of the group that shuffles identical items is the same repair as in the opening, applied in the other direction.
Illustration 1
How many arrangements are there of the letters of MISSISSIPPI?
The letters are , , , , eleven in all, so the count is .
Illustration 2
In how many of those arrangements are no two s adjacent?
Arrange the seven non- letters first: ways. Those seven letters create eight gaps, including the two ends, and choosing four of them for the s guarantees no two are together: . The answer is .
The gap method is the standard device for every "no two together" condition, and it works because placing the restricted objects into gaps makes the separation automatic rather than something to be checked afterwards.
2. Selecting from a multiset
Selecting objects from a collection containing repeats is not a single binomial coefficient, because the repeats limit how many copies of a letter a selection can hold. The reliable method is to split by the shape of the selection: how many pairs, how many singletons.
Illustration 3
From the letters of EXAMINATION, how many selections of four letters are possible, and how many four-letter words?
The word has eleven letters, of which , and appear twice each and once each, so there are eight distinct letters.
| shape | selections | arrangements each | words |
|---|---|---|---|
| four different | |||
| one pair, two different | |||
| two pairs | |||
| total |
The shapes are disjoint and exhaustive, which is what makes the addition legitimate. Notice that the arrangement count differs from shape to shape, so the selections cannot be totalled first and multiplied by a single factorial.
3. Distributions: four different questions
"Put objects into boxes" hides four questions, and the answer depends entirely on whether the objects and the boxes are distinguishable.
The identical-objects, distinct-boxes case is the one with a usable formula. Represent a distribution of identical objects among boxes as a row of stars separated by bars; every arrangement of the symbols is one distribution, so the count is . Requiring every box to be non-empty means placing one object in each first, leaving .
Illustration 4
Find the number of non-negative integer solutions of , and the number with every variable at most .
Without restriction, . For the upper bound, subtract the solutions in which some variable is at least : substituting turns that condition into , giving each, so in all. Solutions where two variables are both at least have been removed twice; each gives , one solution, and there are such pairs. So the count is
Listing confirms it: the solutions are the permutations of and of , three each.
Read the other way, the same formula answers a selection question. Choosing objects from types with unlimited repetition, order irrelevant, is the same as deciding how many of each type to take, so the count is . Buying ten chocolates from four flavours, for instance, can be done in ways. Selections with repetition and distributions of identical objects are one problem wearing two descriptions.
Illustration 5
In how many ways can distinct balls go into distinct boxes with no box empty?
This is exactly the count of onto functions, so inclusion and exclusion gives . If instead the boxes were identical, we would divide by the orderings of the boxes, giving .
Illustration 6
In how many ways can identical balls go into identical boxes?
Now nothing distinguishes either the balls or the boxes, so the answer is the number of ways to write as a sum of at most three positive parts, order irrelevant: , , , , . Five ways. There is no formula, and there is not meant to be — questions of this type are always small enough to list.
4. Division into groups, and when to divide by the number of groups
Splitting people into groups looks like a distribution problem, and it is — but with one extra decision that decides the answer. If the groups are labelled, say by the project each will work on, the multinomial coefficient is the whole answer. If the groups are merely a partition into unlabelled sets of equal size, the multinomial has counted each partition once for every way of ordering the groups, and that ordering must be divided out.
Dividing objects into groups of sizes that are all different gives and needs no further division, because the sizes themselves tell the groups apart. When of the groups share the same size, divide by .
Illustration 7
In how many ways can students be divided into three groups of three? And in how many ways can they be assigned to three distinct projects, three to each?
The multinomial count is , and that is the answer for the labelled version, since a project name distinguishes the groups.
For unlabelled groups the same partition has been counted once for each of the orders in which the three blocks could have been produced, so the answer is .
The two numbers differ by a factor of six, and choosing between them is decided by a single reading of the question: if swapping two entire groups produces a different outcome in the situation described, do not divide.
5. Circular arrangements
Seating people around a table produces the same arrangement times over, once for each rotation, so the count is . If the arrangement can also be flipped over, as with a necklace of beads or a garland of flowers, each arrangement is counted twice more and the answer is .
The distinction is physical, not verbal: a garland can be turned over and a dinner table cannot, so a question that says "necklace" or "garland" is asking for the halved count.
Illustration 8
Five men and five women are to be seated alternately around a round table. In how many ways?
Seat the men first: circular arrangements. They create five gaps, and the women fill them in ways. The total is .
Seating the men first is not arbitrary — fixing one group is what removes the rotational freedom, and doing it twice would remove it twice.
6. Derangements
A derangement is a permutation that moves every object. Counting them uses inclusion and exclusion over the positions that stay fixed:
giving , , , , . The recursion is quicker for small and worth carrying.
Illustration 9
Five letters are placed at random into five addressed envelopes. In how many ways does exactly one letter reach the right envelope? And in how many does exactly two?
Choose the correct letters first, then derange the rest. Exactly one correct: . Exactly two correct: .
The check worth doing is that the counts over all cases sum to : , where the terms are , then exactly one through five correct. The zero is the count for exactly four correct, which is impossible because the last letter would then also be right.
7. Ranking a word
Listing all arrangements of a word's letters in dictionary order and finding the position of one of them is a standard Advanced question, and it is nothing more than a careful place-value count. At each position, count the arrangements that begin with an alphabetically smaller unused letter, then move on.
Illustration 10
Find the rank of MOTHER among the arrangements of its letters in dictionary order.
Sorted, the letters are , all distinct.
| position | letter | smaller letters still available | contribution |
|---|---|---|---|
| 1 | M | ||
| 2 | O | ||
| 3 | T | ||
| 4 | H | ||
| 5 | E | none | |
| 6 | R | none |
Adding and including the word itself, the rank is .
If the letters repeat, each contribution uses the multinomial count for the remaining letters instead of a plain factorial — the structure of the calculation does not change.
8. Counting geometric configurations
Points, lines and diagonals give a family of questions whose only difficulty is remembering to subtract the degenerate cases.
Illustration 11
Twelve points lie in a plane, of which five are collinear and no other three are collinear. How many triangles and how many straight lines do they determine?
Triangles: , since any three of the five collinear points fail to form a triangle.
Lines: , because the ten pairs among the collinear five all give the same single line, which must then be added back once.
Illustration 12
How many diagonals does a convex polygon with sides have, and for which does it have exactly ?
Every pair of vertices gives a segment, and of those segments are sides, so the count is . Setting this to gives , so .
9. Number-formation problems
Digit problems combine the ideas above with two extra constraints: the leading digit cannot be zero, and divisibility conditions usually pin down the last digit or the digit sum.
Illustration 13
How many four-digit numbers with all digits distinct are divisible by ?
Split by the last digit, since the two cases behave differently.
If the last digit is , the first three positions take any of the remaining nine digits in order: .
If the last digit is , the leading digit must avoid both and , leaving eight choices, and the middle two positions then have and : .
Total . Splitting on the last digit first is essential, because the restriction on the leading digit depends on it.
Illustration 14
Using the digits without repetition, how many five-digit numbers are divisible by ?
A number is divisible by when its last two digits are, so list the two-digit endings available from these digits: . For each, the remaining three digits fill the first three places in ways, giving .
A related question asks not how many numbers exist but what they add up to. Symmetry does the work: if all four digits are used without repetition, each digit occupies each of the four places in of the arrangements. The units digits therefore contribute , and the same total appears at every place value, so the sum of all such numbers is
The argument never lists a single number, and it generalises directly: with distinct digits the multiplier is and the repunit has ones.
Illustration 15
How many six-digit numbers can be formed from the digits of that are divisible by ?
The number must end in . The remaining five digits are , arranged in ways. Since no digit is zero, no leading-digit restriction applies, so the answer is .
Summary
Every count in this chapter is a sum over disjoint, exhaustive cases. The characteristic Advanced error is to satisfy a condition first and then fill the remaining places freely, which over-counts because the finished object cannot remember which part was reserved. Split by the exact number, or count the complement.
Arrangements with repeated objects divide by the factorials of the repeat counts. A "no two together" condition is handled by arranging the other objects first and slotting the restricted ones into the gaps, which makes the separation automatic. Selections from a multiset are counted by shape — how many pairs, how many singletons — because each shape has its own arrangement count.
Distribution questions split four ways depending on whether the objects and the boxes are distinguishable. Identical objects into distinct boxes give stars and bars, , or when no box may be empty; distinct objects into distinct boxes with none empty is the onto count from inclusion and exclusion; and both-identical questions are small enough to list.
Dividing people into groups needs one further reading: labelled groups take the multinomial coefficient as it stands, while unlabelled groups of equal size require dividing by the factorial of how many share a size.
Circular arrangements divide by for rotations, and by a further when the object can be turned over. Derangements come from inclusion and exclusion, with worth remembering and the recursion worth carrying. Ranking a word is place-value counting with factorials, and geometric and digit problems are ordinary counts with the degenerate cases subtracted.
