06 Fundamental Counting Principles

A progressive guide to counting finite outcomes using addition, multiplication, factorials, permutations, combinations, the pigeonhole principle, and restriction-based strategies.

Choosing the right counting principle

Counting begins by identifying how an outcome is constructed. Ask whether the outcome comes from one alternative or from several stages, and determine whether different cases can overlap.

The applies when exactly one of several mutually exclusive cases occurs. If one dessert can be chosen from 4 cakes or 3 pies, the total is

4+3=74+3=7

because no dessert belongs to both categories.

The applies when an outcome is built through successive stages. If the stages have a1,a2,…,aka_1,a_2,\ldots,a_k choices, the total is

a1a2⋯aka_1a_2\cdots a_k

For a code consisting of two letters followed by three digits, with repetition allowed, the count is

26⋅26⋅10⋅10⋅10=262⋅10326\cdot26\cdot10\cdot10\cdot10=26^2\cdot10^3

If the number of choices changes at each stage, multiply the stage-specific counts. For example, choosing a president and a vice president from 8 people gives 8⋅7=568\cdot7=56, because the first choice leaves 7 people.

Takeaway: use addition for mutually exclusive alternatives and multiplication for sequential choices.

Factorials and arrangements

A is defined for every nonnegative integer by

n!=n(n−1)(n−2)⋯2⋅1n!=n(n-1)(n-2)\cdots2\cdot1

with the special definition

0!=10!=1

The n!n! counts the ways to arrange nn distinct objects in a line. Thus, 5 distinct books can be arranged in

5!=1205!=120

ways.

Factorials simplify products of consecutive integers. For example,

n!(n−r)!=n(n−1)⋯(n−r+1)\frac{n!}{(n-r)!}=n(n-1)\cdots(n-r+1)

This expression explains why ordered selections lead naturally to formulas: the first position has nn choices, the next has n−1n-1, and so on.

Takeaway: factorials count complete arrangements and provide compact notation for consecutive products.

Permutations and repeated objects

A is an arrangement in which order matters. Selecting a president, secretary, and treasurer from 10 members is ordered because assigning the same three people to different offices produces a different outcome.

The number of ordered selections of rr objects from nn distinct objects is

P(n,r)=n!(n−r)!P(n,r)=\frac{n!}{(n-r)!}

For the officer example,

P(10,3)=10⋅9⋅8=720P(10,3)=10\cdot9\cdot8=720

When objects repeat and identical objects cannot be distinguished, divide by the of each repetition count. If there are nn total objects with repetition counts r1,r2,…,rkr_1,r_2,\ldots,r_k, the number of distinct arrangements is

n!r1!r2!⋯rk!\frac{n!}{r_1!r_2!\cdots r_k!}

For BANANA, there are 6 letters, with 3 A's, 2 N's, and 1 B, so the number of distinct arrangements is

6!3!2!1!=60\frac{6!}{3!2!1!}=60

Takeaway: use permutations for ordered selections, and correct for indistinguishable repetitions by dividing by their factorials.

Combinations and

A is a selection in which order does not matter. A committee containing the same people is unchanged by rearranging the order in which its members are listed.

The number of combinations of rr objects chosen from nn distinct objects is

(nr)=n!r!(n−r)!\binom{n}{r}=\frac{n!}{r!(n-r)!}

For example, the number of 4-person committees from 12 people is

(124)=12!4!8!=495\binom{12}{4}=\frac{12!}{4!8!}=495

Test the distinction by asking whether swapping two selected objects changes the outcome. If it does, use P(n,r)P(n,r); if it does not, use (nr)\binom{n}{r}. Their relationship is

P(n,r)=(nr)r!P(n,r)=\binom{n}{r}r!

because each unordered group of rr objects can be placed in r!r! orders.

are the values (nr)\binom{n}{r}. They obey the symmetry rule

(nr)=(nn−r)\binom{n}{r}=\binom{n}{n-r}

and Pascal's identity

(nr)=(n−1r−1)+(n−1r)\binom{n}{r}=\binom{n-1}{r-1}+\binom{n-1}{r}

The symmetry rule reflects the equivalence between choosing what to include and choosing what to exclude.

Takeaway: decide whether order matters before selecting a or formula.

Guaranteeing repetition

The proves that some repetition must occur when there are more objects than available categories. If more than mm objects are distributed among mm boxes, at least one box contains at least two objects.

For instance, 13 people assigned to 12 birth-month categories guarantee that two people share a birth month.

The generalized form states that if nn objects are distributed among mm boxes, some box contains at least

⌈nm⌉\left\lceil\frac{n}{m}\right\rceil

objects, where the ceiling gives the least integer greater than or equal to the input. Thus, assigning 25 students to 6 groups forces some group to contain at least

⌈256⌉=5\left\lceil\frac{25}{6}\right\rceil=5

students.

To guarantee that some box contains at least kk objects, it is enough to show

n>m(k−1)n>m(k-1)

If every box contained at most k−1k-1 objects, there could be at most m(k−1)m(k-1) objects altogether.

Takeaway: compare the number of objects with the number of categories to prove that a repeated value or shared property is unavoidable.

Handling restrictions without double-counting

Restrictions should be identified before choosing a formula. Common methods include reducing choices directly, counting a complement, grouping required objects into blocks, separating mutually exclusive cases, and using the for overlapping conditions.

Direct restriction: For a 5-digit code using digits from 0 through 9, with no repetition and a first digit that cannot be 0, the successive counts are 9,9,8,7,69,9,8,7,6. Therefore, the total is

9⋅9⋅8⋅7⋅6=27,2169\cdot9\cdot8\cdot7\cdot6=27{,}216

Complement: If two particular people cannot both be on a 4-person committee from 10 people, subtract committees containing both from all committees:

(104)−(82)=210−28=182\binom{10}{4}-\binom{8}{2}=210-28=182

Blocks: If A and B must be adjacent in an arrangement of A, B, C, D, and E, treat AB as one block. The four objects can be arranged in 4!4! ways, and the block can be ordered in 2!2! ways, giving

4!⋅2!=484!\cdot2!=48

Cases: A 3-person committee from 5 engineers and 4 designers must contain at least one designer. The complement is shorter:

(93)−(53)=84−10=74\binom{9}{3}-\binom{5}{3}=84-10=74

For overlapping restrictions, use

∣A∪B∣=∣A∣+∣B∣−∣A∩B∣\lvert A\cup B\rvert=\lvert A\rvert+\lvert B\rvert-\lvert A\cap B\rvert

The intersection is subtracted because it was counted in both individual cases.

Takeaway: make restrictions explicit and choose the method that prevents omissions and double-counting.

A systematic workflow

A reliable solution can be organized as a short decision process:

  1. Define exactly what counts as one outcome.

  2. Decide whether order matters.

  3. Determine whether repetition is allowed and whether repeated objects are distinguishable.

  4. Separate the possibilities into mutually exclusive and exhaustive cases when needed.

  5. Use addition for alternatives and multiplication for stages.

  6. Apply factorials, permutations, or combinations only after modeling the outcome.

  7. Handle restrictions with direct choice reduction, complements, blocks, cases, or inclusion–exclusion.

  8. Check that every outcome was counted once and only once.

A final reasonableness check is useful. If order is ignored, the answer should not exceed the corresponding ordered count; indeed,

(nr)=P(n,r)r!\binom{n}{r}=\frac{P(n,r)}{r!}

If a restriction is added, the restricted count should not exceed the unrestricted count.

The central habit is to describe the structure of an outcome before calculating. Once the structure is clear, the appropriate counting principle usually follows.