You are on page 1of 18

DISCRETE MATHEMATICS

CHAPTER 1
SET THEORY

Learning outcome: to be able to

 understand basic properties and basic symbols of set


 represent sets by Venn diagram or in { } notation
 know the set operations: union, intersection, complement, set difference
 solve problems involving sets
 apply Laws of Algebra of Sets to simplify set expressions

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”.

Eg 2: Z = {x | x is an integer} = {0, 1, 2, 3, …}.

R = set of real numbers = {0, 3, 8.6, ½, - 5, …}

N = set of natural numbers = {1, 2, 3, …}

P = set of prime numbers = {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, …}

M = {x | x is an alphabet of the word “mississippi”} = {m, i, s, p}.

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.

a) 1  A b) {a, b, c}  A c) {1, {1}}  A d) {1}  A


e) b  A f) {b}  A g) {a, {a, b}}  A

Size (cardinality):
The size (or cardinality) of a (finite) set A is the number of distinct elements in A, denoted n(A) or |A|.

Eg 4: If S = {a, b, c, …, z}, then n(S) = 26 (or |S|= 26).


If A = {2, 3, a, 5, d, 6, f, 2, a}, then n(A) = 7 (or |A| = 7).
If T = {, {1}, {1, 2}, 0, 1, 2}, then n(T) = 6 (or |T| = 6).

Equality:
2 or more sets are equal if they have exactly the same elements.

Eg 5: If A = {1, 2, a, b}, B = {1, a, 2, b}, C = {b, 1, a, 2, b}, then A = B = C.

Let M = {alphabets in “onion”}, N = {alphabets in “ionizer”}, then M  N. Why?

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?

An Empty/Null set is a set that has no elements, written { } or .

Eg 7: If T = {all triangles having 4 sides}, then T = { }, so |T| = 0.

Note : Are {}, {{}} and {0} empty sets. 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.

Subset,  and Proper Subset, :


If all elements in A are also in B, then A is a subset of B, denoted A  B. Hence, A  A.
We also say “A is a proper subset of B”, denoted A  B, if “A is a subset of B but A  B”.

Eg 9: Let A = {1, 3, a, b}, B = {1, 2, 3, a, b}, C = {a, b, 1, 3}, then A  B, A  C, B  C.


Since A  B, so A  B. However, A  C because A = C. Is C  A?

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

Notes: Empty set, {} or , is a subset of all sets.


By definition of , A = B is the same as “A  B and B  A”.

Question 1. Given X = {1, 4, {a}, b, {c, d}, {}}, determine if the following is true or false.

a) {a}  X b) {b, {c, d}}  X c) {a}  X d) {1}  X


e) {{c, d}, {}}  X f) {}  X g) {{}}  X h) {1, 4}  X

Note: “Every set is a subset of itself ” BUT not a proper subset of itself, i.e., A  A and A  A.

Set Size Subsets No of subsets


A = {} 1 , {} = A 2 = 21
B = {1, 2} 2 , {1}, {2}, {1,2} = B 4 = 22
C = {1, a, 2} 3 , {1}, {a}, {2}, {1, a}, {1, 2}, {a, 2}, {1, a, 2} = C 8 = 23

Conclusion: A set with size n has 2n subsets. Why?

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

Figure 1.1 (a) and (b). Venn Diagram representations.

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.

1. List the members of the following sets in { }:


a) set of alphabets in “MATHEMATICS”
b) set of months end with “y”
c) {x | x is a negative integer greater than – 5}
d) {(x, y) | x, y  N, x + y = 3}
e) {(x, y) | x, y  Z, y = x2, –2  x  2}
f) {x | x is divisible by 2 or by 7, 12 < x  33}
g) {x | x is a prime number and x2 < 200}
3
DISCRETE MATHEMATICS

2. List the elements in these sets:


a) P = {x | x2 – 9x – 10 = 0}
b) Q = {x | x2 = 121 and x + 3 = –8}
c) S = {x | x  Z+, –10 < x3 < 300}
d) T = {x | x2 = 1 or x – 3 = 0}

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

5. Given S = {1, 2, 3, 4, 5}. List all subsets of S having


a) three elements only with exactly 2 odd numbers?
b) four elements only that include 1?

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

7. Find the number of non-empty subsets of {#, &, $, @, %}.

8. If {x + y, 6, 7, 9} = {9, 7, x – y, 8}, find xy + 2x – 8y.

9. If {3y, 4y}  {4, 5, 6, 7, 8, 9}, find 5y.

Answer: Exercise 1.1.


1. a) {M, A, T, H, E, I, C, S} b) {January, February, May, July}
c) {–4, –3, –2, –1} d) {(1, 2), (2, 1)}
e) {(–2, 4), (–1, 1), (0, 0), (1, 1), (2, 4)} f} {14, 16, 18, 20, 21, 22, 24, 26, 28, 30, 32}
g) {2, 3, 5, 7, 11, 13}

2. a) {10, –1} b) {–11}


c) {1, 2, 3, 4, 5, 6} d) {–1, 1, 3}
3. a) F b) T c) T d) T e) F f) F g) F h) T

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

1.2 SET OPERATIONS

Just like the operation of negative, addition, subtraction, multiplication and division on numbers, there
are also similar operations on sets.

1) Set Complement: A’ (or A or Ac)


The complement of a set A is the set of all elements in universal set but not in A.
We can also call A’ as “not A”.
[x  A’  x  U and x  A]
U A
A’

Figure 1.2 Set Compliment

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 = { }.

Note: If A  B, then A  B = A. ALSO, A  { } = { }.

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

Figure 1.4 Union of sets

Eg 3: A = {5, d, 6, 9}, B = {2, 5, c, 9}, C = {3, 2, 6, 8}, then


A  B = {5, d, 6, 9, 2, c} and B  C = {2, 5, c, 9, 3, 6, 8}.

Note: If A  B, then A  B = B. ALSO, A  { } = A.


5
DISCRETE MATHEMATICS

4) Set Difference: A \ B (or A – B or A  B’)


The set difference of A and B consists of all elements in A but not in B (i.e. take the elements in set
“A only”, means discard elements that are also in B).
[x  A \ B  x  A and x  B]

U B A \ B = set of U A\B=A
elements in A only
Don’t take common A B
A elements!

Figure 1.5 Set difference

Eg 4: If A = {6, 5, d, {r, s}, 9}, B = {2, 4, 5, c, d, {r}, s, 9}, C = {2, 4, 6, 7, 9} then


A\ B = {6, {r, s}}, B \ A = {2, 4, c, {r}, s}, C \ A = {2, 4, 7}, B \ C = {5, c, d, {r}, s}.
C \ B = {6, 7}. So, A \ C = { }.

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

(iii) A  (B  C)’ = A  {4, 6}’


= {1, 3, 4, 7}  {1, 2, 3, 5, 7, 8}
= {1, 2, 3, 4, 5, 7, 8} | A  (B  C)’| = 7

(iv) (A’ \ C)  C’ = ({2, 5, 6, 8} \ {3, 4, 5, 6})  C’


= {2, 8}  {1, 2, 7, 8}
= {2, 8} |(A’ \ C)  C’ | = 2

(v) (A  C) \ B’ = {1, 3, 4, 5, 6, 7} \ {1, 2, 3, 5, 7} = {4, 6}.


|(A  C) \ B’| = 2

Eg 6: Let A, B and C be distinct sets. Sketch in a single Venn diagram if A  B, A  C, B  C  .

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’.

(a) & (b) (c)


U B U B
A A

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?

3. Given U = {1, 2, 3, …, 10}. If X = {x | 1 ≤ x ≤ 10, x is an odd integer}, Y = {1, 3, 4, 6, 8} and


Z = X  Y. Find
a) Z’ b) X  Y’

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

5. Given a universal set, U = {x : x  Z, –5 ≤ x ≤ 4}, P = {x : x is an odd integer}, and Q = {x : x  Z,


–2 < x ≤ 3}.
a) Draw a Venn diagram to represent the above sets.
b) List the elements of (P  Q) \ (P  Q).
c) List the elements of (P \ Q)’  (Q  P)’.

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

Answer: Exercise 1.2.


1) a) {a, b, {c}, 2, 1, g} b) {a, {c}} c) {1, b} d) {1, 2, b}
e) {1} f) {1, 2, b, g} g) {1, b, 8, g} h) {a, {c}, 2}
i) {1, 2, b, 8, g} j) {2}

2) A  B = {9, {d}, {}}; 8 subsets

3) a) {2, 10} b) {5, 7, 9}

4) a) b)
U U
A C A B

B C

5) b) {–5, –3, 0, 2} c) {–4, –2, 4}

6) a) (B  C) \ A b) [A \ (B  C)]  [(B  C) \ A]

1.3 APPLICATION OF SET THEORY

Theorem 1. If A and B are finite sets, then |A  B| = |A| + |B| – |A  B|.

Let
U W X = set of elements in A only = A \ B
Y = set of elements in B only = B \ A
X Y Z=AB
Z
W = set of elements not in A and not in B
A B
= (A  B)’
= U \ (A  B)
Figure 1.6 Theorem 1

Hence, |A  B| = |U| – |W|.

9
DISCRETE MATHEMATICS

Theorem 2. Let A, B, C be finite sets, then


|A  B  C| = |A| + |B| + |C| – |A  B| – |A  C| – |B  C| + |A  B  C|.

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 |AB|= 5, find |AB|.

Solution: |AB| = |A| + |B| – |AB|


= 8 + 11 – 5
= 14

Eg 2: Let A, B and C be finite sets with |A| = 6, |B| = 8, |C| = 6, |A  B| = 3, |A  C| = 2, |B  C| = 5, |


A  B  C| = 11, find |A  B  C|.

Solution: (Method 1.)


|A  B  C| = |A| + |B| + |C| – |A  B| – |A  C| – |B  C| + |A  B  C|
11 = 6 + 8 + 6 – 3 – 2 – 5 + |A  B  C|
So, |A  B  C| = 1.

(Method 2.) By Venn diagram, we let |A  B  C| = x, then we have to


U A first fill up the region of A  B  C by x.
1+x
Next, we fill up the regions of
3–x 2–x (A  B) only by 3 – x; (A  C) only by 2 – x; and
x (B  C) only by 5 – x. (Why?)
x
5–x x–1 Finally, we fill up the regions of
A only by 6 – (3 – x + 2 – x + x) = 1 + x;
B C B only by 8 – (3 – x + 5 – x + x) = x; and
C only by 6 – (2 – x + 5 – x + x) = x – 1. (Why?)

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.

Solution: Given |U| = 100 |A| = 30


|B| = 45 |C| = 60
|A  B| = 10 |B  C| = 20
|A  C| = 15 |A  B  C| = 5

(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.

U A Now, we calculate x = 100 – (10 + 20 + 30 + 5 + 10 + 15 + 5)


10 = 5.
B 5 10 C Hence, |read exactly two books| = 5 + 10 + 15 = 30.
5

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:

260 customers bought Dunmax and Lactarzan;


340 customers bought Dunmax and Nestplay;
320 customers bought Lactarzan and Nestplay;
220 customers bought Dunmax only;
240 customers bought Lactarzan only;
480 customers did not buy any powdered milk.

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?

Solutions: We are given:

|U| =2100 |D  L| = 260 |D  N| = 340 |L  N| = 320


|D only| = |D \ (L  N)| = 220 |L only| = |L \ (D  N)| = 240
|not buying any powdered milk| = |(D  L  N)’| = 480

a) Let x = |D  L  N| = number of people buying all the three types of powdered milk.
Hence, |N only| = 4x.

Using Method 2 in Example 3, we fill up the Venn diagram as follows:


U D 480 U D 480
So, we have: 220
220

260 - x 340 - x 140 120 220

240 320 - x 4x L 240 200 480 N


L N

Hence, 220 + 240 + 4x + 260 – x + 340 – x + 320 – x + x + 480 = 2100. So, x = 120.

b) (i) |Nestplay only| = 4x = 480.


(ii) Highest sales = Nestplay  1020.
(iii) |At least 2 types| = number of customers buying 2 types of powdered milk +
number of customers buying 3 types of powdered milk
= 140 + 220 + 200 + 120
= 680.
(iv) |D or L but not N| = 220 + 140 + 240 = 600

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:

90 people checked bus 95 people checked train


100 people checked car 35 people checked bus & train
25 people checked bus & car 50 people checked train & car
5 people checked all three methods.

a) How many respondents completed their surveys?


b) How many people checked bus only or car only?
c) How many people checked at least two methods?
d) How many people checked car and train but not bus?

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.

a) Show the above information in a single Venn diagram.


b) How many students attended the course C only?
c) How many students attended at least 2 courses?
d) How many students attended the course A and course P only?
e) How many students did not attend any of the above 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

a) Draw a Venn diagram that describes the above information.


b) How many students do not speak any of the three languages?
c) How many students speak Mandarin but not Tamil?
d) How many students speak Tamil only?
e) How many students speak at least two 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:

286 own a printer (P) 153 own a modem (M)


108 own a scanner (S) 75 own a printer and a modem
56 own a printer and a scanner 34 own a modem and a scanner
5 own a printer, a modem and a scanner.
13
DISCRETE MATHEMATICS

a) Show the above information in a single Venn diagram.


b) How many students own a computer with a printer only?
c) How many students own a computer with a printer and a modem only?
d) How many students own a computer without any of the above items?

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.

a) Show the above information in a single Venn diagram.


b) Find the number of homes which have all three appliances.
c) How many homes have air-conditioners only?
d) How many homes have air-conditioners but not washing machines?

6. The following information was obtained from 277 customers that came to a book store in 2008.

98 bought newspapers (N) 48 bought magazines (M) only


64 bought books (B) only 44 bought books and magazines
30 bought books and newspapers 40 didn’t buy anything

The number of customers who bought magazines and newspapers only was twice the number of
customers who bought all the three items.

a) Show the above information in a single Venn diagram.


b) How many customers bought all three items?
c) How many customers bought only one item?
d) How many customers bought books and magazines but not newspapers?

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:

135 prefer K only 180 prefer K and L


90 prefer L only 200 prefer L and M
135 prefer M only 220 prefer K and M
50 do not prefer all the three sauces

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

Answer: Exercise 1.3.


1) a) 180 b) 65 c) 100 d) 45
2) b) 108 c) 61 d) 18 e) 12
3) b) 37 c) 70 d) 19 e) 93
4) b) 160 c) 70 d) 113
5) b) 10 c) 20 d) 28
6) b) 17 c) 146 d) 27
7) a) 750 b) 105 c) Maggi d) 75
8) (b) 120, 100

1.4. LAWS OF SET THEORY

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   = 

7) Double negation Law: (A’)’ = A

8) Inverse Laws: a) A  A’ = U b) A  A’ = 
c) U’ =  d) ’ = U

9) DeMorgan’s Laws: a) (A  B)’ = A’  B’ b) (A  B)’ = A’  B’

10) Absorption Laws: a) A È (A Ç B) = A b) A Ç (A È B) = A

Example 1: Verify the followings:


a) A  (A’  B) = A  B b) A  (A  B) = A

15
DISCRETE MATHEMATICS

Solutions:
a) LHS = A  (A’  B)
= (A  A’)  (A  B) - distributive law
= U  (A  B) - inverse law
=AB - identity law
= RHS

b) LHS = A  (A  B)
= (A  U)  (A  B) - identity law
= A  (U  B) - distributive law
=AU - domination law
=A - identity law
= RHS

Example 2: Simplify the followings:


a) (A  U)  (  A’) b) (B’  A)  (B  A)
c) (A  B)’  (A’  B) d) (A  (A’  B))’
e) (A  B)’ \ (A’ B)

Solutions:
a) (A  U)  (  A’) b) (A  B’)  (A  B)
= A  A’ - identity law = A  (B’  B) - distributive law
= - inverse law =AU - 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

Example 3: Show that [(A  B)  A]  [B’  (A’  B)] = U.

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.

2. Prove that ( (A\B)’  B)’ = A  B’ by using 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

4. By using Laws of Set Theory, verify the following set equivalences.


a) A  (A’  C’) = (C \ A)’ b) A \ (A’  B) = A c) (P’  Q)’  P = P \ Q
d) P’  (P’ \ Q)’ = U e) (A  B’)’  A = A  B

5. Simplify the following set expressions by using Laws of Set Theory.


a) A’ \ (A  C’) b) A’  (A’  B)’
c) (A  B)’  B d) [(P  Q)  Q]  [(P  Q)’  Q’]

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) __________________

Answer: Exercise 1.4.


1) Q: Set difference, DeMorgan’s law, Double Negation law, Distributive law, Inverse law, Identity law.
2) DeMorgan’s law, Double Negation law, Set difference, Associative law, Idempotent law.
3) a) A  ((A  B)  C) = (A  (A  B))  (A  C) = A  (A  C) = A
17
DISCRETE MATHEMATICS

(Distributive) (Absorption) (Absorption)


Or a) A  ((A  B)  C) = A  (A  (B  C)) = A -- use associative and absorption
c) Distributive law, Inverse law, Identity law, DeMorgan’s law, Double Negation law, Associative,
Inverse law, Domination law.
4) a) Distributive law, Inverse law, Identity law, commutative law, DeMorgan’s law, Set difference.
c) DeMorgan’s law, Double Negation law, Associative, Commutative, Associative, Idempotent.
5) a) Set difference, DeMorgan’s law, Double negation law, Absorption law.
c) DeMorgan’s law, Associative, Inverse, Identity.

18

You might also like