Emzini weCodeUmhlahlandlelaMathematics 15.2 · Sets, Logic and Counting NoticesAll books

Chapter 15/15.2Foundationabout 5 min

Venn diagrams and counting

Try this first

In a coding club of 30 learners, 17 make games, 12 build robots, and 5 do both. How many do at least one? How many do neither? Draw two overlapping circles to help.

A Venn diagram, named after the English logician John Venn, who made it popular in 1880, shows sets as regions inside a rectangle that stands for U.

Definition

intersection The intersection of A and B, written A ∩ B, is the set of elements in both A and B.

Definition

union The union of A and B, written A ∪ B, is the set of elements in A or B or both.

Definition

complement The complement of A, written A′, is the set of elements of U that are not in A.

Intersection, union and complementThe rectangle is everything being considered. The gold region is the set namedbeside it.1INTERSECTIONABUA ∩ Bintersectionin both A and B2UNIONABUA ∪ Bunionin A or B or both3COMPLEMENTABUA′complement of Aeverything in Uthat is not in A
Figure 15.1 The shaded region in each Venn diagram. The rectangle is the universal set U.

Counting two sets. In the coding club, adding 17 + 12 = 29 counts the 5 learners who do both twice, once in each circle. So we subtract them once: 17 + 12 − 5 = 24 do at least one, and 30 − 24 = 6 do neither.

Key fact

Inclusion and exclusion for two sets. n(A ∪ B) = n(A) + n(B) − n(A ∩ B).

Worked example 15.1

Of 40 learners, 20 take Maths club (M), 16 Physics club (P) and 18 Coding club (C). 7 take M and P, 8 take M and C, 6 take P and C, and 3 take all three. How many take none?

Fill the diagram from the centre outwards.
Centre: 3.
M and P only:
7 − 3 = 4
M and C only:
8 − 3 = 5
P and C only:
6 − 3 = 3
M only:
20 − 4 − 5 − 3 = 8
P only:
16 − 4 − 3 − 3 = 6
C only:
18 − 5 − 3 − 3 = 7
At least one club:
3 + 4 + 5 + 3 + 8 + 6 + 7 = 36
None:
40 − 36 = 4

Now try one yourself

Counting with Venn diagramsEach learner is counted once, in the one region that fits. The circle totals add upfrom their regions.CODING CLUB: 30 LEARNERSTHREE CLUBS: 40 LEARNERSUUGames 17Robots 121257neither 617 + 12 − 5 = 24in at least one club30 − 24 = 6 in neitherMaths 20Physics 16Coding 1831836373425232none 44the order of filling:1the centre2two clubs only3one club only4none
Figure 15.2 Left: the coding club. Right: Worked example 15.1, filled in from the centre outwards.
Going further

Three sets at once. The worked example agrees with the rule n(A ∪ B ∪ C) = n(A) + n(B) + n(C) − n(A ∩ B) − n(A ∩ C) − n(B ∩ C) + n(A ∩ B ∩ C): 20 + 16 + 18 − 7 − 8 − 6 + 3 = 36. Each learner in all three clubs is added 3 times, taken away 3 times, and added back once, so is counted exactly once. Check that every other region is also counted exactly once.

Check your understanding 15.2

  1. U = {1, 2, ..., 10}, A = {even numbers} and B = {multiples of 3}. List A ∩ B, A ∪ B and A′.
    Show answerHide answer
    A ∩ B = {6}. A ∪ B = {2, 3, 4, 6, 8, 9, 10}. A′ = {1, 3, 5, 7, 9}.
  2. n(A) = 12, n(B) = 9 and n(A ∪ B) = 17. Find n(A ∩ B).
    Show answerHide answer
    17 = 12 + 9 − n(A ∩ B), so n(A ∩ B) = 4.
  3. Shade (A ∪ B)′ on a copy of a two set Venn diagram. Describe it in words.
    Show answerHide answer
    Everything outside both circles: the elements in neither A nor B.