FP2 5.7 - Counting principles and subsets

FP2 5.7 - Counting principles and subsets

Use set notation and the multiplication, addition and subtraction principles to count outcomes. Count subsets, and choose between direct counting and counting a complement without omitting or repeating cases.

Decide what counts as one outcome

How many positive integers below 10001000 contain the digit 33? Listing them sounds like a long afternoon. Counting the numbers that avoid 33 will give the answer in one line: surprisingly, more than a quarter of the 999999 integers contain it. We will find the exact count and explain why leading zeros help rather than spoil the method.

Before counting, decide what makes two outcomes different. The numbers 1313 and 3131 differ; the sets {1,3}\{1,3\} and {3,1}\{3,1\} do not. A set has no order and no repeated elements: {1,1,3}={1,3}\{1,1,3\}=\{1,3\}.

Sets and subsets

A set is a collection of distinct elements. Write x∈Ax\in A when xx belongs to AA, and n(A)n(A) for the number of elements of a finite set.

A⊆UA\subseteq U means every element of AA belongs to UU. A proper subset, A⊂UA\subset U, is a subset with A≠UA\ne U. The empty set ∅\varnothing has no elements and is a subset of every set.

For U={0,1,2,3,4,5,6,7,8,9}U=\{0,1,2,3,4,5,6,7,8,9\} and A={1,3,5}A=\{1,3,5\}, we have 3∈A3\in A, {3}⊆A\{3\}\subseteq A, A⊂UA\subset U and n(A)=3n(A)=3. The element 33 and the singleton set {3}\{3\} are different objects.

The universal set UU contains every outcome under discussion. The union A∪BA\cup B contains outcomes in either set or both; the intersection A∩BA\cap B contains those in both; the complement A′A' contains outcomes in UU that are not in AA. Sets are disjoint when their intersection is empty.

Key idea

A count is reliable only when the outcomes, the universal set and any restrictions are stated precisely.

These set meanings and notation are not listed as counting results in the formula booklet. They are the language used to state the principles below.

Multiply choices made in successive stages

Suppose a code consists of a letter, a second letter, then a digit. Each first choice leads to a set of second choices; each resulting pair leads to digit choices. Multiplication counts all the branches without listing them individually.

The number of available choices may change after a previous selection. “No repetition” changes a later factor; it does not change multiplication into addition.

Multiplicative principle

If each first-stage choice has a2a_2 second-stage choices, each resulting pair has a3a_3 third-stage choices, and so on, the number of outcomes is

a1a2⋯aka_1a_2\cdots a_k

The stated number of choices at each stage must apply to every partial outcome being counted in that product.

Not in the formula booklet: learn it.

If different first choices lead to different numbers of continuations, split into cases and count those separately. You do not need probabilistic independence: you need the correct number of choices at each stage.

Worked example 1: codes allowing repetition

Question. A code has two letters followed by one digit. Each letter is chosen from {A,B,C,D}\{A,B,C,D\}, repetition is allowed, and the digit can be 00 to 99. How many codes are possible?

Plan. Count the choices for each of the three fixed positions, then multiply.

first letter:4four available letterssecond letter:4repetition alloweddigit:10including zerototal=4×4×10=160successive choices\begin{aligned} \text{first letter}&:4 && \text{four available letters}\\ \text{second letter}&:4 && \text{repetition allowed}\\ \text{digit}&:10 && \text{including zero}\\ \text{total}&=4\times4\times10=160 && \text{successive choices} \end{aligned}

Why this step? A code records positions. AB0AB0 and BA0BA0 differ, while AA0AA0 is allowed.

Answer. 160160 codes.

Check. There are 1616 ordered letter pairs, each followed by ten possible digits, giving 160160.

Keep the character sets and positions fixed; change only the rule on repeating letters.

Worked example 2: prohibit a repeated letter

Question. How many such codes are possible when the two letters must be different?

Plan. Choose the first letter freely, then exclude it from the second position.

letter pairs=4×3=12one letter now unavailablecodes=12×10=120digit choice unchanged\begin{aligned} \text{letter pairs}&=4\times3=12 && \text{one letter now unavailable}\\ \text{codes}&=12\times10=120 && \text{digit choice unchanged} \end{aligned}

Why this step? Whatever the first letter is, exactly three alternatives remain. The second choice depends on the first, but its count is always three.

Answer. 120120 codes.

Check. The forbidden repeated-letter codes are 4×10=404\times10=40, so 160−40=120160-40=120.

The same leading-zero issue will reappear when we count integers. Here the last character may certainly be zero; a code is not a three-digit positive integer.

Watch out

Wrong: use 4×4×94\times4\times9 because “zero is not a digit”. Right: zero is a digit; exclude it only when the problem's position or number restriction requires that exclusion.

Expand the letter set by one element, retaining the no-repetition rule.

Add disjoint cases and remove any double count

When every outcome lies in exactly one of several cases, add the case counts. If the cases overlap, plain addition counts their intersection twice. Subtract one copy of that overlap.

Addition with and without overlap

For finite sets A,BA,B,

n(A∪B)=n(A)+n(B)−n(A∩B)n(A\cup B)=n(A)+n(B)-n(A\cap B)

If A,BA,B are disjoint, n(A∩B)=0n(A\cap B)=0, so their union has n(A)+n(B)n(A)+n(B) elements. More generally, add the counts of pairwise disjoint cases.

Not in the formula booklet: learn it.

The reason is visible in a Venn diagram: an outcome in both sets is included in each separate total, so the overlap needs subtracting once. An outcome outside both is not in the union.

[DIAGRAM: asset_name: Counting a union without duplicating its overlap; asset_slug: 9fm0-fp285-set-union; caption: Add the two set totals and subtract the six outcomes counted twice; description: A rectangular universal set of 40 people contains overlapping circles A and B. The A-only region is labelled 12, the overlap 6, the B-only region 9, and the outside-both region 13. Set labels A and B are dark ink, with small notes n(A)=18 and n(B)=15. A bottom line states union 12+6+9=27 and neither 13. White background and generous margins.]
Add the two set totals and subtract the six outcomes counted twice

Use club memberships to make the difference concrete.

Worked example 3: mutually exclusive cases

Question. Of 4040 students, 1818 belong to club AA and 1515 to club BB. No student belongs to both. How many belong to at least one club?

Plan. The sets are disjoint, so add the two counts.

n(A∩B)=0no common membersn(A∪B)=18+15=33disjoint addition\begin{aligned} n(A\cap B)&=0 && \text{no common members}\\ n(A\cup B)&=18+15=33 && \text{disjoint addition} \end{aligned}

Why this step? “At least one” means the union. Disjointness guarantees nobody appears in both counts.

Answer. 3333 students.

Check. The remaining 40−33=740-33=7 students belong to neither, so all 4040 are accounted for.

Keep both club totals and the class size fixed; change only the overlap, to six students in both clubs.

Worked example 4: overlapping cases

Question. Now n(A∩B)=6n(A\cap B)=6. How many students belong to at least one club, and how many to neither?

Plan. Remove one copy of the overlap, then subtract the union from the universal total.

n(A∪B)=18+15−6=27correct the double countn((A∪B)′)=40−27=13outside the union\begin{aligned} n(A\cup B)&=18+15-6=27 && \text{correct the double count}\\ n((A\cup B)')&=40-27=13 && \text{outside the union} \end{aligned}

Why this step? Subtracting all six common members from each club would remove them completely. They must appear once in the union.

Answer. 2727 belong to at least one club, and 1313 to neither.

Check. The four Venn regions contain 12,6,9,1312,6,9,13, whose sum is 4040.

When using a direct digit count, a number such as 333333 may satisfy several position-based cases. Use disjoint cases or explicitly remove the overlap; “at least once” does not mean “exactly once”.

Watch out

Wrong: add counts of “first digit is 33” and “second digit is 33” as if they were disjoint. Right: account for numbers in both cases, or choose a complement that avoids the overlap entirely.

Change the overlap once more.

Continue this lesson.

You’re previewing NovaLearn without an account. Create a free account to read the rest.

Create free account