discrete.

STEP-BY-STEP LESSON · §9.3

Counting Elements of Disjoint Sets: The Addition Rule

Add cases without double counting.

Before you begin

Sets and membership

A set records which objects belong to it. Repetition and listing order do not change a set. x∈A says that x is an element; A⊆B says every element of A is also in B.

Intersection

A∩B contains objects in both A and B. In probability this is the event that both conditions occur. Count each common outcome once.

Symbols

|A∪B|
size of a union
|A∩B|
size of the overlap
A\B
Elements of A that do not belong to B
Definitions and notation for this topic
Sum rule

Adds the numbers of possibilities in mutually exclusive cases.

An option must not be counted twice.

Separate glossary example

Choose one of 3 red tickets or one of 2 blue tickets: 5 choices.

Open glossary card
Inclusion–exclusion
|A∪B|=|A|+|B|−|A∩B|

For two finite sets A and B, add their sizes and subtract the overlap once to obtain the size of their union.

This formula applies to two finite sets.

Separate glossary example

|A∪B|=|A|+|B|−|A∩B|

Open glossary card

Step by step

Step 1 / 6

Define cases

Separate results into sets A and B. Check whether one result can be in both.

Overlap determines the counting formula.

Worked example

In a group, 8 study Python, 6 Java, and 3 both. How many study at least one?

  1. Let A be the Python group and B the Java group; at least one asks for A∪B.
  2. The sum 8+6=14 includes three students twice.
  3. Subtract 3: 14−3=11.
Optional self-check

Of 20 people, 9 like tea, 8 coffee, and 3 both. How many like exactly one, and how many neither?

Show answer

Exactly one: (9−3)+(8−3)=11. At least one: 9+8−3=14, so neither: 20−14=6.

Source / textbook · approved access required

Open source: printed p. 589 · PDF 613