MS101 Module2 VennDiagram
MS101 Module2 VennDiagram
Chapter 1 – Sets
In 1880, the English logician John Venn At the end of the module, you will be able to:
devised a pictorial representation for sets and 1. illustrate sets and set operations using
their fundamental operations. This Venn diagram;
diagrammatic approach is considered very 2. describe Venn diagrams using set
convenient and essential in seeing mental relations and/or operations; and
images of abstract concepts like sets. These 3. learn and apply the inclusion-exclusion
visual representations are called Venn principle.
diagram.
In order to better understand set relations and set operations we now introduce Venn
diagrams. A Venn diagram is the pictorial representation of sets. Rectangles usually represent the
universal set while circles or any other convenient figures represent the subsets of the universal set.
The elements of a set are thought to be contained within the circle representing that set.
Example 24:
Describe the following Venn diagram is terms of 𝐴 and 𝑈. 𝑈
(a) Set 𝐴 is a proper subset of the universal set 𝑈.
or 𝐴
(b) If 𝑥 ∈ 𝐴, then 𝑥 ∈ 𝑈 and there are elements 𝑥 ∈ 𝑈
and 𝑥 ∉ 𝐴.
Example 25:
Describe the following Venn diagram in terms of 𝐴, 𝐵, and
𝑈
𝑈.
9
MS 101
Discrete Mathematics Module 2
Example 26:
Describe the following Venn diagram in terms of 𝐴, 𝐵, and 𝑈
𝑈.
(a) Set A is a proper subset of B. Set B does not make
𝐴 𝐵
up the entire universal set.
or
(b) If 𝑥 ∈ 𝐴, then 𝑥 ∈ 𝐵. There are elements 𝑥 such that
𝑥 ∈ 𝐵 and 𝑥 ∉ 𝐴. There are elements 𝑥 such that 𝑥 ∉
𝐵.
Example 27:
Describe the following Venn diagram in terms of 𝐴, 𝐵, 𝐶, and
𝑈
𝑈.
(a) Sets 𝐴 and 𝐵 are neither disjoint nor subsets of one 𝐴 𝐵
another. Sets 𝐴 and 𝐶 are neither disjoint nor subsets
of one another. Sets 𝐵 and 𝐶 are neither disjoint nor 𝐶
subsets of one another. Sets 𝐴, 𝐵, and 𝐶 have
elements in common but they do not make up the
entire universal sets.
or
(b) There are elements 𝑥 ∈ 𝐴, 𝑥 ∈ 𝐵, and 𝑥 ∈ 𝐶; elements 𝑥 ∈ 𝐴, 𝑥 ∈ 𝐵, and 𝑥 ∉ 𝐶; elements 𝑥 ∈
𝐴, 𝑥 ∈ 𝐶, and 𝑥 ∉ 𝐵; elements 𝑥 ∈ 𝐵, 𝑥 ∈ 𝐶, and 𝑥 ∉ 𝐴; elements 𝑥 ∈ 𝐴, 𝑥 ∉ 𝐵, and 𝑥 ∉
𝐶; elements 𝑥 ∈ 𝐵, 𝑥 ∉ 𝐴, and 𝑥 ∉ 𝐶; elements 𝑥 ∈ 𝐶, 𝑥 ∉ 𝐴, and 𝑥 ∉ 𝐵; and finally elements
𝑥 ∉ 𝐴, 𝑥 ∉ 𝐵, and 𝑥 ∉ 𝐶.
Example 28:
Describe the following Venn diagram in terms of 𝐴, 𝐵, 𝐶, and
𝑈
𝑈.
(a) Sets 𝐴 and 𝐶 are disjoint. Set 𝐶 is a proper subset of 𝐵
𝐵. Sets 𝐴 and 𝐵 are neither disjoint nor subsets of one 𝐴
𝐶
another. Sets 𝐴, 𝐵, and 𝐶 do not make up the entire
universal set.
or
(b) If 𝑥 ∈ 𝐶, then 𝑥 ∈ 𝐵. There are elements 𝑥 such that 𝑥 ∈ 𝐵 and 𝑥 ∉ 𝐶. There are no 𝑥 such
that 𝑥 ∈ 𝐴 and 𝑥 ∈ 𝐶. There are 𝑥 ∈ 𝐴 and 𝑥 ∈ 𝐵. There are 𝑥 ∈ 𝐴 and 𝑥 ∉ 𝐵. There are 𝑥 ∈ 𝐵
and 𝑥 ∉ 𝐴. Finally, there are ∉ 𝐴, 𝑥 ∉ 𝐵, and 𝑥 ∉ 𝐶
10
MS 101
Discrete Mathematics Module 2
We now use the Venn diagram to illustrate set operations.
Complement:
The shaded area of the figure represents the complement of 𝐴. If an element does not
belong to set 𝐴, then it must belong to the complement of 𝐴.
Symbolically, we write 𝐴′ = {𝑥 |𝑥 ∈ 𝑈 𝑎𝑛𝑑 𝑥 ∉ 𝐴}. 𝑈
Union of Sets:
Intersection of Sets:
11
MS 101
Discrete Mathematics Module 2
Difference of Two Sets:
Example 29:
Draw a Venn diagram and shade in the set (𝐴 ∪ 𝐵)′.
𝑨
𝐴 𝑩
𝑨
𝐴 𝑩
(𝐴 ∪ 𝐵)′
12
MS 101
Discrete Mathematics Module 2
Example 30:
Draw a Venn diagram and shade in the set 𝐴 ∩ (𝐵 ∪ 𝐶).
First, we shade in set 𝐴 with horizontal lines, and then set 𝐵 ∪ 𝐶 with vertical lines.
𝑈
𝐴 𝐵
The intersection of 𝐴 and 𝐵 ∪ 𝐶 is the region where the horizontal and vertical lines intersect.
𝑈
𝐴 𝐵
𝐴 ∩ (𝐵 ∪ 𝐶)
This technique is convenient when the set in question is relatively simple. However, if the set
notation is more complex, then this method can become confusing. Let us examine the Venn
diagram for two sets. We see that when there are two sets, the diagram has four distinct regions,
which can be arbitrary numbered as follows:
𝑈
𝐴 𝐵
2 1 3
4
13
MS 101
Discrete Mathematics Module 2
Example 31:
Construct the Venn diagram and shade the set [(𝐴 ∩ 𝐵′) ∪ (𝐵 ∩ 𝐴)]′. Verify the result by the use of
a membership table.
Since there are two sets, A and B, we use the following figure:
𝑈
𝐴 𝐵
2 1 3
4
We have 𝑈 = {1, 2, 3, 4}, 𝐴 = {1, 2} and 𝐵 = {1, 3}. First, we find 𝐵′ and then intersect it with
𝐴: 𝐵′ = {2, 4} and 𝐴 ∩ 𝐵′ = {2}. Next, we find 𝐵 ∩ 𝐴: 𝐵 ∩ 𝐴 = {1}. Now we unite 𝐴 ∩ 𝐵′ and 𝐵 ∩ 𝐴:
(𝐴 ∩ 𝐵′ ) ∪ (𝐵 ∩ 𝐴) = {1, 2}.
Finally, we find the complement of it: [(𝐴 ∩ 𝐵′ ) ∪ (𝐵 ∩ 𝐴)]′ = {1, 3}. We shade in the appropriate
region, {3, 4}, below:
𝐴 𝐵
1
2 3
4
14
MS 101
Discrete Mathematics Module 2
Now we examine the Venn diagram for three sets. We see that the diagram has eight distinct
regions which can be arbitrarily numbered as follows:
𝑈
𝐴 2 𝐵
4 𝟏 6
3 5
𝐶 7
8
Example 32:
Construct the Venn diagram and shade in the set [(𝐴 ∩ 𝐵) − 𝐶 ] ∪ [(𝐵 ∩ 𝐶 ) ∪ 𝐴]. Verify the result by
the use of a membership table.
Since there are three sets involved, we use the following diagram:
𝑈
𝐴 2 𝐵
4 𝟏 6
3 5
𝐶 7
8
We have 𝑈 = {1, 2, 3, 4, 5, 6, 7, 8}, 𝐴 = {1, 2, 3, 4}, 𝐵 = {1, 2, 5, 6}, 𝐶 = {1, 3, 5, 7}. First, we
find 𝐴 ∩ 𝐵: 𝐴 ∩ 𝐵 = {1, 2}. Next, we find (𝐴 ∩ 𝐵) − 𝐶: (𝐴 ∩ 𝐵) − 𝐶 = {2}. Now, we find 𝐵 ∩ 𝐶 and unite
it with 𝐴: 𝐵 ∩ 𝐶 = {1, 5} and (𝐵 ∩ 𝐶 ) ∪ 𝐴 = {1, 2, 3, 4, 5}. Finally, we unite (𝐴 ∩ 𝐵) − 𝐶 with (𝐵 ∩ 𝐶 ) ∪
𝐴: [(𝐴 ∩ 𝐵) − 𝐶 ] ∪ [(𝐵 ∩ 𝐶 ) ∪ 𝐴] = {1, 2, 3, 4, 5}. We shade the appropriate region, {1, 2, 3, 4, 5}:
𝑈
𝐴 2 𝐵
4 𝟏 6
3 5
𝐶 7
8
15
MS 101
Discrete Mathematics Module 2
Example 33:
Determine if the following statement is true: (𝐴 ∩ 𝐵)′ = 𝐴′ ∩ 𝐵′.
We shall solve this example by the use of Venn diagrams. If the shaded region of one set
corresponds precisely with the shaded region of the other set, the two sets are equal.
𝐴
𝐴 𝐵
𝑨
𝐴 𝑩
16
MS 101
Discrete Mathematics Module 2
1.5 Counting Principle of Finite Sets
A set is said to be finite if it contains exactly 𝑚 distinct elements where 𝑚 denotes some non-
negative integer. Otherwise, a set is said to be infinite. The notation 𝑛(A) or |𝐴| will denote the
number of elements in a finite set A.
First, we begin with a special case.
Lemma 1: Suppose A and B are finite disjoint sets. Then A ∪ B is finite and
𝑛(A ∪ B) = 𝑛(A) + 𝑛(B)
There are two special cases of disjoint unions which occur frequently.
(1) Given any set A, then the universal set U is the disjoint union of A and its complement A’.
Thus, by Lemma 1,
𝑛(U) = 𝑛 (A) + 𝑛(A’)
Accordingly, bringing 𝑛 (A) to the other side, we obtain the following useful result:
For example, if there are 20 male students in a class of 35 students, then there are 35 – 20 =
15 female students.
(2) Given any sets A and B, we show that A is the disjoint union of A – B and A ∩ B.
See figure below:
𝐴
𝐴 𝐵
𝐴−𝐵 𝐴∩𝐵
17
MS 101
Discrete Mathematics Module 2
For example, suppose an archery class A contains 35 students and 15 of them are also in
blowing class B. Then
𝑛(A – B) = 𝑛(A) – 𝑛(A ∩ B) = 35 – 15 = 20.
That is, there are 20 students in the class A who are not in class B.
Inclusion-Exclusion Principle
There is also a formula for 𝑛(A ∪ B) even when they are not disjoint, called the inclusion-
exclusion principle. Namely,
Theorem 3: Suppose A and B are finite sets. Then A ∩ B and A ∪ B are finite, and
𝒏(A ∪ B) = 𝒏(A) + 𝒏(B) – 𝒏(A ∩ B)
That is, we find the number of elements in A or B (or both) by first adding 𝑛(A) and 𝑛(B)
(inclusion), and then subtracting 𝑛(A ∩ B) (exclusion) since the elements in A ∩ B were counted
twice.
We can apply this result to get a similar result for three sets.
Example 34:
Find the number of students: (a) on list or B, (b) on exactly one of the two lists, (c) on neither list.
(b) List A contains 30 names and 20 of them are on list B; hence, 35 – 20 = 15 names are only
on list B. That is,
𝑛(A − B) = 𝑛(A) – (A ∪ B) = 30 – 20 = 10
Similarly, list B contains 35 names and 20 names are on list A; hence 35 – 20 = 15 names
are only on list B. That is,
𝑛(B − A) = 𝑛(B) – (A ∪ B) = 35 – 20 = 15
Thus, there are 10 + 15 = 25 students on exactly one of the two lists.
(c) The students on neither the A list nor the list B form the set A’ ∩ B’.
𝑛(A’ ∩ B’) = 𝑛(U) – 𝑛(A ∪ B) = 110 – 45 = 65.
18
MS 101
Discrete Mathematics Module 2
Venn diagram:
𝑈
𝐴 𝐵
10 20 15
65
Example 35:
Let F, G, and R denote the sets of students studying French, German, and Russian,
respectively.
(a) Find the number of students studying at least one of the three languages, i.e.
find 𝑛(F ∪ G ∪ R).
19
MS 101
Discrete Mathematics Module 2
(b) Find in the correct number of students in each of the eight regions of the Venn diagram
of:
𝑈
𝑈
𝐹 𝐺
𝐹 12 𝐺
28 𝟖 18
𝑅 17 7
𝑅10
20
Using 8 study all three languages and 100 study at least one language, the remaining seven
regions of the required Venn diagram are obtained as follows:
(c) Find the number 𝑘 of students studying exactly: (1) exactly one language, (2) exactly two
languages.
(1) 𝑘 = 28 + 18 + 10 = 56
(2) 𝑘 = 12 + 17 + 7 = 36
___mjbcalpa____
20