Discrete Math Wk2
Discrete Math Wk2
Chapter 1. Sets 1
1.1. Sets 1
1.2. Use of Venn diagrams 2
1.3. The number sets 3
1.4. Laws of sets 4
1.5. Proofs 5
1.6. Partition of sets 6
1.7. Principle of inclusion exclusion 6
1.8. Mathematical Induction 8
1.9. Exercises 9
References 13
iii
CHAPTER 1
Sets
This chapter introduces the abstract concept of a set in a clear and basic manner. Concrete examples
are provided to help readers understand and appreciate set theory. Basic set operations such
as unions, intersections, set complements, and their representation using Venn diagrams are also
introduced. Additionally, the chapter reviews the real number system, which forms the foundation
for calculus.
1.1. Sets
Definition 1.1. A set is a well-defined collection, group, aggregate, class, or conglomerate of
distinct objects. The objects (which could be cities, students, years, letters, or anything else) in a
set are called elements of the set. We usually denote sets by capital letters and elements by small
letters. We write a ∈ A to indicate that the element ’a’ is contained in the set ’A.’ Similarly, b ∈
/B
means that the element ’b’ is not contained in the set ’B.’ The empty set is denoted as ∅ or and
does not contain anything inside it. The universal set Ω contains all the elements considered in a
particular context.There are two ways to represent sets:
(i) Enumerate the elements, for example, C = {1, 2, 3}
(ii) Give properties of the elements,that is, describe the set C as the natural numbers from 1 to
3.
Definition 1.2. We write A ⊆ B to indicate that A is a subset of B, meaning that all elements of
A are elements of B. The empty set is a subset of every set.
Example 1.3. Taking A = {1, 2} and B = {1, 2, 3}. It is easy to see that every element of A is
an element of B hence A ⊆ B.
Notice that every set is a subset of itself. A proper subset of a set is any subset that is different
from the set itself or the empty set. The empty set and the whole set are called trivial subsets or
improper subsets.
Remark 1.4. In example 1.3, observe that A ⊂ B.
Remark 1.5. Principle of extensionality If for any two sets A and B, we have that A ⊆ B and
B ⊆ A, then A = B.
Definition 1.6. Let A be a given set. The power set of A denoted by 2A is the collection of all
subsets of A.
Example 1.7. Let A = {a, b}. Then 2A = ∅, {a}, {b}, A .
1
2 1. SETS
1.1.1. Operations on sets. We usually form additional sets from given sets. This is achieved
through set operations, including set unions, intersections, and set differences.
1.1.2. Set unions. The union of sets A and B, denoted by A ∪ B, represents the elements
that are either in A, or in B, that is, A ∪ B = {x : x ∈ A or x ∈ B}.
Example 1.8. Let P = {1, 2} and Q = {4, 5}. Then P ∪ Q = {1, 2, 4, 5}.
1.1.3. Set intersections. The intersection of sets A and B, denoted by A ∩ B, represents the
elements that are common to both A and B, that is, A ∩ B = {x : x ∈ A and x ∈ B}.
Example 1.9. Given P = {3, 4} and Q = {4, 5}, then P ∩ Q = {4}. A set which contains only
one element is called a singleton set.
1.1.4. Set complements (Set difference). The relative complement of set B with respect
to set A, denoted by A − B or A \ B, represents the elements that belong to A but not to B. When
A is the universal set, we refer to this as the complement of B and it is represented by B c = Ω − B.
Example 1.10. If we take P = {1, 2, 4} and Q = {4, 5, 6}, then P \ Q = {1, 2}.
1.1.5. Symmetric difference of two sets. Given sets A and B, the symmetric difference of
A and B, denoted as A∆B, consists of the elements that are in the union of A and B, but not in
their intersection, that is, A∆B = (A ∪ B) − (A ∩ B).
Example 1.11. If A = {1, 2, 3} and B = {1, x, t} then
A ∪ B = {1, 2, 3, x, t} and A ∩ B = {1}. Hence A∆B = {2, 3, x, t}.
1.1.6. Cartesian product of sets. Assuming sets A and B, the Cartesian product of A and
B, is given by defined as A × B = {(a, b) : a ∈ A and b ∈ B}.
Example 1.12. If we have A = {−1, 6} and B = {a, b}, then A×B = {(−1, a), (−1, b), (6, a), (6, b)}
and B × A = {(a, −1), (a, 6), (b, −1), (b, 6)}.
Remark 1.13. From example 1.12, one can tell that Cartesian product is not commutative.
Definition 1.14. If we have two sets A and B, a function or mapping or map f from A to B,
denoted as f : A → B, is a rule that assigns a unique element b ∈ B to each element a ∈ A. The
set A is referred to as the domain of the function f , and the set B is known as the co-domain of f .
√
Example 1.15. Let f : R+ → R+ be defined by f (x) = x.
A−B
9, 4, 7 1, 3, 5 2, 4 B−A
6, 8, 10
A−B
9, 4, 7 1, 3, 5 2, 4 B−A
6, 8, 10
1.2.1. Cardinality of a set. The number of elements contained in a set is referred to as its
cardinality. If a set is finite, its cardinality is a finite number. If a set is infinite, its cardinality is
considered infinite. For a set A, the cardinality can be denoted as |A|, #A, or CardA.
Example 1.17. Let P = {2, 4, 6, 8, 10, 12} and
Q = {12, 14, 16, 18, 20}. Then |P | = 6 , |Q| = 5 , |P ∩ Q| = 1, and|P ∪ Q| = 10.
From example 1.17, we observe that for any two sets A and B, we will have that |A ∪ B| =
|A| + |B| − |A ∩ B|. This result can be generalized to any finite number.
(ii). Integers. The set of integers, denoted as Z, consists of zero (0), the positive and negative
natural numbers, and their corresponding negatives, that is, Z = 0, ±1, ±2, . . .. In Z, we
include zero, the positive integers, the negative integers, and their infinite sequence in both
directions.
(iii). Rational numbers. The set of rational numbers, denoted as Q, consists of all numbers that
can be expressed as fractions. It is defined as Q = { xy |x, y ∈ Z, y ̸= 0, (x, y) = 1}. In Q, we
include all fractions where the numerator x and denominator y are integers, the denominator
is not zero (y ̸= 0), and the greatest common divisor (gcd) of x and y is 1. This ensures that
the fraction is in its simplest form.
(iv). Irrational numbers. The set of numbers that cannot be expressed as fractions is denoted
as Qc . It consists of numbers that are not rational. In other words, Qc = {t | t ∈ / Q}.
√
Some common examples of numbers in Qc include π, e, and p, where p is a thmme number.
These numbers are known to be irrational and cannot be represented as fractions with integer
numerators and non-zero integer denominators.
(v). Real numbers. The set of real numbers, denoted as R, encompasses both rational and
irrational numbers. In other words, R = Q ∪ Qc . The real number line, as R is often referred
to, serves as the foundation for calculus and encompasses all possible numbers, including both
rational and irrational numbers. It provides a comprehensive framework for mathematical
analysis and is utilized extensively in various branches of mathematics and physics.
Remark 1.18. The n-dimensional Cartesian product of R can be defined as the set of ordered
n-tuples, denoted as Rn . It is represented as Rn = {(x1 , x2 , . . . , xn )| xi ∈ R, i = 1, 2, . . . , n}. Here,
each element of Rn is an n-tuple consisting of real numbers, where xi represents the i-th component
of the tuple. It is important to note that for each positive integer n, the notation Rn is read as
”real n”, indicating the n-dimensional Cartesian product of the real numbers.
A∪∅=A and A ∩ U = A.
(iii) Inverse laws
A ∪ Ac = U and A ∩ Ac = ∅
(iv) Domination laws
A ∪ U = U and A ∩ ∅ = ∅
(v) Commutative laws
A ∪ B = B ∪ A and A ∩ B = B ∩ A.
(vi) Double
c complementation law
Ac = A
1.5. PROOFS 5
1.5. Proofs
A proof is a logical argument for or against a statement. Most commonly used proofs include:
direct proofs, proof by contradiction, proof by cases and mathematical induction.
Example 1.20. Prove that the empty set is a subset of every set.
Proof. Let A ̸= ∅ be a set. Suppose that the empty set is not a subset of A, that is, ∅ ⊈ A.This
means that we can find some x ∈ ∅ such that x ∈/ A. This contradicts the fact that ∅ is empty, that
is, has no elements. Hence the empty set must be a subset of every set. □
Proof. We want to use the principle of extensionality and the element argument method.
This involves proving that each of the sets contains the other. We first show that A × (B ∪ C) ⊆
(A × B) ∪ (A × C).
Pick an arbitrary element in A × (B ∪ C). Since the Cartesian product is involved, the elements
must be ordered pairs, say (x, y). Let (x, y) ∈ A × (B ∪ C). Then y ∈ B ∪ C, so y ∈ B or y ∈ C. If
6 1. SETS
y ∈ B, then (x, y) ∈ A × B ⊆ (A × B) ∪ (A × C). The case where y ∈ C gives the same conclusion
that (x, y) ∈ (A × B) ∪ (A × C). Thus, the inclusion
A × (B ∪ C) ⊆ (A × B) ∪ (A × C)
follows.
To show the reverse inclusion, let (t, s) ∈ (A × B) ∪ (A × C). Then (t, s) ∈ A × B or (t, s) ∈ A × C.
In the former case, t ∈ A and s ∈ B ⊆ B ∪ C, so (t, s) ∈ A × (B ∪ C). The latter case also gives
the same conclusion. Thus, the inclusion
(A × B) ∪ (A × C) ⊆ A × (B ∪ C)
follows.
By the inclusions above, and the principle of extensionality, we conclude that the two sets must be
equal. □
Figure 1. Partition of A ∪ B.
Clearly,
|A ∪ B| =m + t + n
=|A| + n
=|A| + n + t − t
=|A| + |B| − |A ∩ B|.
Practical problems where more than two sets are intersecting demand for an extension of this result.
Example 1.24. Let A, B and C, be sets. What is the cardinality of A ∪ B ∪ C if the three sets are
intersecting?
Solution:
8 1. SETS
We can make use of Theorem 1.23 by writing A ∪ B ∪ C = (A ∪ B) ∪ C. This can be done since
union of sets is associative. Then by Theorem 1.23
Example 1.25. Prove by mathematical induction that the sum of the first n natural numbers is
given by n(n+1)
2 .
n(n + 1)
1 + 2 + 3 + ... + n =
2
1(1+1)
The base case is when n = 1, that is, 1 = 2 which is true.
At the inductive step, we need to assume that the statement is true for n = k and show that it will
be true for n = k + 1. That is suppose that
k(k + 1)
1 + 2 + 3 + ... + k =
2
k(k + 1)
1 + 2 + 3 + . . . + k + (k + 1) = + (k + 1),
2
1.9. EXERCISES 9
since addition of the same quantity on both sides of an equation preserves equality.
We can rewrite the above as
k
1 + 2 + 3 + . . . + k + (k + 1) = (k + 1) + (k + 1)
2
and factor out k + 1.
k
=(k + 1) +1
2
(k + 1)(k + 2)
=
2
(k + 1)(k + 1 + 1)
=
2
□
1.9. Exercises
(1) Define a set and give an example of a set.
(2) What is Cardinality of a set ? Find the Cardinality of the set you gave in 1.
(3) Let the sets A and B be given as: A = {1, 2}, B = {1, 3}. Evaluate the following:
A ∪ B, A ∩ B, A \ B, A × B, A∆B.
(4) What is the Cardinalities of the sets in 3.
(5) Describe the following sets: integers, rational, irrational, complex or real numbers.
(6) Prove the following statement on the sets A, B, C if they are all non-empty.
A × (B ∩ C) = (A × B) ∩ (A × C).
(7) Let S be a set and Sn be the number of subsets of a set S. Then show that Sn =
2Sn−1 , n ≥ 1.
(8) Prove the De Morgan’s laws on sets.
(A ∩ B)c = Ac ∪ B c
(A ∪ B)c = Ac ∩ B c
A ∪ (B ∩ C) = (A ∪ B) ∩ (A ∪ C)
√
(10) Show that 2 is an irrational number.
(11) Suppose that A ⊆ B, then A ∪ B = B.
(12) Find the number of integers x ≤ 300 that are divisible by 2 or 3.
(13) By the principle of mathematical induction, show that the sum of the first n positive even
integers is given by n(n + 1).
10 1. SETS
(ii.) The late night news but not the 7 o’clock news
(iii.) exctly one of the news broadcasts
(iv.) At least one of the news broadcasts
(v.) Find the number of workers who didn’t listen to either of the news broadcasts.
(30) A sample of 200 voters revealed the following information about three candidates A, B
and C who were running for chairman, secretary and treasurer respectively. 28 were in
favour of both A and B, 98 in favour of A or B but not C, 42 in favour of B but not C or
A. 122 in favour of B or C but not A, 64 in favour of C but not A or B, 14 in favour of A
and C but not B while 35 were in favour of A but not B or C.
(i.) Determine the percentage of voters who were in favour of the three candidates
(ii.) Determine the candidate who went unopposed if the rule of 50% majority was used
in such a decision.
(31) Let U = {1, 2, 3, . . . , 10} and A = {1, 2, 3, 5},
B = {2, 4, 6, 7} and C = {2, 3, 4, 8}. Determine
(i.) B ∪ C
(ii.) C − A
(iii.) A − (A ∩ B)
(32) In a group of 400 people in USA, 250 can speak Spanish and 200 can speak English. How
many people can speak both Spanish and English?
(33) If P and Q are two sets such that P has 40 elements, P ∪ Q has 60 elements and P ∩ Q
has 10 elements, how many elements does Q have?
(34) In a town of 840 persons, 450 read Hindi, 300 read English and 200 read both. Determine
the number of persons who read neither.
(35) In a survey of 200 students of a school it was found that 120 study mathematics, 90 study
physics and 70 study chemistry. 40 study mathematics and Physics, 30 study physics and
chemistry, 50 study chemistry and mathematics and 20 study none of these subjects. Find
the number of students who study all the three subjects
(36) In a town of 10,000 families it was found that 40% families buy newspaper A, 20% buy
newspaper B, 10% families buy newspaper C, 5% families buy A and B, 3% buy B and C
and 4% buy A and C. If 2% of the families buy all the three newspapers find
(i.) The number of families which buy newspaper A only
(ii.) The number of families which buy none of A, B and C
References
[1] Kenneth P Bogart, Clifford Stein, and Robert Drysdale. Discrete mathematics for computer
science. 2005.
[2] Rod Haggarty. Discrete mathematics for computing. Addison-Wesley Longman Publishing Co.,
Inc., 2001.
[3] John O’Donnell, Cordelia Hall, and Rex Page. Discrete mathematics using a computer. Springer,
2006.
[4] Joseph Owuor Owino. College Algebra-An Analyst’s Perspecitve. Lambert Academic, 2022.
[5] Kenneth H Rosen. Discrete mathematics and its applications. 2012.
13