Chapter 1 Set Theory WB
Chapter 1 Set Theory WB
Chapter 1 Set Theory WB
CHAPTER 1
SET THEORY
1.1 SET
In our daily life, things or objects are always arranged according to their common properties. A set is a
collection of well-defined objects. Each object in the set is called an element or a member of the set. We
usually use capital letters like A, B, C, …to denote sets, and use small letters or numbers like a, b, c, …,
1, 2, 3, … to denote elements in a set. Sets can be described in 2 common ways:
1. List all elements within braces, { }. The order of listing is not important and repeated elements can
be ignored.
Eg 1: (a) In set A = {1, 3, 5, 7, 9}, the elements are: 1, 3, 5, 7, and 9. They are odd from 1 to 9.
(b) In set B = {March, May}, the elements are: March and May. The first alphabet is M.
(c) In set C = {a, 2, {2, 3}, Q}, the elements are: a, 2, {2, 3} and Q. Unknown property.
2. Use set builder notation to specify a common property for the elements with the format:
A = {x | x has property P}, read as “A is the set of x such that x has property P”.
P = set of prime numbers = {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, …}
Y = {y | y2 < 49 and y is an integer} = {0, ±1, ±2, ±3, ±4, ±5, ±6}.
1
DISCRETE MATHEMATICS
Given a set A, x A means x is a member (or an element ) of A, and y A means y is not a member
(or not an element ) of A
Eg 3: Given A = {b, 1, 3, a, {1}, {a, b}}, determine if each of the followings is True or False.
Size (cardinality):
The size (or cardinality) of a (finite) set A is the number of distinct elements in A, denoted n(A) or |A|.
Equality:
2 or more sets are equal if they have exactly the same elements.
Two sets are mutually disjoint if they do not have common elements.
Eg 6: In Eg 4, the sets S and T are mutually disjoint. The sets A and T are not. Why?
Universal set, U or :
The set consisting of all the objects under study.
Eg 8: In a study about the reading habits of UiTM students, the universal set consists of all existing
UiTM students across the country.
Eg 10: If M = {a, b, c, {a, b}, {c, d}}, determine if each of the followings is True or False.
a) {a, b, c} M b) {{a, b}, c} M c) {a, b} M d) {c, d} M
e) {a, c, d} M f) {a, b, c, {a, b}, {c, d}} M
2
DISCRETE MATHEMATICS
Question 1. Given X = {1, 4, {a}, b, {c, d}, {}}, determine if the following is true or false.
Note: “Every set is a subset of itself ” BUT not a proper subset of itself, i.e., A A and A A.
Venn diagram:
A pictorial representation of sets. Universal set is represented by rectangle, other sets by circles lying
within the rectangle and elements by (distinct) points. An integer in a particular region is the number of
elements in that region.
Eg 11: (a) Represent sets U = {a, b, c, d, 3, 8}, A = {a, c, d, 3} and B = {b, c, d} using Venn diagram.
(b) Use Venn diagram, represents sets such that |U| = 12, |A| = 5, |B| = 10.
(a) (b)
UB U B
a c b
3 d 2 3 7
A
A 8
Note: In (a), every point in the Venn diagram is a member of the respective sets representing the
alphabet or number next to it.
In (b), each integer in the sets represents the number of members in the respective regions.
Exercise 1.1.
3. Let E = {, 0, 1, 2, 3, {4, 5, 6}}. State whether each of the following statements is True or False.
a) {0, 1} E b) E c) {2, 3} E d) 3 E e) 0 E
f) {4, 5, 6} E g) {2, 3, 4} E h) {1, 2} E
4. Given A = {{}, a, b, d, h, m}, determine whether the following statements are True or False.
a) { } A b) {h, a} A c) {a, h, b, m, d} A
6
d) |A| = |{1, e, f, 3}| + |{m, a}| e) Number of subsets of A = 2
6. Let A = {1, 2, 3, 4, 5, 6, 7, 8, 9}, B = {2, 4, 6, 8}, C = {1, 3, 5, 7, 9}, D = {3, 4, 5} and E = {3, 5}.
Which sets can equal X if we are given the following information?
a) X and B are disjoint (no common elements) b) X D and X C
c) X A and X C d) X C and X A
4) a) F b) F c) F d) T e) T
5) a) {1, 2, 3}, {1, 3, 4}, {1, 2, 5}, {1, 4, 5}, {2, 3, 5}, {3, 4, 5}
b) {1, 2, 3, 4}, {1, 2, 3, 5}, {1, 2, 4, 5}, {1, 3, 4, 5}
6) a) C, E b) D c) A, B, D d) no solution
7) 31 8) 13 9) 10
4
DISCRETE MATHEMATICS
Just like the operation of negative, addition, subtraction, multiplication and division on numbers, there
are also similar operations on sets.
Eg 1: U = {a, 3, {5}, {1, 3}, c, d, f}, A = {3, {1, 3}, c, d} and B = {a, c, d, f}, then
A’ = {a, {5}, f} and B’ = {3, {5}, {1, 3}}.
2) Intersection: A B
The intersection of set A and a set B consists of all elements in both A and B.
[x A B x A and x B set of common elements]
A B {} U A B = {}
U B
Here, A and B are
A B mutually disjoint!
A
Figure 1.3 Intersection of sets
Eg2: A = {5, d, {r, s}, 6, 9}, B = {2, 4, 5, c, d, {r}, s, 9}, C = {a, r, {s}}, then
A B = {5, d, 9} and A C = B C = { }.
3) Union: A B
The union of set A and a set B consists of all elements in A or B (or both).
[x A B x A or x B (or both)]
U B U
A B
A
U B A \ B = set of U A\B=A
elements in A only
Don’t take common A B
A elements!
Eg 5: Let U = {1, 2, 3, 4, 5, 6, 7, 8}, A = {1, 3, 4, 7}, B = {4, 6, 8}, C = {3, 4, 5, 6}. Find the following
sets. Hence, give their size.
(i) A’ B’ (ii) (A \ B)’ (iii) A (B C)’ (iv) (A’ \ C) C’
(v) (A C) \ B’
Solutions:
(i) A’ B’ = {2, 5, 6, 8} {1, 2, 3, 5, 7} (ii) (A \ B)’ = {1, 3, 7}’
= {2, 5} = {2, 4, 5, 6, 8}
| A’ B’ | = 2 |(A \ B)’| = 5
Solution:
U B
A C
6
DISCRETE MATHEMATICS
Eg 7: Shade the region that represents (a) A (B \ C’), (b) A \ (B’ C’) and (c) (C A)’
B’.
C C
Eg 8: Give a set expression that represents the shaded region in the following Venn diagrams.
a) U B
b) U B
c)
U B
A A A
C C C
(A B) \ C (C A) (C B’) (A \ B) C
Eg 9. In the given Venn diagrams, if the number in each region represents the number of elements in that
region, find i) n[(A C) B’], and ii) n[(A B) C’] for each given Venn diagram.
a) b)
U B U A
A 3 B
2 2 3 1 2
1 2
6 6 7
1 1 C
3 8 C
(i) 15 (ii) 2 (i) 3 (ii) 3
7
DISCRETE MATHEMATICS
Exercise 1.2.
1. Let the universal set U = {1, 2, a, b, {c}, 8, g}, A = {a, b, {c}, 2}, B = {a, {c}, 8, g} and
C = {1, b, g}. Find:
a) A C b) B A c) C \ B d) B’ e) A’ \ B
f) B’ C g) (A \ C)’ h) C’ A i) (A \ B’)’ j) (A \ B) \ C
2. Find sets A and B such that A B = {1, 3, 7, a, {d}, {f, 4}, 9, z, 0, {}}, A \ B = {3, {f, 4}, 1, 0}
and B \ A = {z, 9, 7}. What is the number of subsets of A B?
4. For each of the following cases, draw a Venn diagram for three non-empty sets A, B and C so that A,
B and C will have the following properties:
a) A B, C B, A C = b) A B, C B, A C, A C
c) A C, A C, B C = d) B C, A (B C), A B
6. Give a set expression that represents the shaded region in the following Venn diagrams.
a) b)
U B U B
A A
C C
7. For the given Venn diagram, shade the region of the given set expression.
a) b)
U B U B
A A
C
C
(A B) \ C’ (A’ B) \ C
8
DISCRETE MATHEMATICS
4) a) b)
U U
A C A B
B C
6) a) (B C) \ A b) [A \ (B C)] [(B C) \ A]
Let
U W X = set of elements in A only = A \ B
Y = set of elements in B only = B \ A
X Y Z=AB
Z
W = set of elements not in A and not in B
A B
= (A B)’
= U \ (A B)
Figure 1.6 Theorem 1
9
DISCRETE MATHEMATICS
U A W = A only = A \ (B C)
W X = B only = B \ (A C)
Y = C only = C \ (A B)
R S Z = A and B and C = A B C
Z
T Y R = (A and B) only = A and B but not C
X
= (A B) \ C
S = (A and C) only = A and C but not B
B C = (A C) \ B
T = (B and C) only = B and C but not A
= (B C) \ A
Figure 1.7 Theorem 2
Eg 1: Let A and B be finite sets with |A|= 8, |B|= 11 and |AB|= 5, find |AB|.
So, |A B C| = (1 + x) + x + (x – 1) + (3 – x) + (2 – x) + (5 – x) + x.
Hence, 11 = 10 + x x = 1.
10
DISCRETE MATHEMATICS
Eg 3: Suppose that 100 people are surveyed and it is found that 30 read book A, 45 read book B and 60
read book C. It is also found that 10 read both books A and B, 20 read both B and C, 15 read both
A and C and 5 read all three. Determine how many of the people surveyed read none of these
books and how many read exactly two of them.
(Method 1.)
Let |read none| = x. Observe that |U| – x = |A B C| = 30 + 45 + 60 – 10 – 20 – 15 + 5 = 95.
Hence, 100 – x = 95 and so x = 5.
Now, |read exactly 2 books| = |A B| + |A C| + |B C| – 3|A B C| = 10 + 15 + 20 – 3(5) = 30.
(Why?)
(Method 2)
Using Venn Diagram, we have to first fill up the region of A B C by 5.
Next, we fill up the regions of (A B) only by 10 – 5 = 5; (A C) only by 15 – 5 = 10; and (B C)
only by 20 – 5 = 15.
Finally, we fill up the regions of A only by 30 – (5 + 10 + 5) = 10; B only by 45 – (5 + 15 + 5) = 20; and
C only by 60 – (10 + 15 + 5) = 30.
20 15 30
x
Example 4: 2100 customers came to Kidmart retail shop in June 2011. A record on the purchase of
powdered milk from her customers was given as follows:
The number of customers buying Nestplay only is four times the number of customers buying all the
three types of powdered milk.
11
DISCRETE MATHEMATICS
a) Represent the above information in a single Venn diagram. Hence, obtain the number of people
buying all the three types of powdered milk.
b) (i) Find the number of people buying Nestplay only.
(ii) Which type of powdered milk has the highest sales?
(iii) How many customers buy at least 2 types of powdered milk?
(iv) How many customers buy Dunmax or Lactarzan but not Nestplay?
a) Let x = |D L N| = number of people buying all the three types of powdered milk.
Hence, |N only| = 4x.
Hence, 220 + 240 + 4x + 260 – x + 340 – x + 320 – x + x + 480 = 2100. So, x = 120.
12
DISCRETE MATHEMATICS
Exercise 1.3.
1. A survey on methods of going for holidays is carried out. Each respondent is asked to choose their
prefer method of travelling: bus, car, train. More than one choice is permitted. Assume that all
respondents gave at least a choice. The results were as follows:
2. In a survey involving 328 business major students, the following information was obtained:
151 attended the Cooking course (C) 188 attended the Analytic course (A)
68 attended the Psychology course (P) 38 attended course C and course A
35 attended course C and course P 48 attended course A and course P
30 attended all the 3 courses.
3. In a survey involving 283 language school students, the following information is obtained:
130 students speak Mandarin (M) 145 students speak Arabic (A)
100 students speak Tamil (T) 60 students speak Mandarin & Tamil
48 students speak Mandarin & Arabic 57 students speak Arabic & Tamil
36 students speak all the three languages
4. There are 500 computer science students at a university. Each one of them owns a personal
computer. The following information was obtained from the students:
5. A marketing research company conducted a survey on 100 households. They found that 60 homes
have washing machines, 53 have air-conditioners and 27 have microwave ovens. They also found
that 15 homes have washing machines and air-conditioners only, 8 have air-conditioners and
microwave ovens only, 7 have washing machines and microwave ovens only. Two homes have only
microwave ovens.
6. The following information was obtained from 277 customers that came to a book store in 2008.
The number of customers who bought magazines and newspapers only was twice the number of
customers who bought all the three items.
7) A survey of 800 customers who shopped at a hypermarket during a weekend was conducted. The
customers were asked about their preference for chili sauces, either Kimball (K), Life (L) or Maggi
(M). The results were as follows:
a) Find the number of customers who prefer at least one of the three sauces.
b) How many customers prefer all the three tomato sauces?
c) Which is the most preferable sauce among the customers?
d) How many customers prefer Kimball and Life but not Maggi?
8) Suppose U = A B C. Given |A| = 50, |B| = 60, |C| = 65, |A B| = 20, |A C| = 25, |B C| =
30. (a) Find maximum value and minimum value of |A B C|. (b) For each case, find the number
of elements in at least 1 set.
14
DISCRETE MATHEMATICS
We use laws of set theory to simplify expressions on sets or to show that set expressions are equal.
1) Idempotent Laws: a) A A = A b) A A = A
2) Commutative Laws: a) A B = B A b) A B = B A
3) Associative Laws: a) (A B) C = A (B C)
b) (A B) C = A (B C)
4) Distributive laws: a) A (B C) = (A B) (A C) or
(B C) A = (B A) (C A)
b) A (B C) = (A B) (A C) or
(B C) A = (B A) (C A)
5) Identity Laws: a) A = A b) A U = A
6) Domination Laws: a) A U = U b) A =
8) Inverse Laws: a) A A’ = U b) A A’ =
c) U’ = d) ’ = U
15
DISCRETE MATHEMATICS
Solutions:
a) LHS = A (A’ B)
= (A A’) (A B) - distributive law
= U (A B) - inverse law
=AB - identity law
= RHS
b) LHS = A (A B)
= (A U) (A B) - identity law
= A (U B) - distributive law
=AU - domination law
=A - identity law
= RHS
Solutions:
a) (A U) ( A’) b) (A B’) (A B)
= A A’ - identity law = A (B’ B) - distributive law
= - inverse law =AU - inverse law
=A - identity law
c) (A B)’ (A’ B)
= (A’ B’) (A’ B) - DeMorgan’s law
= A’ (B’ B) - distributive law
= A’ - inverse law
= A’ - identity law
d) (A (A’ B))’
= A’ (A’ B)’ - DeMorgan’s law
= A’ (A’’ B’) - DeMorgan’s
= A’ (A B’) - double negation laws
= (A’ A) (A’ B’) - distributive law
= (A’ B’) - inverse law
= (A’ B’) - identity
e) (A B)’ \ (A’ B)
= (A B)’ (A’ B)’ - by definition of set difference
= (A’ B’) (A’’ B’) - DeMorgan’s
= (A’ B’) (A B’) - double negation laws
= (A’ A) B’ - distributive law
= B’ - inverse law
= B’ - identity law
16
DISCRETE MATHEMATICS
Solution:
LHS = [(A B) A] [B’ (A’ B)]
= A [B’ (A’ B)] - absorption law
= A [(B’ A’) (B’ B)] - distributive law
= A [(B’ A’) U] - inverse law
= A (B’ A’) - identity law
= A (A’ B’) - commutative law
= (A A’) B’ - associative law
= U B’ - inverse law
=U - domination law
Exercise 1.4.
In each step, state the law you use.
1. Simplify (P’ \ Q)’ (P’ Q) by using the laws of set theory.
3. Using the laws of the algebra of sets, prove each of the following.
a) A ((A B) C) = A b) A \ (A \ B) = A B
c) (B’ (A’ B))’ A’ = U
6. Complete the steps in simplifying the given set expression by using laws of set theory.
(A C) [(B A) [B ((C E) (C E’))]] Name of Law
= (A C) [(B A) [B (C (E E’))]] __________________
= (A C) [(B A) [B (C ____)]] __________________
= (A C) [(B A) (B _____)] __________________
= (A C) (_____________) __________________
= (A C) __________________
18