You are on page 1of 42

DISCRETE MATHEMATICS(IT 100)

jvb

A Compilation of Modules

in the Whole Period

of the First Semester, AY 2023-2024

Department of Information Technology


School of Engineering and Technology
J.H Cerilles State College-Dumingag Campus
Caridad, Dumingag, Zamboanga del Sur, Philippines
jvb

ERIC G. LAURON, MSMATH


eric.lauron@jhcsc.edu.ph
eric.lauron@g.msuiit.edu.ph

August 2023
REPUBLIC OF THE PHILIPPINES SCHOOL OF ENGINEERING AND TECHNOLOGY
J.H. CERILLES STATE COLLEGE Bachelor of Science in Information Technology
MAIN CAMPUS COURSE SYLLABUS

COURSE COURSE
J.H IT 100 Discrete Mathematics TERM 1ST SEMESTER. AY 2023-2024
NUMBER TITLE
COURSE COURSE
3 LECTURE PRE-REQUISITE
CREDITS TYPE
PRE-REQUISITE/CO-
CONTACT HOURS PER WEEK 3 HRS NONE
REQUISITE TO
JHCSC VISION Leading higher education institution serving the ASEAN community with quality, innovative and culture-sensitive
programs.
 Provide need-based tertiary and advanced programs in Agriculture, Education and allied fields;
JHCSC MISSION  Undertake applied research, extension and production services that yield workable and durable solutions to sector
specific challenges, thus improving the socio-economic well - being of identified communities.

SET GOAL The School of engineering and Technology aims to produce competent professionals equipped with technical skills that meets the
demands of the ASEAN community.

SET OBJECTIVES
BSIT PROGRAM OUTCOMES
GRADUATES ATTRIBUTES GRADUATES OUTCOMES
Analyze the GLOCAL impact of computing information technology on diverse individuals, organizations, and society
Diversified IT Individual Evaluate professional, ethical, legal, security and social issues and responsibilities in the utilization of information technology
Display professional commitment to ethical practices considering the varied cultures in the community
Exhibit ingenuous craftsmanship in all forms of communication with diverse clients in the IT industry
Conversationalist Interact effectively with the computing society through logical writing, presentations, and clear instructions
Utilizes gender fair language in expressing one’s idea in generating effective IT development plan
Engage into IT-based research activities in pursuit of new knowledge and understanding the environment and nature.
Techno- conservationist Generate computing researches aligned to diverse discipline areas of investigation of providing effective technology solutions and ingenuity.
Promote innovative ideas resilient to the changing environments and emerging technologies
Analyze complex problems in identifying and defining the computing requirements appropriate to its solution
Modern Problem Solver Implement computer-based systems and processes to meet desired organizational needs and requirements in different perspective
Integrate appropriate strategies and techniques that uses quality assurance framework in designing solution

COURSE DESCRIPTION:
This course introduces the foundations of discrete mathematics as they apply to computer science. Topics include functions, relations
and sets, basic logic, proof techniques, basics of counting and introduction to digital logic and digital systems.
COURSE LEARNING OUTCOMES:
GRADUATE OUTCOMES INDICATORS DUE DATE
 1.

Diversified IT Individual

Conversationalist (K)

Modern Problem Solver (S) 


Techno-conservationist (A) 
COURSE REQUIREMENTS:
A. Grading System:
Online Assessment: Face to Face Assessment:
Quizzes 40%
Assignments / Participation 20% Class Participation 40%
Exam 40% Assignment/Projects 20%
Total 100% Major Examination 40%
Total 100%
B. Classroom Policies:
In order to pass this course, a student must be able to obtain a rating of at least 3.00 derived from the following fulfilled requirements:
1. Attendance in every class and activities are REQUIRED. Allowable unexcused number of absences is only 10% of the total class hours.
2. Students must be attentive for class instructions so as to maintain the class in order.
3. Students must follow the submission schedule of required output to avoid completion issues. Allowable late submission period is ONLY a week after the due
date.
4. Students must coordinate with the instructor for any clarifications. Consultation hours will be provided.
5. Students must strictly follow SAFETY PROTOCOLS.
Rubrics for the following requirements will be discussed during class sessions.

WEEK/NOMINAL TEACHING & LEARNING MODALITIES


COURSE CONTENT/SUBJECT MATTER/TOPIC/OBJECTIVES
DURATION/OUTCOME (ACTIVITIES/ASSESSMENT)
ONLINE FACE TO FACE
MIDTERM:
 Synchronous discussions and
WEEK 1 ORIENTATION and INTRODUCTION  Online discussion and assessment via clarifications on the given
 Course Description, Learning Outcomes, Course exclusive online platforms topics
Outline, Grading System, Classroom Policies  Online submission of assignments and  Submission of assignments,
 What is Discrete Mathematics? reports group discussion,
 Discrete Mathematics as an Underlying Concept feedbacking.
in IT.

WEEK 2
TOPIC 1: SETS: AN OVERVIEW  Online discussion and assessment via  Synchronous discussions and
 Definition of Set exclusive online platforms clarifications on the given
 Set Notations  Online submission of assignments and topics
 Special Sets reports  Submission of assignments,
group discussion,
feedbacking.

WEEK 3
 Relationship Between Sets  Online discussion and assessment via  Synchronous discussions and
 Cardinality of Set exclusive online platforms clarifications on the given
 Power Set  Online submission of assignments and topics
reports  Submission of assignments,
group discussion,
feedbacking.
WEEK 4
 Set Operations  Online discussion and assessment via  Synchronous discussions and
 Venn Diagram exclusive online platforms clarifications on the given
 Online submission of assignments and topics
reports  Submission of assignments,
group discussion,
feedbacking.
WEEK 5
TOPIC 2: FUNCTIONS  Online discussion and assessment via  Synchronous discussions and
 Definition of a Function exclusive online platforms clarifications on the given
 Domain, Codomain, Image  Online submission of assignments and topics
reports  Submission of assignments,
group discussion,
feedbacking.
WEEK 6
 Surjections, Injections, Bijections  Online discussion and assessment via  Synchronous discussions and
exclusive online platforms clarifications on the given
 Online submission of assignments and topics
reports  Submission of assignments,
group discussion,
feedbacking.
WEEK 7
TOPIC 3: INTRODUCTION TO LOGIC  Online discussion and assessment via  Synchronous discussions and
 Statements exclusive online platforms clarifications on the given
 Compound Statements  Online submission of assignments and topics
reports  Submission of assignments,
group discussion,
feedbacking.
WEEK 8
 Truth Table  Online discussion and assessment via  Synchronous discussions and
exclusive online platforms clarifications on the given
 Online submission of assignments and topics
reports  Submission of assignments,
group discussion,
feedbacking.
WEEK 9
SUMMATIVE TEST
MIDTERM EXAM

FINAL:
TOPIC 4: TECHNIQUES IN PROVING  Online discussion and assessment via  Synchronous discussions and
WEEK 10  Direct Proof exclusive online platforms clarifications on the given
 Online submission of assignments and topics
reports  Submission of assignments,
group discussion,
feedbacking.
WEEK 11
 Contrapositive  Online discussion and assessment via  Synchronous discussions and
exclusive online platforms clarifications on the given
 Online submission of assignments and topics
reports  Submission of assignments,
group discussion,
feedbacking.
WEEK 12
 Contradiction  Online discussion and assessment via  Synchronous discussions and
exclusive online platforms clarifications on the given
 Online submission of assignments and topics
reports  Submission of assignments,
group discussion,
feedbacking.
WEEK 13
 Principle of Mathematical Induction  Online discussion and assessment via  Synchronous discussions and
exclusive online platforms clarifications on the given
 Online submission of assignments and topics
reports  Submission of assignments,
group discussion,
feedbacking.
WEEK 14
TOPIC 5: BASICS OF COUNTING  Online discussion and assessment via  Synchronous discussions and
 Additive Rule exclusive online platforms clarifications on the given
 Multiplicative Rule  Online submission of assignments and topics
reports  Submission of assignments,
 Inclusion and Exclusion group discussion,
 Bit Strings feedbacking.

WEEK 15
 Combinations  Online discussion and assessment via  Synchronous discussions and
 Permutations exclusive online platforms clarifications on the given
 Online submission of assignments and topics
reports  Submission of assignments,
group discussion,
feedbacking.
WEEK 16
TOPIC 5: INTRODUCTION TO DIGITAL LOGIC AND DIGITAL  Online discussion and assessment via  Synchronous discussions and
SYSTEMS exclusive online platforms clarifications on the given
 Representations of Combinational Circuits  Online submission of assignments and topics
 Boolean Algebra reports  Submission of assignments,
group discussion,
feedbacking.
WEEK 17
Summative Test

WEEK 18
FINAL EXAM

References:

[1] Levin, O. (2021). Discrete Mathematics: An Open Introduction(3rd ed.).(n.p). https://discrete.openmathbooks.org/pdfs/dmoi-tablet.pdf


[2] Lecture Notes on Discrete Mathematics.(n.p). https://home.iitk.ac.in/~arlal/book/mth202.pdf
Date Revised: Prepared by: Reviewed by: Recommending Approval: Approved:

Date Prepared: ERIC G. LAURON, MSMATH ZENON MATOS, MSIT LINA T. CODILLA, PhD
Instructor Program In-Charge SET Dean VPAA

August 2023

Date Shown: Shown by: Shown to:

_____ 2021 _____________________ ----------------------------------------------- ----------------------------------------------- -----------------------------------------------


Position Student Student Student
TABLE OF CONTENTS

Title Page 1

Course Syllabus 2

Table of Contents 9

1 INTRODUCTION TO DISCRETE MATHEMATICS 1


1.1 What is Discrete Mathematics? . . . . . . . . . . . . . . . . . 1
1.2 Discrete Mathematics and Information Technology . . . . . . 2

2 SETS : AN OVERVIEW 7
2.1 Set Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.2 Set Notations . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
2.3 Special Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
2.4 Relationship Between Sets . . . . . . . . . . . . . . . . . . . . 17
2.5 Cardinality of a Set . . . . . . . . . . . . . . . . . . . . . . . . 20
2.6 Power Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
2.7 Set Operations . . . . . . . . . . . . . . . . . . . . . . . . . . 22
2.8 Venn Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . 27

APPENDICES 32

References 33
CHAPTER 1

INTRODUCTION TO DISCRETE MATHEMATICS

At the end of this lesson, the student can:

1. Clearly define what discrete mathematics is by creating a brief summary


that explains the difference between discrete and continuous.

2. Relate discrete mathematics and information technology by presenting


a vivid essay that explains an IT concept with an underlying discrete
math concepts.

Welcome to the IT Department of the JH Cerilles State College- Dumin-


gag Campus. We hope to see you running through this course and finish
remarkably.
Welcome to Discrete Mathematics! As an IT student, if this is your first
time encountering the subject, you will probably find discrete mathematics
quite different from other math subjects. You might not even know what
discrete math is! Hopefully this short introduction will shed some light on
what the subject is about and what you can expect as you move forward in
your studies.

1.1 What is Discrete Mathematics?

Well, it is very hard to explain what discrete math is because it is hard


to define what mathematics is? If we are to define what is mathematics, we
may say that it is the study of numbers, study of triangles, squares, maybe
the study of solving x and y, etc. Well, whatever definition you wish to define
mathematics, we will try to apply the concept of discrete in it.
2

In your previous math class, you may be acquainted with set of numbers
that are separate and individual. Example the set {1, 2, 3} are numbers that
are separate from each other and individual elements. This set is discrete.
We may have also numbers in an interval like (0, 5) wherein between these
two numbers we can still find rational numbers such as 0.5, 34 , 4, etc and some

irrational numbers such as 2, π, etc. Hence the interval (0, 5) is not discrete
but continuous.
Therefore, in a sense we can define discrete mathematics as a study of
mathematical structures/objects that can be considered discrete rather than
continuous.
Due to its broad scope which encapsulates as large number of sub-
ject/discipline, we may find it hard to concretely define what discrete math-
ematics is. In a way, discrete math extends to the study of sets, functions,
logic, proving, principles of counting etc.

1.2 Discrete Mathematics and Information Technology

The formal language that permeates information technology is the lan-


guage of predicate language. The connections between logic and computers
are a matter of engineering practice at every level of computer organization.
A computer program is viewed as a formula. A programming language, with
its formal syntax, is a formal system for which program execution provides
only a model (Roventa & Spircu, 2008).
Discrete is the underlying concept behind the information technology.
In this view, Mwendo (2019) says:

Nowadays, information technology has profoundly changed the


way we live and the way we think. Problems arising in the entire
3

spectrum of information technology have an increasing influence


on mathematics,and especially on discrete mathematics. Basically,
discrete mathematics is the branch of mathematics that studies
the underlying principles which govern discrete structures and the
binary universe. Such principles are essential and effective in the
implementation of algorithms, performance analysis, and informa-
tion management.
One of the current grand challenges is to gain an understanding
of large,diverse and complex discrete systems. To build a sound
scientific foundation for the information age requires collective in-
terdisciplinary efforts, to which discrete mathematicians can con-
tribute in numerous ways. Before discussing relevant topics, it is
worth mentioning several general aspects of discrete mathematics.

(a) Theory and techniques in discrete mathematics are well-coupled


with applications and implementations. For example, cod-
ing theory goes hand in hand with data compression, pro-
tocols and communication security. Graph theory is directly
involved in algorithmic design and analysis, performance anal-
ysis of communication networks, etc.

(b) A particular method can often be applied to many disparate


problems. For example, pattern matching occurs in problems
in computational biology and information retrieval, among
many other areas. Indeed, discrete mathematics can help
bring different areas together, and cross-fertilization typically
occurs.

(c) Discrete mathematics serves as a bridge linking mathematics


4

to communications and computing. For example, spectral


methods are increasingly used in graph algorithms for dealing
with massive data sets.Previously, a large part of traditional
mathematics has been heavily motivated by physics. With
information technology as the driving force,the golden age of
mathematics is right ahead of us if we can tap into the wealth
of knowledge of the past and create new mathematics for th
efuture. Discrete mathematics can play a key role in this
connection.

Here we briefly discuss some of the emerging topics in discrete


mathematics that present opportunities for the mathematical sci-
ences.In the networking field, while designing the routing algorithm
one must check the distance of the source and the destination. The
network packet should travel the shortest path in order to provide
faster network access. (pp. 4-5)

We can summarize this into:

1. In designing algorithms and developing logic, logical statements, math-


ematical proofs and induction will be used.

2. In calculating the run time of an algorithm, matrices, vectors and recur-


rence shall be used.

3. In the field of networking and mapping such as Google maps, Graph


theory is very essential.
5

Assessment 1.1

Name: Date:
Section:
Instruction: Create a summary on the topic ”What is Discrete Math” and
present the difference between discrete and continuous.

*See Appendix 1 on grading an Essay.


6

Assessment 1.2

Name: Date:
Section:
Instruction: Write an essay that explains the relationship between discrete
mathematics and the information technology. Provide some examples in the
essay where an IT concept has an underlying discrete math concept.

*See Appendix 1 on grading an Essay.


CHAPTER 2

SETS : AN OVERVIEW

At the end of this chapter, the student should be able to:

1. Identify basic criterion for a collection to be called a set.

2. Summarize basic and advance set notations and as well as common and
special sets.

3. Analyze cardinalities of sets, relationship between sets.

4. Identify and solve set operations and apply such to create a Venn dia-
gram.

The most fundamental objects we will use in our studies (and really
in all of math) are sets. Much of what follows might be review, but it is
very important that you are fluent in the language of set theory. Most of the
notation we use below is standard, although some might be a little different
than what you have seen before. For us, a set will simply be an unordered
collection of objects. Two sets are equal exactly if they contain the exact same
elements. For example, the set containing all of the vowels in the declaration
of independence is precisely the same set as the set of vowels in the word
“questionably” (namely, all of them); we do not care about order or repetitions,
just whether the element is in the set or not.

2.1 Set Definition


Definition 2.1 (Set)
A set is a collection of well-defined distinct objects.
8

Based on this definition, there two criteria for a set. The first criterion
is that a set is a collection. Collection can be any as long as it is not an
abstract. The second criterion is that such collection of objects should be
clearly defined. This means that there should be a clear distinction whether
an object belongs to the set or not.
Example 2.2
The following are examples of a set:

1. The collection of all municipalities in the Philippines.

2. The collection of the names of the males in a classroom.

3. The set of all car models.

4. The set of all subjects you take this semester.

In Example 2.2, these all satisfies the criterion for a set. Note that
municipalities are clearly define. We can distinguish which name of a place is
a municipality or not. For instance, Dumingag is a place and is contained in
the set since Dumingag is a municipality in the Philippines, Caridad is a place
but this is not a municipality, hence it is not contained in the set. Collection
of names of males is also clearly defined.
The following example shows a collection that does not satisfies the set
criteria:
Example 2.3
The following is not a sets:

1. The set of all good-looking classmates in your block.

In this example, good-looking is not absolute. This word is very relative


depending on one’s point of view. Hence, good-looking is not a clearly-define
9

rule that distinguish which name of a male belongs to the set or does not
belong to the set.

2.2 Set Notations

We need some notation to make talking about sets easier. Consider,

A = {1, 2, 3} .

This is read, ”A is the set containing the elements 1, 2 and 3.” We use curly
braces ”{, }” to enclose elements of a set. We use ”,” to separate the elements
in a set. Sets as usually denoted by uppercase English letters. A distinct
object in a set is referred to as element and is usually denoted by a lowercase
English alphabet.
Some more notation:
a ∈ {a, b, c}

The symbol ”∈” is read ”is in” or ”is an element of.” Thus the above means
that a is an element of the set containing the letters a, b, and c. Note that
this is a true statement. It would also be true to say that d is not in that set:

d∈
/ {a, b, c} .

Be warned:
We write ”x ∈ A” when we wish to express that one of the elements of the set
A is x. For example, consider the set,

A = {1, b, {x, y, z} , ∅} .

This is a strange set, to be sure. It contains four elements: the number


1, the letter b, the set {x, y, z} and the empty set ∅, the set containing no
elements. Is x in A? The answer is no. None of the four elements in A are
10

the letter x, so we must conclude that x ∈


/ A. Similarly, consider the set
B = {1, b}. Even though the elements of B are elements of A, we cannot say
that the set B is one of the elements of A. Therefore B ∈
/ A. (Soon we will
see that B is a subset of A, but this is different from being an element of A.)
We have described the sets above by listing their elements. Sometimes
this is hard to do, especially when there are a lot of elements in the set (perhaps
infinitely many). For instance, if we want A to be the set of all even natural
numbers, would could write,

A = {0, 2, 4, 6, ...} ,

but this is a little imprecise. A better way would be

A = {x ∈ N : x = 2n for some n ∈ N} .

Let’s look at this carefully. First, there are some new symbols to digest:
”N” is the symbol usually used to denote that natural numbers, which we
will take to be the set {1, 2, 3, ...}. Next, the colon, ”:”, is read such that; it
separates the elements that are in the set from the condition that the elements
in the set must satisfy. So putting this all together, we would read the set as,
”the set of all x in the natural numbers, such that there exists some n in the
natural numbers for which x is twice n.” In other words, the set of all natural
numbers, that are even. Here is another way to write the same set,

A = {x ∈ N : x is even} .

Note: Sometimes mathematicians use | for the ”such that” symbol


instead of the colon. This notation is usually called set builder notation.
It tells us how to build a set by telling us precisely the condition elements
must meet to gain access (the condition is the logical statement after the ”:”
11

symbol). Reading and comprehending sets written in this way takes practice.
Here are some more examples:
Example 2.4
Consider the following sets. Describe each set in statement form and write the
elements of each set in a list.

1. A = {x ∈ N|x = 2b + 1 for some b ∈ N}

2. B = {x ∈ N|2 ≤ x < 9}

3. C = x ∈ N| x5 = a for some a ∈ N


4. D = {x ∈ N|x < 1}

Solution:
The sets enumerated in Example 2.4 are all written in a set builder form. We
will describe this set both in statement form and in listing form. Note that all
sets are taken from the natural numbers as indicated by x ∈ N which is read
as x is natural number or shall we say that x is taken from the set of natural
numbers N.

1. The elements of set A is taken from the natural numbers such that such
numbers are in the form of 2b + 1 where b is any natural number. To
illustrate, suppose b = 1 since 1 is a natural number, then x = 2b + 1 =
2(1) + 1 = 3. Hence, when b = 1, then x = 3. To illustrate further,
consider the following table,

b x
1 3
2 5
3 7
4 9
.. ..
. .
12

This implies that x are the odd numbers in the natural numbers except
1. Therefore, we can read the set A as the set of all natural numbers
that are odd except 1. We can list this as

A = {3, 5, 7, 9, 11, · · · } .

2. The elements of set B is also taken from the set of natural numbers.
However, the elements are restricted from 2 inclusive to 9 exclusive.
This mean that the natural numbers that we will get is from 2 until 8
only since 9 is not included. Thus, in statement form, we can say that
set B is a set of natural numbers from 2 inclusive to 9 exclusive. We can
list the elements as
B = {2, 3, 4, 5, 6, 7, 8} .

3. The elements of set C is also taken from the set of natural numbers.
x
However, the elements that we have to select are those in the form a = 5
1
for some natural numbers a. This means that if x = 1, then a = 5
is not
1
included in the set since 5

/ N. This is also the same case for a = 2, 3, 4.
5
But if x = 5, we have a = 5
= 1. Since 1 ∈ N, then 5 ∈ C. To illustrate
further, we have the following table,

x a a is a natural number?
1
1 5
No
2
2 5
No
3
3 5
No
4
4 5
No
5
5 5
=1 Yes
6
6 5
No
7
7 5
No
8
8 5
No
9
9 5
No
10
10 5
=2 Yes
13

Based on this illustration, the only time when a yields to a natural


number is when x is divisible by 5. Hence, we can say that the set C is
a set of all natural numbers that are divisible by 5. In listing form, we
have
C = {5, 10, 15, 20, 25, ...} .

4. The elements of set D is also taken from the set of natural numbers.
However, the elements are restricted 1 exclusive. This means that 1 is not
included. However, as we had noted already, the set of natural numbers
started from 1. Hence, D contains no elements. Thus, in statement
form, we can say that set D is a set of natural numbers less than 1. In
listing form,
D = {} .

To avoid confusion, the set {} is the same as ∅ which we indicate as the


empty set.

Aside from N, there are also many fields of numbers where a number
can be taken from. The following are some special sets.

2.3 Special Sets

In the theory of Numbers, there are several sets which can be a field.
The following are some of the fields of numbers which we give emphasis as
part of special sets.

∅ is a set that contains no elements.

U is a set of all elements contained in each given set.

N is the set of all counting numbers.


14

Z is the set of all integers.

Q is the set of all rational numbers.

Q0 is the set of all irrational numbers.

R is the set of all real numbers.

C is the set of all complex numbers.

P(A) is the set of all subsets of A.

To make some distinction between these sets of numbers, we will start


from the set of complex numbers C. This set of numbers is in the form of
a + bi where a, b are all real numbers. a here is called the real part while bi is

the imaginary part. Example −2 + i, 2 + π − i, 1 + 0i, 0 + 5i, −1.5, etc. In
fact all numbers can be express as a + bi. For instance, 3 can be express as
3 + 0i. Hence all numbers are complex.
If we collect all complex numbers where the imaginary part is 0i, then
what remains is just the real part. Such set of numbers is called the real

numbers R. Example of real numbers are 0, 43 , −2.4, 2, π, etc.
The set of real numbers can be partitioned into two: the set of rational
numbers Q and the set of irrational numbers Q0 . If a real number can be
expressed as a ratio of two whole numbers, that is can be expressed as a
fraction of two whole numbers, then we call such set as rational numbers Q.
If a real number cannot be expressed as a ratio of two whole numbers, that
is a fraction of two whole numbers, then we call such numbers as irrational
numbers Q0 . Example of rational numbers are 1, 0, 13
1
, 0.9, etc. Examples
√ √ √
or irrational numbers are π, 2, 3, 5, e, etc. Note: e is called the Euler’s
number.
In the set of rational numbers, some are whole numbers and some are
15

not. If we collect all rational numbers that are whole numbers, we call such
number as integers Z. Examples of integers are −5, −6, −10, 0, 3, 7, 1000000,
etc.
In the set of integers, if we collect all positive integers, we call such set
as natural number of counting numbers N.
If we says that x ∈ R, this mean that the element x is a real number.
On the other hand, if x ∈ Z, then x is an integer. Now it is time to associate
this with our sets.
Example 2.5
Consider the following sets. Write the following in a list and in set builder.

1. A: The set of all integers that greater than -5 but less than or equal to
0.

2. B: The set of all real numbers from -6 exclusive to 9 inclusive that are
divisible by 3.

Solution:

1. Set A is taken from the set of integers. We let x to be any arbitrary


element of A. Thus we say that x ∈ Z. We note that x is greater than 5
but less than or equal to 0. Hence, the set builder form can be written
as
A = {x ∈ Z : −5 < x ≤ 0} .

Now, for the list of this set, note that x is an integer, that is a whole
number. To say that x is greater than -5 means that -5 is not included.
Therefore,
A = {−4, −3, −2, −1, 0} .
16

2. Set B is taken from the set of real numbers. If y is any arbitrary element
of B, then y ∈ R. Now since y is restricted from -6 to 9, then we say,
y
−6 < y ≤ 9. Finally, since y is divisible by 3, then we say that 3
= z for
some z ∈ Z. Putting this together, we have
n y o
B = y ∈ R : −6 < y ≤ 9 and = z for some integer z. .
3

The elements of this set can be written in a a list as shown below:

A = {−3, 0, 1, 3, 6, 9} .

Note that from -6 to 9, only the numbers above are divisible by 3.

It is also important to note that a number is prime if it is divisible


by 1 and itself only. Examples of prime are 2, 3, 5, 7, 11, 13, 17, etc. These
numbers are only divisible by 1 and itself. If x is prime, then x - a for all
a 6= x. On the other hand, a number is composite if it is divisible by another
whole number. Example of composite numbers are 4,6,8,9,10,12,14,15, etc.
These numbers can be divided by another whole number. If x is composite,
then x | a for some a 6= x
Try to solve the following items below.
Exercise 2.6
1. The following sets are in a set builder form. Write each set in a state-
ment form and in listing form.

(a) X = {x ∈ N : x = n for some natural numner n.}

(b) Y = {m ∈ Q : m for some natural numner n.}

2. The following sets are in a statement form. Write the set in listing form
and set builder form.
17

(a) M : The set of all odd natural numbers less than 15 that are prime.

(b) N : The set of all even integers that less than or equal to 10 but
greater than or equal to -10.

3. The following are a list of the elements of a set. Write it in a set builder
and in a statement form.

(a) J = {11, 13, 17, 19, 23}.

(b) I = {−14, −7, 0, 7, 14, 21, 28, ..}.

Our discussion in sets not only encompass on number. Recall that set
is any collection of clearly define objects. It may not be a number. Consider
the example below:
Example 2.7
Let V be the collection of vowels in the English alphabet. Then we can write
the set V as:
V = {a, e, i, o, u}.

This is because, the elements a, e, i, o, u are the vowels in the English


alphabet.

2.4 Relationship Between Sets

Consider the set


A = {a, b, c} .

Notice that set A has three elements namely a, b, c. If we write B = {b, a, c},
we can say that A and B contains the same elements. Can we say that A and
B is just the same set? Definitely yes! Two sets are equal if they contain the
same elements. If we have C = {c, b, a}, then C is just the same set as B and
A.
18

However, if we have set D = {a, b}, then can we still say that A and D
is just the same set? Definitely not! This is because, D did not contained the
element c which is in A. But we can note that all elements in D is contained
also in A, that is, a, b ∈ D and a, b ∈ A. In this case we call D as a proper
subset of A. The symbol we used for proper subset is ⊂.
Definition 2.8
Let A and B be sets. If all elements of B is contained in A but not all elements
of A is contained in B, then we say B is a proper subset of A, that is, B ⊂ A.

Example 2.9
Let A = {1, 2, 3, 4, 5} and B = {1, 4, 5}. Since all elements of B is contained
in A but not all elements of A is contained in B, then surely B ⊂ A. Notice
also that C = {2, 3} is a proper subset of A, and D = {1} is also a proper
subset of A.

From Example 2.9, what are other proper subsets of A?


Definition 2.8 tells us also that A contained all the elements of B. We
can say that A is a superset of B, that is, A ⊃ B.
Remark 2.10
From Definition 2.8, if all elements of B are contained in A, the we denote
B ⊆ A. We mean to say that B is a subset or equal to A.

Theorem 2.11
The following are some properties of a subset:

1. Every set is a subset of the set itself, that is, A ⊆ A.

2. The empty set ∅ is considered a subset of any given set.

3. If X ⊆ Y and Y ⊆ Z, then X ⊆ Z.
19

Proof :

1. Let a ∈ A. Since a ∈ A, then A ⊆ A.

2. Suppose B = {} and B * A, there there exist element in B say m such


that m ∈ A. But B does not contain any element. A contradiction.
Hence, B = {} ⊂ A.

3. Let x ∈ X. Since, X ⊆ Y , then x ∈ Y . Also, since Y ⊆ Z, then x ∈ Z.


Therefore, X ⊆ Z.
Example 2.12
Let A = {1, 2, 3, 4, 5, 6}, B = {2, 4, 6},C = {1, 2, 3}, D = {7, 8, 9} Determine
which of the following are true, false, or meaningless.

1. A ⊂ B 4. ∅ ∈ A 7. 3 ∈ C

2. B ⊂ A 5. ∅ ⊂ A 8. 3 ⊂ C

3. B ∈ C 6. A < D 9. {3} ⊂ B

Solution:

1. False. For example, 1 ∈ A but 1 ∈


/ B.

2. True. Every element in B is an element in A.

3. False. The elements in C are 1, 2, and 3. There is no element B in C.

4. False. A has exactly 6 elements, and none of them are the empty set.

5. True. Everything in the empty set (nothing) is also an element of A.


Notice that the empty set is a subset of every set.

6. Meaningless. A set cannot be less than another set.


20

7. True. 3 is one of the elements of the set C.

8. Meaningless. 3 is not a set, so it cannot be a subset of another set.

9. True. 3 is the only element of the set {3}, and is an element of C, so


every element in {3} is an element of C.
Theorem 2.13
Suppose A ⊆ B and B ⊆ A, then A = B.

This theorem tells us that two sets are equal if they are subsets one of another.
Example 2.14
Consider N and Z+ , where Z+ is the set of all positive integers. Note that
N ⊆ Z+ since all natural numbers are positive integers. Also Z+ ⊆ N since all
positive integers are natural numbers. Hence, N = Z+ .

2.5 Cardinality of a Set

In the theory of sets, we are often interested to know how many elements
are contained in a set. Knowing the size of a set gives us another approach in
comparing a set a another set. This is called cardinality of a set.
Definition 2.15
Let A be a set. The size of set A, that is the number of elements in a A is
called the cardinality of A. This is denoted as |A|.

Example 2.16
Consider set X = {a, b, c, 1, 2, 3}. If we count the number of elements in
this set, we can see that there are six unique elements contained in X. Thus
|X| = 6.

For sets that have a finite number of elements, the cardinality of the
set is simply the number of elements in the set. Note that the cardinality of
21

{1, 2, 3, 2, 1} is 3. We do not count repeats (in fact, {1, 2, 3, 2, 1} is exactly the


same set as {1, 2, 3}). There are sets with infinite cardinality, such as N, the
set of rational numbers (written Q), the set of even natural numbers, and the
set of real numbers (R). It is possible to distinguish between different infinite
cardinalities, but that is beyond the scope of this text. For us, a set will either
be infinite, or finite; if it is finite, the we can determine its cardinality by
counting elements.
Example 2.17
1. Find the cardinality of A = {23, 24, · · · 37, 38}.

2. Find the cardinality of B = {1, {2, 3, 4} , ∅}.

Solution:

1. Since 38 − 23 = 15, we can conclude that the cardinality of the set is


|A| = 16 (you need to add one since 23 is included).

2. Here |B| = 3. The three elements are the number 1, the set {2, 3, 4},
and the empty set.

2.6 Power Sets

Recall that if, A = {a, b, c}, we can have many subsets such as B =
{a, b, c}, E = {a, b}, F = {a, c}, G = {b, c}, H = {a}, I = {b}, and J = {c}.
If we collect all subsets of a set and put them together in a set, we call such a
set as power set.
Definition 2.18
Let A be a set. The collection of all subsets of A is called the power set,
indicated as P(A).
22

Example 2.19
Let A {1, 2, 3}. Find P(A).

Solution: P(A) is a set of sets, all of which are subsets of A. So

P(A) = {∅, {1} , {2} , {3} , {1, 2} , {1, 3} , {2, 3} , A} .

Notice that while 2 ∈ A, it is wrong to write 2 ∈ P(A) since none of the


elements in P(A) are numbers! On the other hand, we do have {2} ∈ P(A)
because {2} ⊆ A. What does a subset of P(A) look like? Notice that {2} *
P(A) because not everything in {2} is in P(A). But we do have {{2}}P(A).
The only element of {{2}} is the set {2} which is also an element of P(A).
We could take the collection of all subsets of P(A) and call that P(P(A)). Or
even the power set of that set of sets of sets.

2.7 Set Operations

Is it possible to add two sets? Not really, however there is something


similar. If we want to combine two sets to get the collection of objects that
are in either set, then we can take the union of the two sets.
Definition 2.20
The union of sets is the set of all elements belonging to either of the sets.

We use the symbol ∩ for union of sets.


Symbolically,
C =A∪B

read, “C is the union of A and B,” means that the elements of C are exactly the
elements which are either an element of A or an element of B (or an element of
both). For example, if A = {1, 2, 3} and B = {2, 3, 4}, then A ∪ B{1, 2, 3, 4}.
The other common operation on sets is intersection.
23

Definition 2.21
The intersection of sets is the set that contains all the elements that are com-
mon in the all sets.

We use the symbol ∩ for set intersection. We write,

C =A∩B

and say, “C is the intersection of A and B,” when the elements in C are
precisely those both in A and in B. So if A = {1, 2, 3} and B = {2, 3, 4}, then
A ∩ B = {2, 3}.
Often when dealing with sets, we will have some understanding as to
what “everything” is. Perhaps we are only concerned with natural numbers.
In this case we would say that our universe is N. Sometimes we denote this
universe by U. Given this context, we might wish to speak of all the elements
which are not in a particular set.
Definition 2.22
The complement of a set A is the set B which contains all elements in the
universal set that is not contained in the set A.

We say B is the complement of A, and write,

B = Ā

when B contains every element not contained in A. So, if our universal set U
is {1, 2, · · · 9, 10}, and A{2, 3, 5, 7}, then Ā = {1, 4, 6, 8, 9, 10}.
Of course we can perform more than one operation at a time. For
example, consider
A ∩ B̄.
24

This is the set of all elements which are both elements of A and not elements
of B. What have we done? We’ve started with A and removed all of the
elements which were in B.
Definition 2.23
Let A, B be sets. The set difference A \ B is the set of all elements in A which
are not contained in B.

The set difference is the set

A \ B = A ∩ Ā.

It is important to remember that these operations (union, intersection, com-


plement, and difference) on sets produce other sets. Don’t confuse these with
the symbols from the previous section (element of and subset of). A ∩ B is a
set, while A ⊆ B is true or false.
There is one more way to combine sets which will be useful for us: the
Cartesian product, A × B. This sounds fancy but is nothing you haven’t seen
before. When you graph a function in calculus, you graph it in the Cartesian
plane. This is the set of all ordered pairs of real numbers (x, y). We can do
this for any pair of sets, not just the real numbers with themselves.
Definition 2.24
The Cartesian Product of sets A and B, is the set

A × B = {(ab) : a ∈ A and b ∈}.

The first coordinate comes from the first set and the second coordinate comes
from the second set.

Sometimes we will want to take the Cartesian product of a set with itself, and
this is fine: A × A = {(a, b) : a, b ∈ A} (we might also write A2 for this set).
25

Notice that in A × A, we still want all ordered pairs, not just the ones where
the first and second coordinate are the same. We can also take products of 3
or more sets, getting ordered triples, or quadruples, and so on.
Example 2.25
Consider the following sets:

1. A : x ∈ Z+ : x ≤ 6.

2. B: The set of all positive even numbers less than or equal to 10.

3. C : x ∈ Z : −4 < x < 4.

4. D : Set of all odd numbers from −3 exclusive to 5 inclusive.

5. E : Set of all positive prime numbers less than 7.

Write the sets in Roster form and do the following operations:

1. A ∪ C 3. D ∩ E 5. B ∩ D

2. A ∪ E 4. A × D 6. B \ A

Solution:
We can write the sets as:

1. A = {1, 2, 3, 4, 5, 6}

2. B : {2, 4, 6, 8, 10}

3. C : {−3, −2, −1, 0, 1, 2, 3}

4. D : {−1, 1, 3, 5}

5. E : {2, 3, 5}
26

Now, we will solve

1. A ∪ C

A ∪ C = {1, 2, 3, 4, 5, 6} ∪ {−3, −2, −1, 0, 1, 2, 3}

= {−3, −2, −1, 0, 1, 2, 3, 4, 5, 6}

2. A ∪ E

A ∪ E = {1, 2, 3, 4, 5, 6} ∪ {2, 3, 5}

= {1, 2, 3, 4, 5, 6}

3. D ∩ E

D ∩ E = {−1, 1, 3, 5} ∩ {2, 3, 5}

= {3, 5}

4. A × D

A × D = {1, 2, 3, 4, 5, 6} × {−1, 1, 3, 5}

= {(1, −1), (1, 1), (1, 3), (1, 5), (2, −1), (2, 1),

(2, 3), (2, 5), (3, −1), (3, 1), (3, 3), (3, 5),

(4, −1), (4, 1), (4, 3), (4, 5), (5, −1), (5, 1),

(5, 3), (5, 5), (6, −1), (6, 1), (6, 3), (6, 5)}

5. B ∩ D

B ∩ D = ({2, 4, 6, 8, 10} ∩ {−1, 1, 3, 5})

= (∅)

=A∪B∪C ∪D∪E

= U.
27

6. B \ C

B \ C = {2, 4, 6, 8, 10} \ {−3, −2, −1, 0, 1, 2, 3}

= {4, 6, 8, 10} .

2.8 Venn Diagram

There is a very nice visual tool we can use to represent operations on


sets.
Definition 2.26
A Venn diagram displays sets as intersecting circles. We can shade the region
we are talking about when we carry out an operation.

We can also represent cardinality of a particular set by putting the


number in the corresponding region.
Each circle represents a set. The rectangle containing the circles rep-
resents the universe. To represent combinations of these sets, we shade the
corresponding region. Here are the ways how to draw the Venn Diagram.

A B

Figure 2.1: Union of Two Sets

The union of these two sets takes all elements of both sets. In drawing
the Venn diagram for the union, all shade all the region of the sets included
28

in the union. In this case, since we take the union of sets A and B, we shade
all the regions of both sets A and B.
Below is the Venn diagram for intersection.

A B

Figure 2.2: Intersection of Two Sets

The intersection of two sets is just a collection of elements that are


common to both sets. Hence, in drawing the Venn diagram for the intersection,
shade all the regions that are common to all the sets. Note, this is not pairwise
intersection but intersection of all sets.

A B

B−A

Figure 2.3: Set Difference

In set difference, shade the region of the set that excludes all the in-
tersections. In this case, we have B \ A, we have to shade the region in B
excluding the intersection of B and A.
For more discussions on Venn Diagrams, don’t miss our classes.
29

Assessment 2.1
Name: Date:
Section:
Instruction: Consider the following sets. Write each statement in set builder
form and listing form.

1. I = the set of all positive odd integers less than or equal to 19.

Solution:

2. T = the set of all nonpositive even integers greater than or -12.3

Solution:

3. K = the set of all odd counting numbers between 3.5 and 51 inclusively
that are divisible by 3.

Solution:

4. O = the set of all counting numbers less than or equal to 28 that are not
divisible by 4.

Solution:

5. B = the set of all rational numbers that between 2.3 and 83.5 that are
both divisible by 2 and 3.

Solution:

6. A= the set of all real numbers between -15.9 to 16.8 that are both di-
visible by 3 and 5.

Solution:

7. Y = the set of all even natural numbers between 2 to 500 exclusively that
are divisible by 3,5, and 7.

Solution:
30

Assessment 2.2

Name: Date:
Section:
Instruction: Consider the following sets:

1. A = the set of all unique letters in the phrase, “ welcome to discrete


mathematics”.

2. B = {∅, {0, ∅} , 0} .

3. C = the set of all integers between -6.3 to 5 inclusive.

Do the following:

1. Write all subsets of sets A, B, C.

Solution:

2. Calculate the cardinalities of sets A, B, C.

Solution:

3. Calculate P(P(B)).

Solution:
31

Assessment 2.3

Name: Date:
Section:
Instruction: Consider the following sets:

1. A = {k ∈ N : k ≤ 20} 2. B = {3k − 1 : k ∈ N} 3. C = {2k − 1 : k ∈ N}

Determine the following sets and draw the Venn Diagram:

1. (A ∩ C) \ B

Solution:

2. A \ (A \ B)

Solution:

3. Calculate A ∩ (B \ A).

Solution:
APPENDICES

Appendix 1: Rubrics for Grading an Essay


BIBLIOGRAPHY

[1] Josphat Mwendo. (2019). The Relationship Between Discrete Mathemat-


ics And Computer Science. Computer Science and Discrete Mathematics.

[2] Lecture Notes on Discrete Mathematics.(n.p). https://home.iitk.ac.in/ ar-


lal/book/mth202.pdf

[3] Levin, O. (2021). Discrete Mathematics: An Open Introduction(3rd


ed.).(n.p). https://discrete.openmathbooks.org/pdfs/dmoi-tablet.pdf

[4] Roventa, E, Spircu, T. (2008). The Central Role of Discrete Math-


ematics in the Context of Information Technology and Communi-
cations. Conference Paper: Annual Meeting of North American.
DOI:10.1109/NAFIPS.2008.4531270

You might also like