Sums, products, and double counting: name the objects first
Count disjoint alternatives, sequential choices, and incidences without hiding overlap or multiplicity.
On this page
The question for today
What you’ll understand
- Apply the sum rule only to disjoint cases.
- Apply the product rule with stage-dependent choices handled explicitly.
- Prove an identity by counting one incidence set in two ways.
A counting formula is reliable only after the objects being counted are specified. Are two schedules different when sessions swap places? Does choosing the same committee in another order create a new committee? Sum and product rules answer structural questions about alternatives and sequences. Double counting goes further: describe the same set of incidences from two viewpoints, and an equality emerges because both calculations count exactly the same objects once.
Add disjoint alternatives
If each object belongs to exactly one case, the total is the sum of the case sizes. Disjointness prevents duplication, and coverage prevents omissions. For a two-character code beginning with a letter or a digit, those first-character cases are disjoint if the alphabets are distinct. For people who know Python or Rust, the cases overlap when someone knows both, so adding the two totals counts that person twice. The word or alone does not justify addition.
A partition is therefore the natural structure behind the sum rule. It need not contain equally sized blocks. Counting by the first occurrence of a special event often creates disjoint cases even when the original description overlaps. Always state which unique feature assigns an object to a case. If the same object can be placed in two cases, either refine the classification or track the duplicated memberships explicitly.
Multiply choices along a decision process
The product rule counts outcomes produced by successive choices when each complete object has a unique construction history and each stage offers a fixed number of choices after every permitted earlier history. The actual options can depend on earlier choices: choosing two distinct people in order gives n choices followed by n minus one, even though the identity of the excluded second choice changes. Constant branch count, not probabilistic independence, is the relevant condition.
When branch counts vary, split into cases and sum the products along them. Suppose a password begins with A or B; after A there are three allowed suffixes, after B there are five. There are eight passwords, not two times an arbitrary suffix count. A tree is useful because each leaf is a complete outcome, but verify that distinct paths do not encode the same object if order is supposed to be forgotten at the end.
Count incidences from both ends
An incidence is a pair recording that one object participates in another: a student in a club, a vertex on an edge, or an element in a subset. Count the incidence set by fixing its first component and summing partners, then by fixing its second component and summing partners. Both sums equal the size of that same relation. This proves an identity without algebraic manipulation and often explains why a factor appears.
For a finite undirected graph without loops, count vertex-edge incidences. Summing over vertices gives the degree sum; summing over edges gives twice the edge count because each edge has two distinct endpoints. The even total then forces an even number of odd-degree vertices. If loops are allowed, define their degree contribution consistently as two. A counting argument is only as exact as its definition of an incidence and its treatment of exceptional objects.
Work it through
Count committee memberships
Five students form every possible three-person committee. Count pairs (student, committee) in which the student belongs to that committee.
Count by committee: there are ten distinct three-person subsets of five students, and each contributes three student memberships, giving 10 × 3 = 30 incidences.
Count by student: fix one of five students, then choose two partners from the other four. The six possible partner pairs give six committees containing that student.
Sum over the five students: 5 × 6 = 30. Each incidence has one distinguished student and one committee, so both methods count it exactly once even though each committee appears in three incidences.
There are 30 memberships. This illustrates the identity k times C(n,k) = n times C(n−1,k−1), here with n = 5 and k = 3.
The living notebook
Explore the model
Interactive lab · probability
Bar heights combine counts and weights
The lab's trials n and probability p controls show the exact binomial bars. Set p=1/2 and predict which success counts have more binary histories before changing n. Each history then has weight , so a bar's mass is its history count times that weight. For unequal p, histories in different success classes have different weights; the lab is not an outcome-listing tool.
- Mean · np
- 5
- Variance · np(1−p)
- 2.5
- Total probability
- 1
These are exact binomial probabilities for independent trials with one fixed success probability. Playback tours the distribution; it does not resample outcomes. Parameter changes pause playback and recompute the model at the current elapsed time. Reset restores both parameters and returns time to zero. Playback starts paused. Adjust either parameter, then choose Play or Step.
Look forFirst count the underlying outcomes; only then attach probability weights under stated assumptions.
Pause & reason
Check your understanding
Your turn
Try it yourself
A finite simple graph has degrees 3,3,2,2,2. How many edges must it have? Explain why a proposed graph with degrees 3,3,3,2 cannot exist.
Take a moment to make a prediction or work it out on paper. Open a hint when you need one.
Give me a hint
Count vertex-edge incidences and use the fact that each edge contributes two.
Compare with the solution
The first degree sum is 12, so it requires six edges. This is a necessary count; a degree sum alone does not construct a graph. The second sum is 11, which cannot equal twice an integer edge count, so that degree list is impossible. Equivalently it contains three odd degrees, contradicting the even number of odd-degree vertices required by the incidence count.
Keep the idea
Take it with you
- Addition requires disjoint exhaustive cases.
- Multiplication counts unique sequences with a fixed branch count at each stage.
- Double counting proves an identity by defining one incidence set precisely.
Read further
Original sources and deeper explanations to follow at your own pace.
Optional progress, saved in this browser when available. Revisit any lesson at any time.
Lesson not marked complete.