Worked Example 1
U = {1, 2, ..., 10}, A = {2, 4, 6, 8, 10}, B = {1, 2, 3, 4, 5}. Find A ∪ B, A ∩ B, A − B and A′.
Union: collect everythingA ∪ B = {1, 2, 3, 4, 5, 6, 8, 10}
Intersection: keep only the shared onesA ∩ B = {2, 4}
Difference: A with B taken outA − B = {6, 8, 10}
Complement: everything in U outside AA′ = {1, 3, 5, 7, 9}
Worked Example 2
In a class of 40, 25 study science, 18 study computing, and 8 study both. How many study neither?
Step 1: find how many study at least onen(A ∪ B) = 25 + 18 - 8 = 35
Step 2: take that from the whole classNeither = 40 - 35 = 5 students
The word neither is a complementNeither means outside the union, so it is the complement of A ∪ B.
Sense check17 + 10 + 8 + 5 = 40, the whole class. Everything is accounted for exactly once.
1 more worked examples - sign in to see them all.