Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools


Counting Principles






The Logic Beneath the Formulas


Before any specific formula in combinatorics — before permutations, combinations, or the binomial theorem — there are a small number of logical rules that govern how counts combine. Every counting argument in the section, however elaborate, is a structured application of these rules.

Two of them are foundational. The addition rule applies when a count splits into mutually exclusive cases; the multiplication rule applies when an outcome is built from a sequence of independent steps. Three further principles extend or vary these ideas: complementary counting (count what fails the condition and subtract), double counting (count the same set two ways and equate), and the pigeonhole principle (more items than containers forces a repeat).

Each principle answers a structural question about a counting problem rather than computing a specific number. Recognizing which principle applies is the first step in any counting argument.



The Addition Rule

When a choice can be made in one of several ways, count each way and add.
The recipe looks too simple to go wrong. Try it on two counts.
Adding works for bus, train or taxi routes — but gives 17 hearts-or-kings in a deck that has only 16.
countcasessum of the casestrue count
routes to the citybus 2, train 3, taxi 499
cards that are hearts or kingshearts 13, kings 41716
The king of hearts is both a heart and a king, so adding counts it twice. No route is both a bus route and a train route.
Adding counts is correct only when no outcome belongs to two cases.

The Mutual-Exclusion Condition

The rule requires that the cases be mutually exclusive. When two methods share outcomes, naive addition counts the shared outcomes twice. The systematic correction for this case is the inclusion–exclusion principle, which extends the addition rule by alternating additions and subtractions of intersection sizes.
The definition
The addition rule says that when a count splits into cases that cannot happen together, the total is the sum of the case counts.
The addition rule applies when a count splits into cases that cannot occur simultaneously. If an outcome can be achieved by method 1 in m1m_1 ways, by method 2 in m2m_2 ways, and so on through method kk in mkm_k ways, with no outcome belonging to more than one method, then the total number of outcomes is
Addition Rule
∣A1∪A2∪⋯∪Ak∣=∣A1∣+∣A2∣+⋯+∣Ak∣,Ai∩Aj=∅ for i≠j.|A_1 \cup A_2 \cup \cdots \cup A_k| = |A_1| + |A_2| + \cdots + |A_k|, \quad A_i \cap A_j = \emptyset \text{ for } i \neq j.
Learn more about this formula: Addition Rule →
So the traveller has 2+3+4=92 + 3 + 4 = 9 route choices.
The rule is signalled by the word "or" between cases that exclude each other.
The linguistic marker for the addition rule is the word or — pick method 1 OR method 2 OR method 3. Each "or" between mutually exclusive cases contributes its own count to the sum.
In the language of set theory, the rule is the cardinality identity ∣A∪B∣=∣A∣+∣B∣|A \cup B| = |A| + |B| when A∩B=∅A \cap B = \emptyset, generalized to any number of pairwise disjoint sets.
Example
A traveller can reach the city by 2 bus routes, by 3 train routes, or by 4 taxi routes. Since these options are mutually exclusive — one trip uses one mode of transport — the total number of route choices is
2+3+4=9.2 + 3 + 4 = 9.
When cases overlap, the overlap has to be subtracted.
For hearts or kings: 13+4−1=1613 + 4 - 1 = 16. Overlaps among any number of cases are handled by the inclusion–exclusion principle.
The rest of the page covers the multiplication rule, complementary counting, double counting, the pigeonhole principle, how the principles combine, related concepts and an overview.
The hearts-or-kings count as a picture. Add the terms one at a time: after the two single counts the king of hearts has been counted twice, and the last term takes it off once.
DownloadPNG2×PDF
running total0
HeartsKings12×03×01×0
Times each card is counted
×0not counted
×1counted once
×2counted twice
×3counted three times
Click a region to see which terms of the formula count it. Click a term, or use the arrows, to add the formula one term at a time.
0 of 3 terms added.
Hearts or kings: the overlap counted twice·Inclusion–exclusionLearn Math Class

The Multiplication Rule


The multiplication rule applies when an outcome is built from a sequence of independent steps, each contributing its own number of options. If step 1 has m1m_1 outcomes, step 2 has m2m_2 outcomes, and so on through step kk with mkm_k outcomes, and the steps are independent, then the combined sequence has

Multiplication Rule
∣A1×A2×⋯×Ak∣=∣A1∣⋅∣A2∣⋯∣Ak∣=m1⋅m2⋯mk.|A_1 \times A_2 \times \cdots \times A_k| = |A_1| \cdot |A_2| \cdots |A_k| = m_1 \cdot m_2 \cdots m_k.
Learn more about this formula: Multiplication Rule →


possible outcomes.

The linguistic marker for the multiplication rule is the word and — choose step 1 AND step 2 AND step 3. Each "and" between independent steps multiplies the count.

In set-theoretic terms, the rule is the cardinality of the Cartesian product, ∣A×B∣=∣A∣⋅∣B∣|A \times B| = |A| \cdot |B|, extended to any finite number of factors.

Example
A lunch combo is built from 3 main courses, 2 drinks, and 4 desserts. Each main can be paired with each drink, and each pairing with each dessert, giving
3×2×4=243 \times 2 \times 4 = 24
possible meals.

Pitfall: Adding the steps
Adding the menu counts, 3+2+4=93 + 2 + 4 = 9, counts dishes, not meals: a meal is a main and a drink and a dessert. Each of the 3×2=63 \times 2 = 6 main-and-drink pairs takes any of 44 desserts, so there are 3×2×4=243 \times 2 \times 4 = 24 meals.

Here every outcome uses all three steps: a meal has one main, one drink and one dessert. The traveller in the addition rule makes a single choice instead, and each trip uses exactly one mode of transport. Whether an outcome is put together from several choices or picked from one of several separate lists is what decides between multiplying and adding.

The Independence Condition


Fact: A cube with 43 quintillion positions
A Rubik's Cube has 8!8! corner placements, 373^7 corner twists, 12!12! edge placements and 2112^{11} edge flips, halved by a parity rule: about 4.3×10194.3 \times 10^{19} positions. The last twist and the last flip are forced by the others, so they contribute a factor of 11.

The rule requires that the number of options at each step not depend on the choices made at earlier steps. When the option count at a later step shifts based on earlier choices, the multiplication rule does not apply directly and the count must be broken down further — usually by splitting into cases via the addition rule.

The multiplication rule is the engine behind every permutation formula. Arranging nn distinct items in a line uses the rule with decreasing counts at each step: nn choices for the first position AND (n−1)(n-1) for the second AND (n−2)(n-2) for the third, down to 11, yielding n!n! total arrangements. Combinations build on the same product, with a division step to remove the ordering.
Three shirts times two trousers: a tree of six outfitsstep 1: shirt3 choicesstep 2: trousers2 choices eachoutfitP₁S₁P₁P₂S₁P₂S₁P₁S₂P₁P₂S₂P₂S₂P₁S₃P₁P₂S₃P₂S₃3 × 2 = 6 outfits: every path through the tree is one outfit
Three choices, then two

Choose a shirt, then trousers. Each of the 3 shirts opens its own branch, and every branch splits the same 2 ways, so the tree ends in 3 × 2 = 6 leaves — one for each outfit, each reached by exactly one path. Add a third step with k options and every leaf would split k ways again: that repeated splitting is why the counts multiply.

The rule needs the second step to offer the same number of options whatever the first choice was; the tree shows it as equal-sized fans.
DownloadPNG2×PDF
Layout
AspectAddition ruleMultiplication rule
Linguistic marker"or" — method 1 OR method 2 OR …"and" — step 1 AND step 2 AND …
Structural conditioncases are mutually exclusive (no outcome belongs to two methods)steps are independent (count per step does not depend on earlier choices)
Formulam₁ + m₂ + … + mₖm₁ × m₂ × … × mₖ
Set-theory identity|A ∪ B| = |A| + |B| for disjoint A, B|A × B| = |A| · |B| (Cartesian product)
Example2 bus + 3 train + 4 taxi routes → 9 total3 mains × 2 drinks × 4 desserts → 24 meals
The Multiplication RuleLearn Math Class

Complementary Counting


Some counting problems are easier to solve in reverse. Counting the cases that fail a condition can be significantly simpler than counting the cases that satisfy it, especially when the condition has the form "at least one" — its negation, "none", often collapses into a single tractable count.

If UU is the universe of all outcomes and A⊆UA \subseteq U is the set of desired outcomes, then

Complementary Counting
∣A∣=∣U∣−∣U∖A∣=∣U∣−∣Ac∣.|A| = |U| - |U \setminus A| = |U| - |A^c|.
Learn more about this formula: Complementary Counting →


The strategy is to count the total, count the complement, and subtract.

Example
The number of arrangements of nn distinct items in which a designated item lands in a designated position can be found from its complement: the arrangements in which that item is not in that position. The complement partitions cleanly: the designated position holds one of the n−1n-1 other items, and the remaining n−1n-1 items fill the rest in (n−1)!(n-1)! ways. Subtracting (n−1)⋅(n−1)!(n-1) \cdot (n-1)! from n!n! gives the desired number, (n−1)!(n-1)!.

Pitfall: Securing one success first
For at least one head in 44 coin flips, choosing the flip that shows the head (44 ways) and letting the other 33 land freely gives 4⋅23=324 \cdot 2^3 = 32, more than the 24=162^4 = 16 possible outcomes. The complement gives 16−1=1516 - 1 = 15.

A condition of the form "at least one" hides many cases at once: exactly one, exactly two, and so on up to all of them, and a single outcome can meet the condition in several places. Its negation, "none", is a single case with no overlaps, and it is usually counted by one product. That is why the subtraction route is the standard choice whenever the words "at least one" appear.

Structural Note


In set-theoretic notation, complementary counting expresses ∣A∣=∣U∣−∣Ac∣|A| = |U| - |A^c|, where AcA^c is the complement of AA in the universe. This is the addition rule applied to the partition A∪Ac=UA \cup A^c = U — complementary counting is a strategic application of the addition rule rather than an independent principle.

An "at least one" count is usually one subtraction away: count the outcomes with none and take them from the total.

Double Counting


Double counting is a proof technique rather than a counting formula. The set in question is counted in two genuinely different ways; the two resulting expressions both equal the size of the set, so they equal each other. The output is an identity, not a numerical count.

If ∣S∣|S| can be expressed as f(n)f(n) by one argument and as g(n)g(n) by another argument, then

Double Counting
∣S∣=f(n)=g(n)  ⟹  f(n)=g(n).|S| = f(n) = g(n) \implies f(n) = g(n).
Learn more about this formula: Double Counting →


The Handshake Lemma


A canonical illustration: in a group of people who have shaken hands in various pairings, the sum of the number of hands each person shook equals twice the total number of handshakes. The reason is that each handshake is counted once from each participant's perspective — the same set (handshakes) counted two ways. In graph theory this becomes ∑vdeg⁡(v)=2∣E∣\sum_{v} \deg(v) = 2|E|, where the left side sums degrees over all vertices and the right side counts each edge from both endpoints.

Pitfall: Counting each handshake twice
With 66 people who all shake hands, 6⋅5=306 \cdot 5 = 30 counts every handshake once from each of its two people. The lemma halves the sum: 302=15\frac{30}{2} = 15 handshakes, the same as the (62)=15\binom{6}{2} = 15 pairs.

The lemma is easiest to use when every person's count is known. If each of nn people shakes hands with every other person exactly once, each of them shakes n−1n - 1 hands, so the left side of the identity is a single product. The right side then gives the number of handshakes, which must match the number of pairs of people.

Combinatorial Identities


Many of the identities involving the binomial coefficient — including Vandermonde's identity and the hockey stick identity — are most naturally proved by double counting. A subset count is interpreted in two ways: by selecting members directly, and by partitioning the selection into stages or cases. The two expressions for the same subset count then equate to produce the identity. Algebraic proofs of these identities exist, but the combinatorial proofs are typically shorter and more illuminating.

Counting one set in two different ways proves that the two answers are equal, with no algebra needed.

The Pigeonhole Principle


The pigeonhole principle does not count outcomes — it guarantees the existence of a particular kind of outcome. The statement is existential: it certifies that something must occur without identifying where.

Basic Form


If nn items are distributed among kk containers and n>kn > k, then at least one container holds at least two items.

Formally:

Pigeonhole Principle
n>k  ⟹  ∃ container with ≥2 items.n > k \implies \exists \text{ container with } \ge 2 \text{ items}.
Learn more about this formula: Pigeonhole Principle →


The reasoning is direct: if every container held at most one item, the total number of items would be at most kk, contradicting n>kn > k.

Generalized Form


If nn items are distributed among kk containers, then at least one container holds at least ⌈n/k⌉\lceil n/k \rceil items, where ⌈⋅⌉\lceil \cdot \rceil denotes the ceiling function. The basic form is the case n=k+1n = k+1, which forces ⌈n/k⌉=2\lceil n/k \rceil = 2.

Formally:

Pigeonhole Principle (Generalized)
n items into k containers  ⟹  ∃ container with ≥⌈n/k⌉ items.n \text{ items into } k \text{ containers} \implies \exists \text{ container with } \ge \lceil n/k \rceil \text{ items}.
Learn more about this formula: Pigeonhole Principle (Generalized) →


Examples


Pitfall: Rounding n/k down
For 2525 people and 1212 months, ⌊25/12⌋=2\lfloor 25/12 \rfloor = 2 claims only that some month has 22 birthdays. The bound is ⌈25/12⌉=3\lceil 25/12 \rceil = 3: with at most 22 per month, 1212 months hold only 2424 people.

In any group of 13 people, at least two share a birth month — the 13 people are distributed among 12 months, so the basic form applies.

Among any 5 integers chosen from {1,2,…,8}\{1, 2, \ldots, 8\}, at least two come from one of the four pairs {1,2},{3,4},{5,6},{7,8}\{1,2\}, \{3,4\}, \{5,6\}, \{7,8\} — 5 items distributed into 4 pairs forces at least one pair to contain two of the chosen integers, and those two differ by exactly 1.

One-Sided Nature


Fact: No compressor shrinks every file
There are 2n2^n files of nn bits but only 2n−12^n - 1 shorter bit strings, the empty one included. If every file got shorter, two files would share a compressed form, and unpacking could not tell them apart.

The pigeonhole principle is asymmetric. It proves that a collision must occur, but says nothing about which container holds it or how to find it. The principle yields existence proofs in number theory, geometry, and combinatorics, often in settings where direct construction is hard or impossible.

In the language of functions, the principle states that no injection exists from a finite set into a strictly smaller finite set — any function from a larger finite set to a smaller one must map at least two elements of the domain to the same target.
3⁴ = 81Complete · 81 / 81ITEMS TO PLACE (n = 4)1234CELLS (k = 3)Cell 1Cell 2Cell 3assignment: (?, ?, ?, ?)(item 1 → cell c₁, item 2 → cell c₂, …)Each of n = 4 items independently picks 1 of k = 3 cells:3⁴ = 3 × 3 × 3 × 3 = 81COMPLETED81 / 81item 1 →Cell 11234(1,1,1,1)1234(1,1,1,2)1234(1,1,1,3)1243(1,1,2,1)1234(1,1,2,2)1234(1,1,2,3)1243(1,1,3,1)1243(1,1,3,2)1234(1,1,3,3)1342(1,2,1,1)1324(1,2,1,2)1324(1,2,1,3)1423(1,2,2,1)1234(1,2,2,2)1234(1,2,2,3)1423(1,2,3,1)1243(1,2,3,2)1234(1,2,3,3)1342(1,3,1,1)1342(1,3,1,2)1324(1,3,1,3)1432(1,3,2,1)1342(1,3,2,2)1324(1,3,2,3)1423(1,3,3,1)1423(1,3,3,2)1234(1,3,3,3)item 1 →Cell 22341(2,1,1,1)2314(2,1,1,2)2314(2,1,1,3)2413(2,1,2,1)2134(2,1,2,2)2134(2,1,2,3)2413(2,1,3,1)2143(2,1,3,2)2134(2,1,3,3)3412(2,2,1,1)3124(2,2,1,2)3124(2,2,1,3)4123(2,2,2,1)1234(2,2,2,2)1234(2,2,2,3)4123(2,2,3,1)1243(2,2,3,2)1234(2,2,3,3)3412(2,3,1,1)3142(2,3,1,2)3124(2,3,1,3)4132(2,3,2,1)1342(2,3,2,2)1324(2,3,2,3)4123(2,3,3,1)1423(2,3,3,2)1234(2,3,3,3)item 1 →Cell 32341(3,1,1,1)2341(3,1,1,2)2314(3,1,1,3)2431(3,1,2,1)2341(3,1,2,2)2314(3,1,2,3)2413(3,1,3,1)2413(3,1,3,2)2134(3,1,3,3)3421(3,2,1,1)3241(3,2,1,2)3214(3,2,1,3)4231(3,2,2,1)2341(3,2,2,2)2314(3,2,2,3)4213(3,2,3,1)2413(3,2,3,2)2134(3,2,3,3)3412(3,3,1,1)3412(3,3,1,2)3124(3,3,1,3)4312(3,3,2,1)3412(3,3,2,2)3124(3,3,2,3)4123(3,3,3,1)4123(3,3,3,2)1234(3,3,3,3)
4 items into 3 cells: 3⁴ = 81 ways

Every one of the 81 assignments of 4 items to 3 cells is enumerated here, and not one of them leaves all three cells with a single item — there are simply not enough cells to go round. That is the pigeonhole principle as an exhaustive check rather than an argument: the crowded cell is present in all 81 cases, which is why the conclusion needs no construction. Change the counts and watch the guarantee appear and disappear on the distribution into cells visualizer.

The generalized form above is the same argument with the threshold raised: push enough items in and some container must hold not just two but many.
When items outnumber containers, a collision is certain, even when no one can say where it happens.

Putting the Principles Together


Most counting problems are not solved by applying a single principle. They require chaining several — addition to split a problem into cases, multiplication within each case to count its outcomes, complementary counting to simplify a case that is easier in reverse.

A Worked Example


Count the number of 3-digit positive integers whose digits are all distinct.

The first digit cannot be 0 (or the number would not be a 3-digit number), so it has 9 choices. The second digit can be any digit except the one already used, giving 9 remaining choices (now including 0). The third digit can be any digit except the two already used, giving 8 choices. By the multiplication rule:

Putting the Principles Together
9×9×8=648.9 \times 9 \times 8 = 648.

Now consider the complementary question: how many 3-digit positive integers contain at least one repeated digit?

The total number of 3-digit positive integers is 9×10×10=9009 \times 10 \times 10 = 900 — 9 choices for the first digit and 10 each for the other two. Subtracting the 648 with all-distinct digits gives

Putting the Principles Together
900−648=252900 - 648 = 252

with at least one repetition.

A direct count of the "at least one repetition" set would require case analysis: exactly two digits equal and one different, all three digits equal, and the various positional arrangements. The complementary route converts the multi-case problem into a single subtraction.

When Each Principle Applies


The addition rule splits a count across mutually exclusive cases. The multiplication rule builds a count from independent steps. Complementary counting reframes a hard "at least one" problem as a simpler "none" problem and subtracts. Double counting produces identities by counting the same set two different ways. The pigeonhole principle proves that a configuration must exist when items outnumber containers.

These five principles together cover the logical foundation of every formula that appears in the rest of the section.

Common Pitfalls

Five mistakes come up again and again when the counting principles are put to work. Four are marked where they happen in the sections above; the fifth, adding cases that overlap, is described in the addition rule section. Here each is worked through in full, with the wrong and the right working side by side.
DownloadPNG2×PDF
1Adding overlapping cases
A count is split into cases and the case counts are added, but some outcomes belong to two cases at once. Each of those outcomes is counted twice.
Start
The integers from 11 to 2020 divisible by 22 or by 33.
Wrong turn
Error here
There are 1010 multiples of 22 and 66 multiples of 33, so the count is given as 10+6=1610 + 6 = 16.
Right path
The multiples of 66, namely 66, 1212 and 1818, are in both lists. Subtracting them once gives 10+6−3=1310 + 6 - 3 = 13. This is the inclusion–exclusion principle for two sets.
Why it happensThe word "or" points to the addition rule, and the condition that the cases cannot happen together is easy to skip.
How to checkLook for one outcome that fits two cases; here 66 is divisible by both 22 and 33. Listing the numbers also works: 2,3,4,6,8,9,10,12,14,15,16,18,202, 3, 4, 6, 8, 9, 10, 12, 14, 15, 16, 18, 20 are 1313 numbers.
2Adding the steps
An outcome is built from several choices made together, but the option counts are added as if a single choice were made from one combined list. The reverse slip multiplies alternatives: the traveller's 22 bus, 33 train and 44 taxi routes give 99 trips, not 2×3×4=242 \times 3 \times 4 = 24, because a trip uses only one of them.
Wrong turn
Error here
A lunch combo has 33 mains, 22 drinks and 44 desserts, and the number of meals is given as 3+2+4=93 + 2 + 4 = 9.
Right path
Each meal is one main and one drink and one dessert. The 33 mains pair with the 22 drinks in 3×2=63 \times 2 = 6 ways, and each pair goes with any of the 44 desserts: 3×2×4=243 \times 2 \times 4 = 24 meals.
Why it happens99 is the number of dishes on the menu, and adding feels like putting the options together. The word "and" is often left out of the problem.
How to checkAsk whether one outcome uses one choice or one of each. Main 11 alone already gives 2×4=82 \times 4 = 8 different meals, so 99 meals in total is far too few.
3Securing one success first
For an "at least one" condition, one success is fixed first and everything else is left free. An outcome with several successes is then counted once for each of them.
Start
At least one head in 44 coin flips.
Wrong turn
Error here
Choose the flip that shows the head in 44 ways and let the other 33 flips land freely in 23=82^3 = 8 ways: 4⋅8=324 \cdot 8 = 32.
Right path
There are 24=162^4 = 16 outcomes in all, and only one of them, all tails, has no head. So 16−1=1516 - 1 = 15 outcomes have at least one head.
Why it happensFixing a head does guarantee the condition, so the count looks safe. But an outcome such as two heads followed by two tails is reached twice, once with the first flip fixed and once with the second, and four heads is reached four times.
How to checkThe answer can never be larger than the total; 32>1632 > 16 shows the overcount. Counting by the exact number of heads confirms the right answer: (41)+(42)+(43)+(44)=4+6+4+1=15\binom{4}{1} + \binom{4}{2} + \binom{4}{3} + \binom{4}{4} = 4 + 6 + 4 + 1 = 15.
4Counting each handshake twice
The number of handshakes is found by adding up how many hands each person shook, and that sum is given as the answer.
Start
66 people each shake hands with everyone else.
Wrong turn
Error here
Each shakes 55 hands, so the count is given as 6⋅5=306 \cdot 5 = 30.
Right path
Each handshake involves 22 people, so it appears twice in the sum. By the handshake lemma the sum is 2∣E∣2|E|, so ∣E∣=302=15|E| = \frac{30}{2} = 15. Choosing the 22 people of a handshake gives the same number: (62)=15\binom{6}{2} = 15.
Why it happensCounting person by person is natural, and it is easy to forget that the handshake between two people appears in both of their counts.
How to checkTry 33 people. They make 33 handshakes, but the per-person sum is 3⋅2=63 \cdot 2 = 6. The per-person sum is always even, since it is twice the number of handshakes; an odd sum signals a slip in the counts.
5Rounding n/k down
The generalized form guarantees a container with at least ⌈n/k⌉\lceil n/k \rceil items, but the quotient is rounded down instead of up.
Start
2525 people and 1212 months.
Wrong turn
Error here
⌊25/12⌋=2\lfloor 25/12 \rfloor = 2, so the conclusion drawn is only that some month has at least 22 birthdays. For 1313 people the floor gives 11, which says nothing at all.
Right path
⌈25/12⌉=3\lceil 25/12 \rceil = 3. If every month had at most 22 birthdays, the 1212 months would hold at most 2424 people, fewer than 2525. So some month has at least 33.
Why it happensRounding down is the habit for questions like "how many full boxes", where the leftover is ignored. Here the leftover is the whole point: it has to go somewhere, and it pushes one container higher.
How to checkSpread the items as evenly as possible. 1212 months with 22 people each hold 2424; the 2525th person makes a third in some month, so the guaranteed number is 33.
Common pitfalls with the counting principles·/combinatorics/counting-principlesLearn Math Class
Each slip applies the right principle in the wrong way. Cases are added only when they do not overlap, the steps of one outcome are multiplied, at least one is counted as the total minus none, a sum over people counts every handshake twice, and the pigeonhole bound rounds n/kn/k up. Comparing the answer with the total, listing the outcomes, or trying 33 people catches each of them.

Related Concepts


• Set Theory — the language of unions, intersections, complements, and Cartesian products that the counting rules formalize as cardinality identities.

• Functions — the pigeonhole principle is the statement that no injection exists from a finite set into a strictly smaller finite set.

Counting Principles at a Glance


The page covered five logical rules behind every counting argument: the addition and multiplication rules for combining counts, complementary counting for "at least one" problems, double counting as a proof technique for identities, and the pigeonhole principle for existence guarantees. The table below collects each principle with its linguistic marker, its purpose, and a canonical example.
DownloadPNG2×PDF
Layout
PrincipleMarker / formWhat it doesCanonical example
Addition rule"or" across mutually exclusive casessum the counts of each case2 + 3 + 4 = 9 route choices
Multiplication rule"and" across independent stepsmultiply the step counts3 × 2 × 4 = 24 lunch combos
Complementary counting"at least one" → count its negation "none"|A| = |U| − |U ∖ A|; subtract the complement900 − 648 = 252 three-digit integers with a repeated digit
Double countingcount the same set two different waysequate the two expressions → identity, not a numberhandshake lemma: Σ deg(v) = 2|E|
Pigeonhole principleitems > containersat least one container holds ≥ ⌈n⁄k⌉ items (existence, not location)13 people, 12 months → two share a birth month
Counting Principles at a GlanceLearn Math Class

Skills You Should Learn

Each skill opens its step-by-step method page. Skills marked "On this page" are taught above.
Taught on this page
More combinatorics methods
  • Count choices made in stagesSingle ruleOne outcome is built from several steps, and the number of options at each step does not depend on the earlier choices: an outfit of a shirt and pants and shoes, a code digit by digit, a meal of 3×2×43 \times 2 \times 4 dishes.
  • Count choices from separate casesSingle ruleOne outcome comes from one of several groups that share no outcomes, joined by the word or: one book from 55 novels or 77 biographies, one trip by bus or by train.
  • Use inclusion-exclusion for two setsCount the items in A or B: add the two sizes and subtract the overlap once, ∣A∪B∣=∣A∣+∣B∣−∣A∩B∣|A \cup B| = |A| + |B| - |A \cap B|.

Counting Principles FAQ

Do you add or multiply when counting possibilities?

+
Multiply when choices happen in sequence and each is made in addition to the others. Add when the choices are alternatives and only one of them occurs. Picking a shirt and then a hat multiplies; picking either a shirt or a hat adds. The words and and or in the problem usually signal which applies.Read more →

When is it easier to count the opposite?

+
Whenever the phrase at least appears, or when the forbidden cases are far fewer than the allowed ones. Count everything, count what fails, and subtract. Problems asking for arrangements where at least one condition holds usually have many valid cases and few invalid ones, which makes the complementary route much shorter.Read more →

What does the pigeonhole principle let you prove?

+
That some outcome must occur, without identifying which one. If more items are placed than there are containers, at least one container holds two. It gives existence rather than construction, which is why it proves things like two people in a large city having the same number of hairs, with no way to name them.Read more →

When do you use double counting?

+
When you want to prove two expressions are equal rather than compute a number. Count the same collection in two different ways and the two answers must agree, which establishes an identity directly. Many binomial coefficient identities are proved this way, and the argument is often shorter than algebraic manipulation.Read more →

How many positions does a Rubik's Cube have?

+
About 4.3×10194.3 \times 10^{19}, exactly 43,252,003,274,489,856,00043{,}252{,}003{,}274{,}489{,}856{,}000. The multiplication rule combines 8!8! corner placements, 373^7 corner twists, 12!12! edge placements and 2112^{11} edge flips, and a parity rule halves the result. The last corner twist and the last edge flip are forced by the others, which is why the powers are 373^7 and 2112^{11} rather than 383^8 and 2122^{12}.Read more →

Can a compression program make every file smaller?

+
No. There are 2n2^n files of nn bits but only 2n−12^n - 1 bit strings shorter than nn bits, the empty one included. If every nn-bit file got shorter, the pigeonhole principle would force two files to share one compressed form, and unpacking could not tell them apart. A lossless compressor that shrinks some files must leave others the same size or make them longer.Read more →

Can you multiply when the later choices depend on the earlier ones?

+
Yes, as long as the number of options at each step stays the same. For 3-digit numbers with distinct digits, which digits are left for the second place depends on the first digit, but there are always 99 of them, and then always 88 for the third, so the count is 9×9×8=6489 \times 9 \times 8 = 648. When the number of options itself changes, split into cases with the addition rule.Read more →

How many people guarantee that three share a birth month?

+
2525. With 2424 people the 1212 months can hold exactly 22 each, so no month needs a third. The 2525th person has to join a month that already has two, which is the generalized pigeonhole principle: ⌈25/12⌉=3\lceil 25/12 \rceil = 3. In the same way, guaranteeing mm people in one month takes 12(m−1)+112(m - 1) + 1 people, and m=2m = 2 gives the familiar 1313.Read more →