Set Theory-1

Download as pdf or txt
Download as pdf or txt
You are on page 1of 24

DISCRETE MATHEMATICS

Mr Vincent Mwai

November 12, 2020


1

Definition: A set is an (unordered) collection of objects that are precisely


defined. By precisely defined we mean that no two objects of a set are indistin-
guishable and given any object it is possible to tell whether or not it belongs to
a given set. The objects of a set are called members or elements. A set is said
to contain its elements, an element is said to belong to a set.
Set Notation:
Normally we use upper case letters to denote sets and lowercase letters to denote
elements. The notation x ∈ A means x is an element of the set A, and is read
“x is an element of A” or “x is a member of A”. The notation x ∈ / A means that
x is not an element of the set A.
Describing a set:
There are two ways to describe a set:
(a) Listing (Roster) Method
This is usually used for finite sets (Sets whose elements are finite). In this case
we list all the elements of the set between curly brackets, separated by commas.
For example, if the elements of the set A are a, b, c,and d, this is denoted by
A = {a, b, c, d}.
The method is also used to describe a set without listing all its elements. In this
case, if the general pattern of the elements is clear, we lists a few elements of
the set and then three dots / ellipses (...) read “and so forth”. For example, the
set of the first 100 positive integers can be denoted by {1, 2, 3, ..., 100} while
the set of all positive integers can be represented by:
A = {1,2, 3, ...}.
The method also works in the works in the case where the set extends indefinitely
on either end. For instance, suppose B is the set of all whole numbers. Then,
this can be represented as
B={..., -3, -2, -1, 0, 1, 2, 3, ...}
or
B={0, ±1,±2,±3, ...}
(b) Set-Builder Notation
In this method we use the notation {x | p(x)} read as “the set of all elements x
such that p(x)” where p(x) is a property / condition that x must satisfy for it
to be a member of the given set. The method may be used in the case where it
is not possibble to list all the elements of a given set.
Example
(1) Let A={1, 3, 5, 7, 9}. This can be written as
A={x | x is an odd positive integer less than 10}
Or
A={x ∈ Z+ |x is odd and x < 10}
(2) |The set B={1, 2, 3, 4, ...} can also be described as
B={x|x is apositive integer}
(3) Suppose C={3, 5, 7, 11, 13, 17, 19}. Then
C={x|3 ≤ x ≤ 19,x is prime}
(4) We also have the following notations
N = {1, 2, 3, ...}, the set of all natural numbers.
Z = {..., −3, −2, −1, 0, 1, 2, 3, ...}, The set of integers (whole numbers).
2

Z+ = {1, 2, 3, ...}, The set of positive integers


Q = { ab |a, b, ∈ Z, b 6= 0}, the set of rational numbers.
R = the set of real numbers.
R+ = the set of positive real numbers. √
C = a + bi where a, b ∈ R and i = −1, the set of complex numbers.
Cardinality of a Set
The cardinality of a set, sometimes called order of a set, is the number of
elements in the set.
If A is a set, then the cardinality of A is denoted by |A| or n(A).
A set is said to be finite if its cardinality is finite and is said to be infinite
otherwise.
A set of order one is called a singleton set.
Example
1. If A={a,e,i,o,u} then |A|=5
2. B={2}, |B| =1 . So , B is a singleton set.
3. The sets in examples (1) and (2) above are finite while Z = {..., −3, −2, −1, 0, 1, 2, 3, ...}
is infinite.
Empty Set
The empty set , also called the null set, is a set that has no elements. It is
denoted by ∅ or {}. So, by definition |∅| = 0.
Example:
1. Let A={x ∈ R|x2 + 1 = 0}. In this case not exists x ∈ R such that x2 + 1 = 0.
So, A = ∅
2. Similarly, if B={x ∈ R|x = x + 1}, then B = ∅
3. Suppose C={x|x is prime and x is a multiple of 4}
Set of primes = {2,3,5,7,11,13,17,...}
Multiples of 4={..., -16,-12,-8,-4,0,4,8,12,16,...}
Clearly, no prime is a multiple of 4 and vice versa.
So, C is null i.e. C=∅ or C={}
NB
The empty set ∅ should not be confused with the set {∅}, which is singleton set.
Subsets
Let A and B be sets. We say that A is a subset of B if and only if every element
of A is also an element of B i.e. ∀x ∈ A, x ∈ B. This is denoted by A ⊆ B and
read as “A is a subset of B” or “A is contained in B”. From the bigger set point
of view, B ⊇ A, read as “B is a superset of A” or “B contains A”.
Now, if there is at least one element x of A that does not belong to B, then we
say that A is not a subset of B and write A * B or B + A . So, such an x is
a counterexample to the claim that x ∈ A implies x ∈ B. If A is a subset of B
and A 6= B, i.e. ∃x ∈ B but x ∈ / A, then we write A ⊂ B and say that A is a
proper subset of B.
Example
1. Let A = {k, 3, 5, x, a, t} and B = {a, k, t, 3, y, x, 5, 10}.
3

Then A ⊂ B or B ⊃ A since every element in A is also an element of B.


2. Let A = {1, 3, 5, 8, 9}, B = {1, 2, 3, 5, 7} and C = {1, 5}.
Then C ⊂ A and C ⊂ B. However, B * A since 2 ∈ B but 2 ∈ / A. Similarly,
A * B since 8 ∈ A but 8 ∈ /B.
3. Let A = {a, e, i, o, u} and let B be the set of all letters of the English
alphabet. Then A ⊂ B.
Remarks
1. For every set A, ∅ ⊆ A. In this case ∅ is called the trivial subset.
2. For every set A, A ⊂ A. In this case A is called the improper subset.
3. A non-trivial proper subset A is any subset of A different from ∅ and A
itself.
4. For all sets A, B and C, if A ⊆ B and B ⊆ C , then A ⊆ C.
Equal Sets
Two sets A and B are equal if and only if they have the same elements, i.e.
∀x ∈ A, x ∈ B and ∀y ∈ B, y ∈ A. In other words , A and B are equal if and
only if A ⊂ B and B ⊂ A. In this case we write A = B.
Example
There is only one empty set. If A and B are both empty, then A=B since they
have exactly the same elements, namely : none.
NB: In a set, the order in which the elements appear is irrelevant. A set remains
the same even if its elements are repeated or interchanged. For instance, the set
{1, 2, 3} and {3, 1, 2} are equal since they have the same elements. Similarly,
{1, 3, 5} and {1, 1, 3, 3, 3, 5} are equal.
Equivalent Sets.
Two sets A and B are said to be equivalent if there exists a one-to-one corre-
spondence between them, i.e. ∀x ∈ A there exists a unique y ∈ B, ∀k ∈ B and
∃! l ∈ A.
NB:
1. Equal sets are equivalent but equivalent sets are not necessarily equal.
2. If A and B are equivalent, then |A| = |B|.
Power set
Let A be a set. The power set of A, denoted by P (A), is the set of all subsets
of A.
NB: If |A|=n, then |P (A)| = 2n
Example:
1. Let A={1, 2}. Then P (A)={∅, {1}, {2}, A}
2. Let B={a, b, c}. Then P (A) = {∅, {a}, {b}, {c}, {a, b}, {a, c}, {b, c}, B}.
3. P (A) = {∅} while P ({∅}) = {∅, {∅}}
4

Universal Set:
All sets under investigation in any application of set theory are assumed to be
contained in some larger fixed set called the universal set denoted by ⊔. The
elements of the universal set comprise of all elements in the sets of discussion
and possibly extra elements i.e. the universal set is a set such that all the sets
of discussion are its subsets.
Example:
1. Suppose that the sets of discussion are:
A = {a, b, c, d, e}
B = {a, e, i, o, u}
C = {g, k, p, t, s, a, m}
A convenient universal set ⊔ in this case would be the set of the letters of english
alphabet.
2. Suppose the sets of discussion are
A = set of all saloon cars
B = set of all buses
C = set of all lorries
D = set of all tractors
A convenient universal set ⊔ in this case would be the set of all motor vehicles.
Venn Diagrams:
Sets can be represented pictorially using venn diagrams. In venn diagrams the
universal set ⊔ is represented by a rectangle. Inside this rectangle, circles are
used to represent the subsets under consideration. Sometimes points are used
to represent particular elements of a set. For example the set V = {a,e,i,o,u} is
represented as:

Set Operations
We now define ways of constructing new sets from existing ones.
Set union
Let A and B be sets. The union of A and B, denoted by A ∪ B and read as “A
union B”, is the set of all elements that are either in A or in B, or in both, i.e.
A ∪ B = {x|x ∈ A or x ∈ B}
In this case “or” is used to sense of “and / or”
5

Example:
1. Let A={1, 2, 3} and B={1, 3, 5, 7, 8}. Then A ∪ B={1,2,3,5,7,8}
2. Let A={a,b,6,p,4} and B={1,k,t,2,-1,b}. Then A ∪ B ={a,b,6,p,4,1,k,t,2,-1}
Remark:
For any sets A, B, and C
(a) A ∪ ∅ = A (Identity law)
(b) If A ⊂ B, then A ∪ B = B
(c) (A ∪ B) ∪ C = A ∪ (B ∪ C) (Associative law)
(d) A ∪ B = B ∪ A (Commutative law)
(e) A ∪ A = A (Idempotent law)
(f) A ⊆ A∪B, B ⊆ A∪B,
The union of a finite
S collection A1 , A2 ,..., An , of sets is denoted by:
A1 ∪ A2 ... ∪ An = ni=1 Ai S∞
If the collection A1 ,A2 , A3 ,... is infinite then A1 ∪ A2 ∪ ... = i=1 Ai

Set Intersection:
Let A and B be sets. The intersection of A and B denoted by A ∩ B and read
as “A intersection B” is the set of all element that belong to both A and B, i.e.
x ∈ A ∩ B if and only if x ∈ A and x ∈ B. In other words,
A ∩ B={x|x ∈ A and x ∈ B}.
Definition: Two sets A and B are called disjoint if and only if they have no
element in common.
So, if A and B are disjoint, then A ∩ B = ∅.
6

Two disjoint sets A and B are represented in a venn diagram as two non-
intersective circles.
Disjoint sets

Set Intersection

Example
1. Let A={1, 2, 3} and B={1, 3, 5}. Then A ∩ B={1, 3}. So, A and B are not
disjoint.
2. Let A={1, 2, 3} and B={a, b, c, d}. Then A ∩ B=∅. Hence, A and B are
disjoint.
3. Let A={a, b, 1, 3, c, d} and B={1, 2, c, k, f}. Then A ∩ B = {1,c}.
4. Let
A = set of all JKUAT students.
B = set of all female students taking discrete mathematics
C = set of all male students taking discrete mathematics
Then,
A ∩ B = Set of all JKUAT female students taking discrete mathematics
A ∩ C = Set of all JKUAT male students taking discrete mathematics
B∩C =∅
Remarks:
For any sets A, B and C
(a) A ∩ ∅ = ∅ (Unity or identity laws)
(b) If A ⊆ B, then A ∩ B=A
(c) A ∩ B ⊆ A and A ∩ B ⊆ B
(d) (A ∩ B) ∩ C = A ∩ (B ∩ C)
7

(e) A ∩ B = B ∩ A
(f) A ∩ A = A (Indempotent law)
The intersection of a finite collection A1 , A2 ,..., An , of set as denoted by:
A1 ∩ A2 ... ∩ An = ∩ni=1 Ai
If the collection A1 ,A2 , A3 ,... is infinite then A1 ∩ A2 ∩ ... = ∩∞
i=1 Ai

Definition: Set A1 , A2 , A3 , ... are mutually disjoint | pairwise disjoint | non-


overlapping if and only if Ai ∩ Aj = ∅ whenever i 6= j.
Example
1. Let A = {1, 2, 3}, B = {4, 5} and C = {6}. Then A,B and C are mutually
disjoint since A ∩ B = ∅, and B ∩ C = ∅.
2. Let D = {1, 2, 3}, E = {4, 5} and F = {2}. In this case D, E and F are
not mutually disjoint since D ∩ F = {2} 6= ∅.
Definition: A collection {A1 , A2 , A3 , ... } of non-empty set is a partition of a
set A and only if:
(i) A is a union of all the Ai (i = 1, 2, 3, ...}.
(ii) The sets A1 , A2 , A3 , ... are mutually disjoint.
Example
Let A={1, 2, 3, 4, 5, 6}, A1 ={1, 2}, A2 = {3,4} and A3 = {5,6}. Then {A1 , A2 ,
A3 } is a partition of A since A=A1 ∪ A2 ∪ A3 and A1 , A2 and A3 are mutually
disjoint.
Set Difference (Relative Complement}
Let A and B be sets. The difference of A and B (or the relative complement of
A in B, denoted by A|B or A − B, is the set of all elements in A but not in B,
i.e. A-B={x|x ∈ A and x ∈ / B}
8

Example
1. Let A={1, 3, 5} and B={1, 2, 3}. Then A-B={5} and B-A={2}.
2. Let X={a, b, c, d, e} and Y = {a, e, i, o, u}. Then X − Y = {b, c, d} and
Y − X = {i, o, u}.
3. Let A be the set of all JKUAT students and B the set of all JKUAT students
taking discrete mathematics. Then A-B is the set of all JKUAT Students who
don’t take Discrete Mathematics.
NB: If A and B are disjoint, then A-B=A and B-A=B.
Exampe:
Let A={1, 2, 3} and B={4, 5, 6}. Then A-B=A and B-A=B.
Remarks:
1. In general, A − B 6= B − A.
2. (A − B) ∩ (B − A) = ∅.
3. A − B = A ∩ B c
Complement of a Set
Let ⊔ be the universal set and let A ⊂ ⊔. The complement of the set A, also

called universal set A, denoted by Ac or A or Ā, is the set of elements in ⊔ but
not in A. Therefore, Ac = ⊔ − A. In other words:
Ac = {x|x ∈ ⊔ and x ∈ / A}

Example
1. Let A={x ∈ Z|x > 5} where the universal set ⊔ is Z+ , the set of positive
integers. then,
Ac = {x ∈ Z+ |x ≤ 5}
={1, 2, 3, 4, 5}
9

2. Let ⊔ = {a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z}
A={a, b, c, d}
B={e, f, g}
V={a, e, i, o, u}
Then
Ac = {e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z}
B c = {a, b, c, d, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z}
V c = {b, c, d, f, g, h, k, l, m, n, p, q, r, s, t, v, w, x, y, z}
In this case,
A ∪ B={a, b, c, d, e, f, g} and A ∩ B = ∅
Also
(A ∪ B)c = {h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z}
(A ∩ B)c = ∅c = ⊔ = ⊔ − ∅ = ⊔
Ac ∪ B c ={a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z} =⊔
Ac ∩ B c = {h, i, j, k, l, m, n, o, p, q, r, s, t, u, v, w, x, y, z}
Comparing we have (A ∪ B)c = Ac ∩ B c and (A ∩ B)c = Ac ∪ B c .
For any two sets A and B, these two are called the De Morgans laws for set
theory.
Symmetric Difference
Let A and B be sets. The symmetric difference of A and B denoted by A ⊕ B,
consists of those elements in either A or B, but not in both A and B, i.e.
A ⊕ B = {(A ∪ B) − (A ∩ B)}
or
A ⊕ B = {(A − B) ∪ (B − A)}

Example
1. Let A = {1, 2, 3, 4} and B = {3, 4, 5, 6, 7}. Then A − B = {1, 2} and
B − A = {5, 6, 7}
So,
A ⊕ B = (A − B) ∪ (B − A)
={1, 2, 5, 6, 7}
Alternatively, A ∪ B ={1, 2, 3, 4, 5, 6, 7} and A ∩ B = {3, 4}
so,
A ⊕ B = {(A ∪ B) − (A ∩ B)}
={1, 2, 5, 6, 7}
10

Reamarks
(a) A ⊕ A = ∅
(b) A ⊕ ∅ = A
(c) A ⊕ ⊔ = Ac
(d) A ⊕ Ac = ⊔
(e) A ⊕ B = B ⊕ A
(f) (A ⊕ B) ⊕ B = A
(g) A ⊕ B = A ∪ B if A ∩ B = ∅
Set Identities
1. Identity laws | unity laws
A∪∅ =A
A∩⊔ =A
2. Domination | Zero Laws
A∪⊔ =⊔
A∩∅ =∅
3. Commutative laws.
A∪B = B ∪A
A∩B = B ∩A
4. Associative laws
(A ∪ B) ∪ C = A ∪ (B ∪ C)
(A ∩ B) ∩ C = A ∩ (B ∩ C)
5. Distributive laws.
A ∪ (B ∩ C) = (A ∪ B) ∩ (A ∪ C)
A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C)
6. Idempotent Laws.
A∪A =A
A∩A =A
7. Absorption Laws.
A ∪ (A ∩ B) = A
A ∩ (A ∪ B) = A
8. Complementation Laws
A ∪ Ac = ⊔
A ∩ Ac = ∅
9. Double Complementation Law
(Ac )c = A
11

10. Universal Laws


⊔c = ∅
∅c = ⊔
11. De Morgans Law
(A ∪ B)c = Ac ∩ B c
(A ∩ B)c = Ac ∪ B c
Remarks:
1. All the laws except the double complelmentation law are in pairs.
2. Any of the properties in a given pair is said to be the dual property of the
other.
3. To obtain the dual property you replace ∪ with ∩ or ⊔ with ∅ and vice
versa.
4. These set identities are similar to the logical equivalences seen earlier.

5. The set identities and propositional equivalences are special cases of iden-
tities for boolean algebra.
Proving Set Identities:
There are three methods of proving the set identities:
1. Use of Venn diagrams.
2. Showing that each of the sets is a subset of the other.
3. Using Boolean algebra.
Justification \ Illustration using Venn Diagram:
(a) Absorption Laws.
A ∪ (A ∩ B) = A
12

A ∩ (A ∪ B) = A

(b) De Morgans Laws.


′ ′ ′
(i) (A ∪ B) = A ∩ B

(A ∪ B)

′ ′
A ∩B
13

(ii) (A ∩ B)c = Ac ∪ B c
(A ∩ B)c

Ac ∪ B c

Use of Subsets | Set-Builder Notation:


(a) Distributive Laws
(i) A ∪ (B ∩ C) = (A ∪ B) ∩ (A ∪ C)
We need to show that A ∪ (B ∩ C) ⊂ (A ∪ B) ∩ (A ∪ C) and (A ∪ B) ∩ (A ∪ C) ⊂
A ∪ (B ∩ C)
Let x ∈ A ∪ (B ∩ C) . Then x ∈ A or x ∈ (B ∩ C). Therefore if x ∈ (B ∩ C)
then x ∈ B and x ∈ C.
If x ∈ A, then x ∈ (A ∪ B) and x ∈ (A ∪ C). So,
x ∈ (A ∪ B) ∩ (A ∪ C).
On the other hand, if x ∈ (B ∩ C), then x ∈ B, x ∈ C
So, x ∈ (A ∪ B) and x ∈ (A ∪ B). Hence x ∈ (A ∪ B) ∩ (A ∪ C)
Either case shows that
A ∪ (B ∩ C) ⊂ (A ∪ B) ∩ (A ∪ C)..............................(I)
Now let, y ∈ (A ∪ B) ∩ (A ∪ C). Then y ∈ (A ∪ B) and y ∈ (A ∪ C)
So y ∈ A, or y ∈ B and y ∈ A or y ∈ C
⇒ y ∈ A or y ∈ B and y ∈ C
⇒ y ∈ A or y ∈ (B ∩ C)
⇒ y ∈ A ∪ (B ∩ C)
Thus (A ∪ B) ∩ (A ∪ C) ⊂ A ∪ (B ∩ C)..................(II)
From (I) and (II)
A ∪ (B ∩ C) = (A ∪ B) ∩ (A ∪ C)
(ii) A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C)
14

Let x ∈ A ∩ (B ∪ C) Then x ∈ A and x ∈ B ∪ C


⇒ x ∈ A and x ∈ B or x ∈ C
⇒ x ∈ A and x ∈ B or x ∈ A and x ∈ C
⇒ x ∈ A ∩ B or x ∈ A ∩ C
⇒ x ∈ (A ∩ B) ∪ (A ∩ C)
So, A ∩ (B ∪ C) ⊂ (A ∩ B) ∪ (A ∩ C) ...............(I)
Now, let y ∈ (A ∩ B) ∪ (A ∩ C. Then y ∈ A ∩ B or y ∈ A ∩ C
⇒ y ∈ A and y ∈ B or y ∈ B and y ∈ C
⇒ y ∈ A and y ∈ B or y ∈ C
⇒ y ∈ A and y ∈ B ∪ C
⇒ y ∈ A∩(B ∪ C)
So, (A ∩ B) ∪ (A ∩ C) ⊂ A ∩ (B ∪ C)...........(II)
From (I) and (II) we have A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C)
(b) De Morgan’s Laws
(i) (A ∪ B)c = Ac ∩ B c
We show that (A ∪ B)c ⊂ Ac ∩ B c and Ac ∩ B c = (A ∪ B)c
Let x ∈ (A ∪ B)c
⇒x∈ / A∪B
⇒x∈ / A and x ∈/B
⇒ x ∈ Ac and x ∈ B c
⇒ x ∈ Ac ∩ B c
So, (A ∪ B)c ⊂ Ac ∩ B c ....................(I)
Now, let y ∈ Ac ∩ B c
⇒ y ∈ Ac or y ∈ B c
⇒y∈ / A or y ∈
/B
⇒y∈ / A∪B
⇒ y ∈ (A ∪ B)c
So, (A ∪ B)c ⊂ Ac ∩ B c ..............(II)
From (I) and (II) (A ∪ B)c = Ac ∩ B c
(ii) (A ∩ B)c = Ac ∪ B c
Let x ∈ ((A ∩ B)c . Then x ∈ / A∩B
⇒x∈ / A or x ∈
/B
⇒ x ∈ Ac or x ∈ B c
⇒ x ∈ Ac ∪ B c
So, (A ∩ B)c ⊂ Ac ∪ B c .............(I)
Now let y ∈ Ac ∪ B c . Then y ∈ Ac and y ∈ B c
⇒y∈ / A and y ∈/B
⇒y∈ / A∩B
⇒ y ∈ (A ∩ B)c
So, (A ∩ B)c ⊂ Ac ∪ B c
Example:
1. Show that for any two sets A and B, A − B = A ∩ B c
Solution:
We need to show that A − B ⊂ A ∩ B c and A ∩ B c ⊂ A − B.
Let x ∈ A − B. Then x ∈ A and x ∈ /B
⇒ x ∈ A and x ∈ B c
15

⇒ x ∈ A ∩ Bc
So, A − B ⊂ A ∩ B c ............(I)
Now let y ∈ A ∩ B c . Then y ∈ A and y ∈ B c
⇒ y ∈ A and y ∈ /B
⇒y ∈A−B
So, A ∩ B c ⊂ A − B ..........(II)
From (i) and (II) ⇒ A − B = A ∩ B c
2. Show that (A ∩ B) ∩ C = A ∩ (B ∩ C)
Solution:
Suppose x ∈ (A ∩ B) ∩ C. Then x ∈ A ∩ B and x ∈ C
⇒ x ∈ A and x ∈ B and x ∈ C
⇒ x ∈ A and x ∈ B ∩ C
⇒ x ∈ A ∩(B ∩ C)
So, (A ∩ B) ∩ C ⊂ A ∩ (B ∩ C) ...........(I)
Now, suppose y ∈ A ∩ (B ∩ C). Then y ∈ A and y ∈ B ∩ C
⇒ y ∈ A and y ∈ B and y ∈ C
⇒ y ∈ A ∩ B and y ∈ C
⇒ y ∈ (A ∩ B) ∩ C
So, A ∩ (B ∩ C) ⊂ (A ∩ B) ∩ C ..........(II)
From (I) and (II) we have ⇒ (A ∩ B) ∩ C = A ∩ (B ∩ C)
3. Prove that if A ⊂ C and B ⊂ D, then A ∪ B ⊂ C ∪ D
Proof:
Let x ∈ A ∪ B. Then x ∈ A or x ∈ B
If x ∈ A, than x ∈ C since A ⊂ A
If x ∈ B, then x ∈ D since B ⊂ D
So, x ∈ C ∪ D
Thus A ∪ B ⊂ C ∪ D
4. Prove that if A ⊂ C and B ⊂ D, then A ∩ B ⊂ C ∩ D
Proof
Suppose x ∈ A ∩ B. Then x ∈ A and x ∈ B.
So, x ∈ C since A ⊂ C and x ∈ D since B ⊂ D
Hence, x ∈ C ∩ D
Therefore A ∩ B ⊂ C ∩ D
Exercise:
Prove that for any sets A, B and C.
(a) A ∪ (B ∪ C) = (A ∪ B) ∪ C
′ ′ ′ ′
(b) [A ∪ (B ∩ C)] = (C ∪ B ) ∩ A \
(c) A ∩ (A ∪ B) = A
(d) A ∪ (A ∩ B) = A
(e) (A − B) − C = (A − C) − (B − C)
(f) A ⊕ B = (A ∪ B) − (A ∩ C)
(g) A ⊕ B = (A − B) ∪ (B − A)
Using Boolean Algebra
1. Simplify A ∩ (Ac ∪ B)
Solution:
16

A ∩ (Ac ∪ B)
= (A ∩ Ac ) ∪ (A ∩ B) (By distributive laws)
= ∅ ∪ (A ∩ B) (By complement law)
= A ∩ B (By unity law)
2. Show that A − (B ∪ C) = (A − B) ∩ (A − C)
Solution:
A − (B ∪ C)

= A ∩ (B ∪ C)
′ ′
= A ∩ (B ∩ C ) (De Morgan’s law)
′ ′
= (A ∩ B ) ∩ (A ∩ C ) (By distributive law)
= (A − B) ∩ (A − C)
′ ′
3. Simplify A ∩ B ∩ (A ∪ B ∪ C)
Solution:
′ ′
A ∩ B ∩ (A ∪ B ∪ C)

= (A ∪ B) ∩ [(A ∪ B) ∪ C] (By De Morgan’s law)
′ ′
= [(A ∪ B) ∩ (A ∪ B)] ∪ [(A ∪ B) ∩ C] (by distributive law)
′ ′
= ∅ ∪ [A ∩ B ∩ C] (by complement law and De Morgan’s law)
′ ′
= A ∩ B ∩ C (by unity law)
4. Show that (A − C) − (B − C) = (A − B) − C
Solution:

(A − C) − (B − C) = (A − C) ∩ (B − C)
′ ′ ′
= (A ∩ C ) ∩ (B ∩ C )
′ ′ ′ ′
= (A ∩ C ) ∩ [B ∪ (C ) ] (By De Morgan’s law)
′ ′
= (A ∩ C ) ∩ (B ∪ C) (By double complementation law)
′ ′ ′
= (A ∩ C ∩ B ) ∪ (A ∩ C ∩ C) (by distributive law)
′ ′
= (A ∩ C ∩ B ) ∪ (A ∩ ∅) (By complement law)
′ ′
= A ∩ C ∩ B ∪ ∅ (by zero law)
′ ′
= A ∩ C ∩ B (by unity law)
′ ′
= A ∩ B ∩ C (by commutative law)
′ ′
= (A ∩ B ) ∩ C (By associative law)
= (A − B − C.
′ ′ ′ ′
5. Show that [A ∪ (B ∩ C)] = (C ∪ B ) ∩ A
Solution:

[A ∪ (B ∩ C)]
′ ′
= A ∩ (B ∩ C) (by De Morgan’s law)
′ ′ ′
= A ∩ (B ∪ C ) (by De Morgan’s law)
′ ′ ′
= A ∩ (C ∪ B ) (by commutative law)
′ ′ ′
= (C ∪ B ) ∩ A (by commutative law)
Exercise:
1. Let A, B and C be sets. Draw a Venn diagram for each of the following:
(a) A ∩ (B ∪ C)
′ ′ ′
(b) A ∩ B ∩ C
(c) (A − B) ∪ (A − C)
(d)A ∩ (B − C)
(e) (A ∩ B) ∪ (A ∩ C)
17

2. Simplify by eliminating the minus sign:


(a) A − (B ∪ C)
(b) A − (B ∩ C)
(c) A − (B − C)
(d) (A − B) − C
(e) A ∩ (B − C)
3. Let A, B and C be sets. Show that

(a) (A ∩ B) ∪ (A ∩ B ) = A
(b) (B − A) ∪ (C − A) = (B ∪ C) − A
(c) (A − C) ∩ (C − B) = ∅
The Principle of Inclusion and Exclusion:
If A and B are disjoint sets, then the number of elements in their unions equals
the sum of their respective orders i.e. A ∩ B = ∅, then |A ∪ B| = |A| + |B|.
However if A ∩ B 6= ∅, then |A ∪ B| = |A| + |B| − |A ∩ B|. This is called the
principle of inclusion and exclusion for two sets. It can be extended for any
finite number of sets using the folloeing theorem.
Theorem: If A1 , A2 ,..., An are sets, then
P
n P P
|A1 ∪ A2 ... ∪ An | = |Ai |− |Ai ∩ Aj |+ |Ai ∩ Aj ∩ Ak | + ... +
i=1 1≤i<j≤n 1≤i<j<k≤n
−(−)n |A1 ∩ A2 ∩ ... ∩ An |
From the above theorem |A ∪ B ∪ C| = |A| + |B| + |C| − |A ∩ B| − |B ∩ C| −
|A ∩ C| + |A ∩ B ∩ C|
Example:
1. Determine the number of integers between 1 and 100, inclusively, that are
divisible by either 2 or 5.
Solution
Let A be the set of all integers divisible by 2, between 1 and 100. Then , A
= {A|1 ≤ x ≤ 100, x is divisible by 2}
= {2, 4, 6, 8,..., 100}
= {2y|y ∈ Z, 1 ≤ y ≤ 50}
⇒ |A| = 50
Now, let B be the set of all integers divisible by 5, between 1 and 100. Then B
= {x|1 ≤ x ≤ 100 x is divisible by 5}
={5, 10, 15, 20, ..., 100}
= {5y|y ∈ Z, 1 ≤ y ≤ 20}
⇒ |B| = 20
In addition, A∩B is the set of all integers divisible by both 2 and 5 (i.e. divisible
by 10), between 1 and 100.
So,
A∩B
= {x|1 ≤ x ≤ 100, x is divisible by 10}
={10, 20, 30, ..., 100}
= {10y|y ∈ Z, 1 ≤ y ≤ 10}
⇒ |A ∩ B| = 10
By the principle of inclusion and exclusion,
18

|A ∪ B| = |A| + |B| − |A ∩ B|
=50+20-10
=60
(A ∪ B is the set of integers between 1 and 100, inclusively, divisible by 2 or 5)
2. Determine the number of integers between 1 and 100, inclusively, that are
divisible by either 3, 5 or 7.
Solution:
Let A
= {x|1 ≤ x ≤ 100, x is divisible by 3}
={3, 6, 9, ..., 99}
= 3y|1 ≤ y ≤ 33}
⇒ |A| = 33
And B
= {x|1 ≤ x ≤ 100, x is divisible by 5}
={5, 10, 15, ..., 100}
= {5y|y ∈ Z, 1 ≤ y ≤ 20}
⇒ |B| = 20
And C,
= {x|1 ≤ x ≤ 100, x is divisible by 7}
={7, 14, 21, ..., 98}
= {7y|y ∈ Z, 1 ≤ y ≤ 14}
⇒ |C| = 14
A ∩ B =Set of integers between 1 and ∞, divisible by 15 ( the l.c.m of 3 and
5). So,
A∩B
= {x|1 ≤ x ≤ 100, x is divisible by 15}
={15, 30, 45, ..., 90}
= {15y|y ∈ Z, 1 ≤ y ≤ 6}
⇒ |A ∩ B| = 6
A ∩ C =Set of integers divisible by 21 ( the l.c.m of 3 and 7), between 1 and
100. So,
A∩C
= {x|1 ≤ x ≤ 100, x is divisible by 21}
={21, 42, ..., 84}
= {21y|y ∈ Z, 1 ≤ y ≤ 4}
⇒ |A ∩ C| = 4
B ∩ C =Set of integers divisible by 35 ( the l.c.m of 5 and 7), between 1 and
100. So,
B∩C
= {x|1 ≤ x ≤ 100, x is divisible by 35}
={35, 70}
⇒ |B ∩ C| = 2
A ∩ B ∩ C = Set of all integers between 1 and 100, divisible by 105 (the l.c.m
of 3, 5 and 7). Clearly, A ∩ B ∩ C = ∅.
Now, the required number is:
|A ∩ B ∩ C| = |A| + |B| + |C| − |A ∩ B| − |A ∩ C| − |B ∩ C| + |A ∩ B ∩ C|
19

= 33 + 20 + 14 − 6 − 4 − 2 − 0
= 55
3. In a survey including 60 people, 25 take water, 26 tea and 26 coffee, 9 take
both milk and tea, 11 take milk and coffee, 8 take coffee and tea and 8 take
none of the drinks.
(a) Find the number of people who take any of the three drinks.
(b) Find the number of people who take coffee, tea, milk alone.
Solution:
Let
M= Set of those taking milk.
T= Set of those taking tea
C=Set of those taking coffee.
Then,
|M | = 25, |T | = 26, |C| = 26, |M ∩ T | = 9, |M ∩ C| = 11, |C ∩ T | = 8
The number of those who take any of the three drinks is |M ∪T ∪C| = 60−8 = 52
Those who take all the three drinks are |M ∪ T ∪ C|.
|M ∪ T ∪ C| = |M | + |T | + |C| − |M ∩ T | − |M ∩ C| − |C ∩ T | + |M ∩ C ∩ T |
⇒ 52 = 25 + 26 + 26 − 9 − 11 − 8 + |M ∩ T ∩ C|
⇒ |M ∩ T ∩ C| = 3
Those who take,
Milk alone = |M | − |M ∩ T | − |M ∩ C| + |M ∩ T ∩ C|
= 25 − 9 − 11 − 3
=8
Tea alone = |T | − |M ∩ T | − |C ∩ T | + |M ∩ T ∩ C|
= 26 − 9 − 8 − 3
= 12
Coffee alone = |C| − |M ∩ C| − |C ∩ T | + |M ∩ T ∩ C|
= 26-11-8+3
= 10
Those who take exactly one drink is 8+12+10=30
Those who take milk and coffee but not tea is
|M ∩ C| − |M ∩ T ∩ C| = 11 − 3 = 8
We can also use a Venn diagram to solve the problem:
20

C alone = 26-11-8+x = 7 + x
M alone = 25-9-11-x= 5+ x
T alone = 26-9-8+x= 9+ x
⇒ 25 + 9 + x + 7 + x + 8 − x = 52
⇒ 49 + x = 52
x=3
So,
C alone =7 +3 =10
M alone = 5+3 =8
T alone = 9+ 3=12
⇒ Those taking exactly one drink are 10 + 8 +12=30
All the three drinks = |M ∩ T ∩ C| = x = 3
M $ T only= 9 - 3 = 6
M $ C only = 11 - 3 =8
T and C only = 8 - 3 =5
⇒ Number taking exactly 2 drinks is 6 + 8 +5 = 19
Those taking almost 2 drinks is:
(None of the drinks) or (exactly one drink) or (exactly 2 drinks)
⇒ Required number is 8 + (10 +8 +12) + (6 +8 +5) = 57
or
Total population - (number taking all the three drinks)
= 60 − 3
= 57
4. Out of a group of 85 people, 30 invested in the stock market, 45 has certificates
of deposits (CD’s) and 44 had savings bonds. Furthermore, 23 had both CD’s
and bonds, 13 had both CD’s and stocks, and 13 had stocks and bonds. Finally,
10 of them had no investments. Determine how many of the people had:
(a) all the three types of investment
(b) at least two investments
(c) at most two investments
(d) CD’s only.
Solution:
21

Let
S= set of those who invested in stock market.
C= set of those who invested in CD’s.
S= set of those who invested in saving Bonds.
Then,
|S| = 30, |C| = 45, |B| = 44, |C ∩ B| = 23, |C ∩ S| = B, |S ∩ B| = 13,

|(S ∪ B ∪ C) | = 10, |S ∪ B ∪ C| = 85 − 10 = 75

|S ∪ B ∪ C| = 75 = 30 + (x + 9) + (23 − x) + (x + 8)
⇒ 75 = 70 + x
⇒x=5
(a) |S ∩ B ∩ C| = x = 5
(b) (13 − x) + (13 − x) + (23 − x) + x
= 49 − 2x
= 49 − 10
= 39
(c) | ⊔ | − |S ∩ B ∩ C| = 85 − 5 = 80
(d) x + 9 = 5 + 9 = 14
Exercise:
In a survey of 500 people, 285 are interested in football game, 195 are inter-
ested in hockey game, 115 are interested in basketball game, 45 in football and
basketball, 70 in football and hockey and 50 in hockey and basketball games.
However, 50 are not interested in any of the three games. Determine the number
of people who are interested in:
(a) all the three games
(b) exactly one of the games.
(c) exactly two of the games .
(d) at least one of the games.
Cartesian Products of Sets:
The order of elements in a collection is often important. Since sets are un-
ordered, a different structure is needed to represent collections. This is provided
by ordered n-tuples.
22

Definition: The ordered n-tuple (a1 , a2 , ..., an ) is the ordered collection that
has a1 as its first element, a2 as its second element, ..., and an as its nth - element.
Two ordered n-tuples are said to be equal if and only if each corresponding pair
of their elements are equal. i.e. (a1 , a2 , ..., an ) = (b1 , b2 , ..., bn ) if anf only if
ai = bi for i = 1, 2, ..., n. In particular, ordered 2-tuples are called ordered pairs.
For instance, (a, b) = (c, d) if and only if a = c and b = d. It then follows that
(a, b) 6= (b, a) unless a = b. Further, ordered 3-tuples are called ordered triples
while ordered 4-tuples are called ordered quadruples.
Definition: Let A and B be sets. The cartesian product of A and B, denoted
by A × B, and read as “A cross B”, is the set of all ordered pairs (a, b), where
a ∈ A and b ∈ B. In other words:
A × B = {(a, b)|a ∈ A and b ∈ B}
Example:
1. Let A={1, 2} and B={a, b , c}. Then
Solution:
A × B={(1, a), (1, b), (1, c), (2, a), (2, b), (2, c)}
B × A= {(x, y), | x ∈ B and y ∈ A}
B × A= {(a, 1), (a, 2), (b, 1), (b, 2) , (c, 1), (c, 2)}
Clearly, A × B 6= B × A
2. Let A = {a, b, c, d} and B={1, 2, 3}. Then
solution:
A × B= {(a, 1), (a, 2), (a, 3), (b, 1), (b, 2), (b, 3), (c, 1), (c, 2), (c, 3), (d, 1),
(d, 2), (d, 3)}
B × A ={(1, a), (1, b), (1, c), (1, d), (2, a), (2, b), (2, c), (2, d), (3, a), (3, b),
(3, c), (3, d)}
Remarks:
1. For any set A, A × ∅ = ∅ × A = ∅
2. For any two sets A and B, A × B 6= B × A unless A=B, or A = ∅ or B = ∅.
3. If |A| = m and |B| = n, then |A × B| = mn
Now, the cartesian prosuct of more than two sets can also be defined by:
Defn: The Cartesian product of the sets A1 , A2 , ..., An denoted by A1 × A2 ×
... × An , is the set of ordered n-tuples (a1 , a2 , ..., an ) where ai belongs to Ai for
i = 1, 2, ..., n.
In other words:
A1 × A2 × ... × An = {(a1 , a2 , ..., an )}|ai ∈ Ai , i = 1, 2, ..., n}
Example:
Let A = {0, 1}, B = {0, 2} and C = {1, 2}. Then
Solution:
A × B × C ={(0, 0, 1), (0, 0, 2), (0, 2, 1), (0, 2, 2), (1, 0, 1), (1, 0, 2), (1, 2, 1)
, (1, 2, 2)}
If A1 = A2 = A3 = ... = An = A, then A1 × A2 × A3 × ... × An is denoted by
An i.e.
An = {(a1 , a2 , ...an ) |ai ∈ A, i = 1, 2, ..., n}
23

So, A × A = A2 , A × A × A = A3 , A × A × A × A = A4 etc.
In particular, for the set of all real numbers R, R × R = R2 is the Eucliclean
space of dimension 2, R× R × R is the eucliclean space of dimensions 3, ..., R×
R × ... × R = Rn is the eucliclean space of dimensions n.
Claim: For any three non-empty sets A, B and C
A × (B ∩ C) = (A × B) ∩ (A × C)
Proof:
Let (u, v) ∈ A × (B ∩ C).
Then u ∈ A and v ∈ B ∩ C
⇒ u ∈ A and v ∈ B and v ∈ C
⇒ (u, v) ∈ A × B and (u, v) ∈ A × C
⇒ (u, v) ∈ (A × B) ∩ (A × C)
So, A × (B ∩ C) ⊂ (A × B) ∩ (A × C).....................(1)
Now, let (x, y) ∈ (A × B) ∩ (A × C)
Then (x, y) ∈ A × B and (x, y) ∈ (A × C)
⇒ x ∈ A and y ∈ B and x ∈ A and y ∈ C
⇒ x ∈ A and y ∈ B and y ∈ C
⇒ x ∈ A and y ∈ B ∩ C
⇒ (x, y) ∈ A × (B ∩ C)
So, (A × B) ∩ (A × C) ⊂ (A × (B ∩ C)....................(2)
Therefore, from (1) and (2) A × (B∩) = (A × B) ∩ (A × C)
Exercise:
Let A, B, and C be sets. Prove that A × (B ∪ C) = (A × B) ∪ (A × C)
Claim: Let A, B, C and D be sets. If A × B 6= ∅ and A × B = C × D, then A
= C and B = D.
Proof:
We need to show that A ⊂ C and B ⊂ D and at the same time C ⊂ A and
D⊂B
Let a ∈ A and b ∈ B
Then (a, b) ∈ A × B
⇒ (a, b) ∈ C × D since A × B = C × D
⇒ a ∈ C and b ∈ D
⇒ A ⊂ C and B ⊂ D.....................(1)
Now, let c ∈ C and d ∈ D.
Then (c, d) ∈ C × D
⇒ (c, d) ∈ A × B since A × B = C × D
⇒ c ∈ A and d ∈ B
⇒ C ⊂ A and D ⊂ B....................(2)
From (1) and (2) A = C and B = D.
NB: The results above could not necessarily hold if A × B = ∅.
For instance, let A = D = ∅ and let B = {x} and C = {y} .
Then A × B = ∅ and C × D = ∅
⇒A×B =C ×D
However, B * D

You might also like