0% found this document useful (0 votes)
13 views17 pages

Discrete Math Wk2

The document is a chapter on Sets from a Discrete Mathematics course, providing foundational concepts and operations related to set theory, including definitions, examples, and laws. It covers set operations such as unions, intersections, and complements, as well as the use of Venn diagrams for visual representation. Additionally, it discusses the cardinality of sets and introduces various number sets essential for further mathematical study.

Uploaded by

shedrinshedz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views17 pages

Discrete Math Wk2

The document is a chapter on Sets from a Discrete Mathematics course, providing foundational concepts and operations related to set theory, including definitions, examples, and laws. It covers set operations such as unions, intersections, and complements, as well as the use of Venn diagrams for visual representation. Additionally, it discusses the cardinality of sets and introduces various number sets essential for further mathematical study.

Uploaded by

shedrinshedz
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

Discrete Mathematics

Dr. Joseph Owuor Owino

United States International University-Africa


Current address: +254114035777
Email address: [email protected]
Contents

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.

1.2. Use of Venn diagrams


Venn diagrams are a visual tool that aid in illustrating set operations. In a Venn diagram, a rectangle
represents the universal set being considered, and subsets are represented by circles or other shapes
within the rectangle. The overlapping regions of the circles indicate the intersection or union of the
corresponding sets, providing a visual representation of set relationships and operations.
Example 1.16. Let A = {1, 3, 5, 7, 9} B = {1, 2, 3, 4, 5} and E = {1, 2, 3, . . . , 10}.
1.3. THE NUMBER SETS 3

A ∪ B is the entire shaded part

A−B
9, 4, 7 1, 3, 5 2, 4 B−A

6, 8, 10

A ∩ B is the overlapping region

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.

1.3. The number sets


The following sets of numbers will play key roles in our study.
(i). Natural numbers. The counting numbers, also known as natural numbers, are denoted as
N and defined as N = {0, 1, 2, 3, 4, . . .}. The set N includes all non-negative whole numbers
starting from 0 and continues indefinitely.
4 1. SETS

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

1.4. Laws of sets


Let A, B and C be any three sets and U be the universal set. Then
(i) Idempotent laws
A ∪ A = A and A ∩ A = A.
(ii) Identity laws

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

(vii) Associative laws


A ∪ (B ∪ C) = (A ∪ B) ∪ C
A ∩ (B ∩ C) = (A ∩ B) ∩ C
(viii) Distributive laws
A ∪ (B ∩ C) = (A ∪ B) ∩ (A ∪ C)
A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ C).
(ix) De Morgan’s laws
(A ∪ B)c = Ac ∩ B c (A ∩ B)c = Ac ∪ B c .
(x) Absorption laws
A ∪ (A ∩ B) = A A ∩ (A ∪ B) = A
(xi) If A ⊂ B, then A ∩ B = A, B c ⊂ Ac and A ∪ B = B.
(xii) A − B = A ∩ B c
L
(xiii) A B = (A ∪ B) \ (A ∩ B).
Remark 1.19. Set theory transcends its abstract roots and offers practical applications in business
operations and software development. Businesses leverage set theory for planning and organization.
Different functions like accounting, management, or sales can be grouped into sets, with further
sub-sets like warehouse operations within the broader operations set. Importantly, sets can overlap,
as sales operations might belong to both the sales and operations sets. This logical thinking, fos-
tered by set theory (or even relational algebra), proves invaluable in various domains. It underpins
the standard database language, SQL, which relies heavily on set-based operations for data manip-
ulation. This connection is two-way: someone familiar with database design might find set theory
concepts easier to grasp. Even in non-scientific software development, the same logical thinking is
essential and used in large data processing programs like the “map-reduce” pattern.

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

Example 1.21. Let A, B, C be non-empty sets and show that A × (B ∪ C) = (A × B) ∪ (A × C).

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

1.6. Partition of sets


Let Si be a sequence of subsets of a set S. We say that Si , partition S, if
(i) Each Si ̸= ∅, there must be at least one item in each set of the sequence.
S
(ii) S = Si . The union of all the sets give S.
T
(iii) Si Sj = ∅, i ̸= j. The sets are pairwise disjoint.
Example 1.22. We can partition the set of integers Zr , where r is the remainder when one divides
any integer by 2. The we get
Z0 = {. . . , −4, −2, 0, 2, 4, . . .}
Z1 = {. . . , −3, −1, 1, 3, 5, . . .}
We can clearly see that this characterizes integers as odd or even. The union of odd and even
integers gives the set of integers and the intersection of odd and even integers is empty,that is, no
integer can be both odd and even.

1.7. Principle of inclusion exclusion


In study cardinality of sets, especially for unions with non-empty intersection, this Principle assists
in counting. The idea is that for any two intersecting sets A and B, one can partition the union
into three subsets, that is, A − B, A ∩ B and B − A. Then to avoid counting A ∩ B, twice, since
A ∩ B is a subset of both A and B. We have the following theorem.
Theorem 1.23 (Principle of Inclusion Exclusion). Let A and B be sets. Then
|A ∪ B| = |A| + |B| − |A ∩ B|.

Proof. Let the cardinality of A − B be m, cardinality of B − A be n and the cardinality of


A ∩ B be t. Then by definition, |A| = m + t and |B| = n + t. Counting the number of elements in
A ∪ B, we need to add up the cardinalities of three disjoint sets whose union is A ∪ B.
1.7. PRINCIPLE OF INCLUSION EXCLUSION 7

A A−B A∩B B−A B

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

|A ∪ B ∪ C| = |(A ∪ B)| + |C| − |(A ∪ B) ∩ C|


apply the same theorem again
=|A| + |B| − |A ∩ B| + |C| − |(A ∩ B) ∪ (A ∩ C)|
appy the same theorem and distribute
intersection over union
=|A| + |B| − |A ∩ B| + |C| − |(A ∩ B)| + |(A ∩ C)|

− |(A ∩ B) ∩ (A ∩ C)|
=|A| + |B| + |C| − |A ∩ B| − |A ∩ C|
− |B ∩ C| + |A ∩ B ∩ C|

1.8. Mathematical Induction


This technique is essentially used to prove that a statement P (n) holds for every natural number n =
1, 2, 3, . . . ; that is, the overall statement is a sequence of infinitely many cases P (1), P (2), P (3),′ . . .
A proof by induction consists of two cases. We have the base case and the inductive step.

Example 1.25. Prove by mathematical induction that the sum of the first n natural numbers is
given by n(n+1)
2 .

Proof. The statement can be put in the form

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

This implies that

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

(9) Show that the following statements are true.


A ∩ (B ∪ C) = (A ∩ B) ∪ (A ∩ 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

(14) Show that a set on n elements has 2n subsets.


(15) Prove by mathematical induction that
1 + 3 + 5 + . . . + 2k − 1 = k 2

(16) Prove by mathematical induction that


2 + 4 + 6 + . . . + 2k = k(k + 1)

(17) Use laws of sets to verify that A − B − C = A − (B ∪ C).


(18) A survey among 100 students shows that of the three ice cream flavors; vanilla, chocolate
and strawberry, 50 students like vanilla, 43 like chocolate, 20 like strawberry, 13 like vanilla
and chocolate, 11 like chocolate and strawberry, 12 like strawberry and vanilla and 5 like
all of them. Find the number of students that like the following flavors.
(a) Chocolate but not strawberry
(b) Chocolate and strawberry, but not vanilla.
(c) Vanilla or chocolate, but strawberry.
(19) Give examples of empty sets.
(20) Find the power set of the set A = {1, 2}.
(21) Let A = {a, b, c, }, B = {b, c, d, e} and C = {x, y}. Perform the following set operations
and give the results. A − B, A ∩ B, A ∪ C, A∆B, A ∪ (B ∩ C) and (A ∪ B) ∩ (A ∪ C). Draw
a Venn diagram to represent the given sets.
(22) Let A = {a, . . . , z, 0, . . . , 9} and B = {0, . . . , 9}. Find A − B and B − A.
(23) Let U = {a, . . . , z}. Find the complements of the sets A = {a, e, o, i, u} and B = {a, c, d, f, . . . , w}.
(24) Let A = {a, b, x, y, z}, B = {c, d, e, x, y, z} and
U = {a, b, c, d, e, w, x, y, z}.
Find (A ∪ B)c and Ac ∩ B c .
(25) Let A = {a, . . . , z, 0, . . . , 9} and B = {0, . . . , 9, +, −, ∗, /}. What is the symmetric differ-
ence of A and B?
(26) Simplify the expression (A ∩ B c ) ∪ (Ac ∩ B) ∪ (Ac ∩ B c ).
(27) Let A = {x}, B = {y, z} and C = {1, 2, 3}.
Find A × B × C
(28) Let A, B, C and D be any sets. Find the cardinalitiy of A ∪ B ∪ C ∪ D. Can this result
be generalized to any finite number of sets. That is, how can we find cardinality of
A1 ∪ A2 ∪ A3 ∪ . . . ∪ An .
(29) A survey of 600 workers show that 310 listened to the 7 oclock news on radio and 370
regularly listened to the late night news on radio while 120 regularly listened to both
newscasts. Find the number of workers who listened to:
(i.) The 7 o’clock news but not the late night news
1.9. EXERCISES 11

(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

You might also like