Concept 01 / 09Permutations and Combinations
Fundamental Principles of Counting and Factorial Notation
The multiplication and addition principles and when each applies, tree diagrams, counting with the complement, factorials and their properties, and the exponent of a prime in n! (Legendre's formula).
All of combinatorics rests on two principles. They look obvious, but most counting errors come from applying the wrong one.
Multiplication principle (AND). If a task is done in successive stages, with ways for the first stage and, for each of those, ways for the second stage, the whole task can be done in ways. The tree diagram shows choices followed by choices, giving complete outcomes. The crucial requirement is that the number of options at the second stage is the same no matter what was chosen at the first; the options themselves can differ. The principle extends to any number of stages.
Addition principle (OR). If a task can be done in one of several mutually exclusive ways (cases that cannot happen together), with ways in the first case and in the second, the total is . If the cases overlap, adding double-counts the overlap, which must be subtracted (inclusion-exclusion).
A reliable habit: describe the construction of one outcome in words. Each 'and then' multiplies; each 'or' between disjoint cases adds. For example, the number of -digit numbers with distinct digits: the hundreds digit has choices ( to ), the tens digit (any digit except the one used, now including ), and the units digit , giving . Choosing the most restricted position first (here the hundreds digit, which cannot be ) keeps the number of options at later stages independent of earlier choices.
Complementary counting. When 'at least one' or 'not all' appears, count the opposite and subtract from the total. The number of -digit numbers with at least one repeated digit is .
Factorials. , with . The convention is not arbitrary: it is the number of ways to arrange zero objects (one way, do nothing), and it keeps formulas such as and valid. Factorials grow very fast: . Useful facts: is divisible by every integer from to ; , which makes sums like telescope to .
Exponent of a prime in (Legendre's formula). The power of the prime dividing is
The first term counts the multiples of up to , each contributing at least one factor ; the second counts multiples of , each contributing one extra factor; and so on. The number of trailing zeros of is , because factors of are always more plentiful than factors of .
Key Takeaways:
- AND (successive stages) multiplies; OR (disjoint cases) adds.
- Fill the most restricted position first so later counts do not depend on earlier choices.
- 'At least one' questions: total minus 'none'.
- ; ; .
- ; trailing zeros of equal .
- Pitfall: adding cases that overlap, or multiplying stages whose option counts depend on earlier choices.
- Pitfall: forgetting that a leading digit cannot be .
Brain-Teaser 1: How many -digit even numbers can be formed with distinct digits?
Solution: The units digit must be even, and the thousands digit cannot be ; these two constraints interact, so split into cases. Case 1, units digit : the thousands digit has choices, then and for the middle, giving . Case 2, units digit or ( choices): the thousands digit cannot be or the units digit, so choices; the remaining two positions have and . That gives . Total: . The case split is needed because whether has been used changes the number of choices for the thousands digit.
Brain-Teaser 2: How many trailing zeros does have, and what is the highest power of dividing ?
Solution: , so ends in zeros. Numbers like , , and contribute two factors of each, which is why the second term is needed. . The exponent of is , far more than , confirming that factors of are the bottleneck for trailing zeros.
Brain-Teaser 3: In how many ways can letters be posted in letter boxes? In how many ways can letter boxes receive letters if each box must get at least one?
Solution: Each letter independently chooses a box: . (Not : the choosers are the letters, so the number of choices, , is the base.) For every box non-empty, subtract the assignments that miss a box using inclusion-exclusion: . The first question is a direct multiplication; the second needs the complement and inclusion-exclusion because 'every box non-empty' is a condition on the whole outcome, not on individual stages.
Practice this concept
Free · no account required · instant solutions