0% found this document useful (0 votes)
2K views126 pages

COMP-20043 Discrete Structure

This document provides an overview of propositional logic. It defines key concepts like propositions, simple statements, complex statements, and logical connectives like negation, conjunction, disjunction, conditionals, and biconditionals. Examples are given for how to symbolize English statements using propositional logic. The objectives are to discuss propositional logic concepts and applications, differentiate simple and complex sentences, and convert statements between informal English and propositional logic symbols.
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)
2K views126 pages

COMP-20043 Discrete Structure

This document provides an overview of propositional logic. It defines key concepts like propositions, simple statements, complex statements, and logical connectives like negation, conjunction, disjunction, conditionals, and biconditionals. Examples are given for how to symbolize English statements using propositional logic. The objectives are to discuss propositional logic concepts and applications, differentiate simple and complex sentences, and convert statements between informal English and propositional logic symbols.
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/ 126

Discrete Structures 1

COMP 20043

Compiled by:

Mariel Leo T. Violeta


Sherilyn B. Usero
Table of Contents

Lesson 1: Propositional Logic ........................................................................1

Lesson 2: Providing Techniques in Propositional Logic ..............................16

Lesson 3: Predicate Logic and Quantifiers .................................................30

Lesson 4: Set Concepts ...............................................................................44

Lesson 5: Relation and Its Properties ..........................................................54

Lesson 6: Basic Counting Principles ............................................................75

Lesson 7: Summation and Series ................................................................84

Lesson 8: Mathematical Induction ................................................................98

Lesson 9: Introduction to Graphs .............................................................. 104

i
LESSON 1: PROPOSITIONAL LOGIC

Overview
The rules of logic give precise meaning to mathematical statements. These rules
are used to determine the validity of the mathematical arguments. Computer science
needs to study logic. Logic has numerous applications. It can be used to design
computer circuits, construct computer programs, verify the correctness of programs, etc.
In this lesson, the concept and application of logic will be discussed.

Objectives
After successfully completing this lesson, the students should be able to:
• Discuss the concept and application of propositional logic.
• Differentiate simple and complex sentences.
• Convert logical statements from informal language to propositional and predicate
logic expressions.

Course Materials

Propositional Logic
A proposition is a declarative statement and propositional logic studies the
relationship between two or more propositions regardless of its content. Example, the
proposition “If the moon is made of cheese then basketballs are round,” and “if spiders
have eight legs then Anne walks with a limp” are exactly the same since they are both
implications: statements of the form, P→Q.

NOTE: A proposition expresses a judgement or opinion therefore, it has a truth value


(either true or false).

Example:
P: a grizzly is a bear.
Q: a bear is a mammal.
R: a grizzly is a mammal.

P&Q→R

Each proposition (also called atomic statement) can be combined with logical
connectives to form compound or complex statements.
~P, P & Q, P v Q, P = Q, P→Q

Simple and Complex Sentences


A simple statement contains no other statement as a part or has no addition of
another proposition. Simple sentences are symbolized by uppercase letters.

1|Page Propositional Logic


Examples:
● Polytechnic University of the Philippines is in Sta. Mesa, Manila.
● Noynoy Aquino was succeeded as President of the Philippines by Rodrigo Duterte.

A Complex sentence has at least one sentence and has one or more logical
connectives as a component. There are five types in propositional logic:
● Negations
● Conjunctions
● Disjunctions
● Conditionals
● Biconditional

Negations
A Negation asserts that something is not the case or it simply reverses a statement.
It is symbolized by placing this symbol ‘¬’ or ~’ before the sentence-letter.
For example, the negation of the statement “Polytechnic University of the
Philippines is in Sta. Mesa, Manila.” is “Polytechnic University of the Philippines is not in
Sta. Mesa, Manila.”
P: Polytechnic University of the Philippines is in Sta. Mesa, Manila.
¬P: Polytechnic University of the Philippines is not in Sta. Mesa, Manila.

The negation symbol stands for;


● not
● it is not the case that
● it is not true that
● it is false that

A negation is true whenever the negated sentence is false. If it is true that it is not
33 degrees outside, then it must be false that it is 33 degrees outside.
Note: When translating, try to keep the simple sentences positive in meaning. Also,
denying is not simply the negation of affirming.

Conjunction
Conjunctions are “and” sentences. They put two sentences together and claim that
they are both true. Conjunctions use the ampersand ‘&’ or ‘ ^ ‘ symbol or in some cases,
a dot.
Conjunction stands for;
● and
● but
● also
● however
● yet
● still
● moreover
● although
● nevertheless
● both

2|Page Propositional Logic


For example, the sentence ‘It is raining today and my sunroof is open’, in its symbolic form
is “R&O” or “R^Q” or “R•Q”.

Disjunction
A disjunction is an “or” sentence. It claims that at least one of two sentences are
true. It is represented by the symbol ‘∨’ which is called as “vel”.
For example, if I say that either I will go to the movies this weekend or I will stay
home and grade critical thinking homework, then I have told the truth provided that I do
one or both of those things. If I do neither, though, then my claim was false.
Disjunction stands for;
● or
● unless
● either
● neither

Conditional
A conditional (implication) statement becomes false if its hypothesis is true but the
conclusion is false. It is represented using the symbol “→”.
Example:
● If you will study tonight, then you will get a high score in our quiz tomorrow. (S→H)
● You will pass Discrete Mathematics, provided you study. (P→S)
The arrow translates many English words and phrases, including
● if
● if… then
● only if
● whenever
● when
● only when
● implies
● provided that
● means
● entails
● is a sufficient condition for
● is a necessary condition for
● given that
● on the condition that
● in case

Three forms of conditional statement


Using the conditional statement, “If it rains tonight, I will have a good sleep.”, our
P (hypothesis) is “It rains tonight” and our Q (conclusion) is “I will have a good sleep.”

1. Inverse - it simply negates the hypothesis and conclusion (¬P→¬Q) and if we


transform the example above, it will be;
“If it does not rain tonight, then I will not have a good sleep.”
2. Converse - in this form, we change the position of hypothesis and conclusion (Q
→P). Thus, the converse form of the given conditional statement will be;
“I will have a good sleep if it rains tonight.”

3|Page Propositional Logic


3. Contrapositive - in contrapositive form, we negate the converse form of the given
conditional statement (¬Q →¬P) so the statement will be;
“I will not have a good sleep if it does not rain tonight.”

NOTE: In a conditional statement, the order matters. Unlike in conjunction and


disjunction statements, changing the order or position of a conditional statement also
changes its meaning and truth value.
We need to consider which sentence goes before the arrow and which sentence
goes after. The sentence before the arrow is called the antecedent (hypothesis), and the
sentence after the arrow is called the consequent (conclusion). The words “If” and “then”
are not part of the antecedent and consequent.

Example : in the conditional statement, “If you will study tonight, then you will get a high
score in our quiz tomorrow”, our antecedent is “You will study tonight” and the consequent
is “You will get a high score in our quiz tomorrow.”

NOTE: In conditional statements, we also consider whether the condition is sufficient or


necessary.

Necessary and Sufficient Conditions


A sufficient condition is something that is enough to guarantee the truth of
something else. For instance, getting a final grade of B in Discrete Mathematics is
sufficient enough to pass.
A necessary condition is something that must be true in order for something else
to be true. For example, getting a final grade of B, alone, is not necessary to pass Discrete
Mathematics since there are different ways to pass the subject. Enrolling in that subject is
the necessary condition.

Note that:
● ‘If’ introduces antecedents, but Only if introduces consequents.
● If A is a necessary condition for B, then B→A.
● If A is a sufficient condition for B, then A→B

Biconditional
It is called a biconditional statement when something is both a necessary and a
sufficient condition for something else. It is represented using the symbol “↔”.
For example, completing all your requirements is both sufficient and necessary to
earn a degree. You can’t have a degree if you don’t complete all your requirements and
completing your requirements guarantees earning a degree.
● A↔B

NOTE: Similar to conjunction and disjunction statements, the order of the statement does
not matter in biconditional.
Here are some English phrases that signify biconditionals:
● it and only if
● when and only when
● just in case
● is a necessary and sufficient condition for

4|Page Propositional Logic


Translating English sentence into Propositional Logic
Propositional logic is composed of syntax and semantics. The syntax includes the
basic symbols of the language and the rules for putting together proper statements in the
language. Translating English sentences into propositional logic can be initialized with
sentence letters, which represent simple English sentences.

For example:
V: Victor hit the ball.
R: Reineil caught the ball.
L: Lucas chased the ball.

Using the simple statements above and logical operators, we can construct
complex statements.

For example;

Victor did not hit the ball = ¬V


Either Victor hit the ball or Reineil caught the ball = V ∨ R
Lucas chased the ball, but Reineil caught it. = L ∧ R
If Reineil caught the ball, then Lucas did not chase it. = R→¬L
Lucas chased the ball if and only if Victor hit the ball. = L↔V

Formula Main Operator Sentence Type


P None Simple
¬P&Q & Conjunction
¬(P&Q) ¬ Negation
P∨(Q→R) ∨ Disjunction
[(P&¬Q)↔R]→P → Conditional

5|Page Propositional Logic


EXERCISE I

1. Which of the following are propositions?


a. Study Hard!
b. The Apple Macintosh is a 16-bit computer.
c. 1 is an even number.
d. Why are we here?
e. 8 + 7 = 13
f. All of the above
g. Letters b,c, d, e

2. p is "x < 50"; q is "x > 40".


Write as simply as you can:
a. ¬p
b. ¬q
c. p ∧ q
d. p ∨ q
e. ¬p ∧ q
f. ¬p ∧ ¬q

3. What is the formula of this sentence type: "Conjunction"?


a.¬(P&Q)
b.¬P&Q
c.P
d.P∨(Q→R)

4. What is the formula of this sentence type: "Disjunction"?


a.¬(P&Q)
b.¬P&Q
c.P
d.P∨(Q→R)

5. What is the formula of this sentence type: "Simple"?


a.¬(P&Q)
b.¬P&Q
c.P
d.P∨(Q→R)

6|Page Propositional Logic


Syntax and Semantics of Propositional Logic

The “syntax” of a language refers to the “form” of the expressions such as words,
sentences, and the like. The “semantics” of a language refers to the content, or meaning
of expressions. Even though syntax and semantics have a strong correlation, it shall be
treated quite distinctly.

Syntax
The syntax of propositional logic is composed of the rules in generating complex claims
from simple ones. Basically, the Syntax of Propositional Logic is by using logical
connectives and operators (which connect or operate on propositions)

In symbols, use letters (P, Q, R, … X, Y, Z) to stand for specific statements.

- Unary Propositional Operator: ~ or ¬


- Binary Propositional Connectives: ∧ or • , V, ⇒ , ⇔
- Grouping Symbols: ( ) , [ ]

Wherein:
- Negation: ~ or ¬
- Conjunction; and: ∧ or •
- Disjunction; or: V
- Material Implication; if...the…: ⇒
- Biconditional; if and only if: ⇔

How to determine whether a Propositional Logic is in its Well-formed


Formula (WFF) or not

1. Any capital letter by itself is a Well-Formed Formula.


2. Any WFF can be prefixed with “~”. (The result will be the same.)
3. Any two WFFs can be put together with “•”, “∨”, “⊃”, or “≡” between them, enclosing
the result in parentheses. (This will be a WFF too.)

Examples of well-formed formula;

7|Page Propositional Logic


Examples of not well-formed formula;

NOTE:
Parentheses are very important. For instance, ~(P ∧ Q) is different from ~P ∧ Q.

Semantics
Semantic rules of Propositional Logic tell us how the meaning of its constituent
parts, and their mode of combination, determine the meaning of a compound statement.
This meaning represents its truth value. Logical operators determine what the truth-values
of compound statements are depending on the truth-values of the formulae in the
compound.

Example:
Intuitively, the meaning of “A ∧ B” is that
“this is only true if both A and B are true”.

The precise semantics of the logical connectives NOT ¬, AND ∧, OR ∨,


IMPLICATION ⇒, and BICONDITIONAL ⇔ is defined by Truth Tables.

8|Page Propositional Logic


Truth Table of Propositional Forms

● A truth table shows all the possible truth values of a given proportion.
● The number of possible outcomes or the row is determined by the formula 2 raised
to n, where n stands for the number of variables present in the given statement.

1. Negation (NOT “¬”)


● The truth value p is false only if ¬p is true. Likewise, the truth value of ¬p is true if
and only if p is true.

P ¬P
T F
F T

Example:
P: Today is raining.
¬P: Today is not raining.

2. Conjunction (AND “^”)


• This proposition is true if and only if both statements are true.

Example:

P Q P^Q
T T T
T F F
F T F
F F F

3. Disjunction (OR “ν”)


● This proposition is false if and only if both statements are both false.

P Q PνQ
T T T
T F T
F T T
F F F
4. Implication (Conditional Statement “→”)
● This proposition is false if and only if P (hypothesis) is true and Q (conclusion) is
false.

P Q P→Q
T T T
T F F
F T T
F F T

9|Page Propositional Logic


5. Inverse Statement
● The inverse of a conditional statement is the negated conditional statement (~P →
~Q).

P Q ~ P → ~Q
T T T
T F T
F T F
F F T

6. Converse Statement
● The converse of a conditional statement is the compound proposition “if Q then P”.

P Q Q→P
T T T
T F T
F T F
F F T

7. Contrapositive Statement
● The contrapositive of a conditional statement is the compound proposition
“if not Q then not P”

P Q ~ Q →~P
T T T
T F F
F T T
F F T

8. Biconditional Statement (↔)


● This proposition is true whenever p and q have the same truth value.

P Q P↔Q
T T T
T F F
F T F
F F T

NATURE OF PROPOSITION

1. Tautology (P P) - a proposition that is always true for all possible truth values
of its propositional variables. It contains only T (true) in the last column of its truth
table

10 | P a g e Propositional Logic
2. Contradiction (P P) - a proposition that is always false for all possible truth
values of its propositional variables. It contains only F (false) in the last column of
its truth table
3. Contingency (P Q) - a proposition that is neither a tautology nor a contradiction.
It contains both T (true) and F (false) in the last column of its truth table.

EXERCISE II

1. Construct the truth table for P Λ (Q ∨ R)


2. Construct the truth table for (P Λ Q) ∨ R
3. Construct the truth table for (P ∧ ¬Q) ∨ ¬P
4. Construct the truth table for P ⇒ (Q ∨ ¬R)
5. Construct the truth table for ¬((¬P ⇒ Q) ∨ (P ⇒ R)

11 | P a g e Propositional Logic
Logically Equivalent Statements

Two compound propositions or statements are said to be logically equivalent if


both have the same truth value for all possible combinations of truth values of its
propositional variables. Logical equivalence uses the symbol “≡”. For example, let’s
construct a truth table for each of the following statements;
1. If you eat all the food on the table, then you will feel full ( P→Q).
2. You don’t eat all the food on the table or you will be full (¬P ν Q).

Truth table for statement #1


P Q P→Q
T T T
T F F
F T T
F F T

Truth table for statement #2


P Q ~P PvQ

T T F T

T F F F

F T T T

F F T T

Notice that the end results of the two statements both have the same truth values,
therefore P→Q ≡ ¬P ν Q.

12 | P a g e Propositional Logic
EXERCISE III

Write Each Statement in Symbolic Notation.


C: Critical thinker
D: Dota Player
S: Studying well

1. Von is a Dota Player.


2. If Miguel is a Critical Thinker and not Studying Well, then he is a Dota Player.
3. Sae is Studying Well and a Dota Player.
4. What Is the negation of the statement that All cows eat grass?
a. All cows eat grass
b. Not all cows eat grass
c. Cats and Birds are Cows
d. Neither the Cows nor the grass is yellow
5. Suppose p = You tell everyone to just support the government and q = You are
blinded by your privilege, what symbolic notation is correct for "If you tell everyone
to just support the government then you are blinded by your privilege"?
a. p→q
b. ¬p∧q
c. q↔p
d. None of the above

13 | P a g e Propositional Logic
Assessment

1. p is "January is the second month of the year."


q is " 12 months is equivalent to one year".
Express the following compound propositions as English sentences in as natural
a way as you can. Are the resulting propositions true or false?
a. p ∧ q
b. p ∨ q
c. ¬p
2. In each part of this question a proposition p is defined. Which of the statements that follow
the definition correspond to the proposition ¬p?
a. p is "Today is Monday".
(i) " Today is Tuesday. "
(ii) "Today is not Monday."
(iii) "Today is not Tuesday."
b. p is "The answer is either A or B".
(i) "Neither A nor B is the answer"
(ii) "The answer is not A or it is not B"
(iii) "The answer is not A and it is not B"
3. Consider the formula ¬P v ¬Q. Construct its truth table.
4. Consider the formula ¬P ^ ¬Q. Construct its truth table.
5. Consider the formula (P ∧ (Q ⇒ R)) ⇒ S. Construct its truth table.
6. Consider the formula (A ∧ (A ⇒ B)) ⇒ B. Construct its truth table
7. Consider the formula ((A ⇒ B) ∧ (B ⇒ C)) ⇒ (A ⇒ C). Construct its truth table.

8-10. The following variables are defined:


F is "… is a friend of mine"
W is "… is wealthy"
C is "… is clever"
B is "… is boring"

Translate the following sentences in its symbolic form;


8. Saesha is wealthy but not clever.
9. Both John and Paul are friends of mine.
10. If Adriane is a friend of mine, then he is not boring

14 | P a g e Propositional Logic
References
Estella, M. (2020) Introduction to Truth Tables, Statements, and Logical Connectives. Retrieved
from:
https://www.chilimath.com/lessons/introduction-to-number-theory/intro-to-truth-tables-
statements-and-connectives/

Geeks for Geeks (n.d.). Mathematics | Introduction to Propositional Logic | Set 1. Retrieved from
https://www.geeksforgeeks.org/proposition-logic/

Hershey, J. (2019, February 15) Well-formed Formulas (WFFs) of Propositional Logic.


Retrieved from
http://www.skillfulreasoning.com/propositional_logic/well-formed_formulas.html

Klement, Kevin C. (n.d.). Propositional Logic. Retrieved from


https://www.iep.utm.edu/prop-log/

Levin, O. (ND) Discrete Mathematics: An Open Introduction. Propositional Logic. Retrieved from
http://discrete.openmathbooks.org/dmoi2/sec_propositional.html

Ikenaga, B. (2019) Truth Tables, Tautologies, and Logical Equivalences. Retrieved from
http://sites.millersville.edu/bikenaga/math-proof/truth-tables/truth-tables.html

Manwani, C. (ND) Mathematics | Introduction to Propositional Logic | Set 1. Retrieved from


https://www.geeksforgeeks.org/proposition-logic/

Popov, N. & Jebelean, T. (ND) Mathematical Logic, Propositional Logic. Syntax and Semantics.
Retrieved from
https://www3.risc.jku.at/education/courses/ws2012/logic-1/Logic-2012-10-11.pdf

Pursuing Truth: A Guide to Critical Thinking. Chapter 4 Propositional Logic (ND) Retrieved from
https://bookdown.org/rlridenour/ct-text/propositional-logic.html

Stemwedel, J. (2010, September 24) Syntax and semantics of propositional logic. Retrieved
from
https://www.slideshare.net/docfreeride/syntax-and-semantics-of-propositional-logic

Thangarajah, P. (2019, October 4) Compound Statements. Retrieved from


https://math.libretexts.org/Courses/Mount_Royal_University/MATH_1150%3A_Mathematic
al_Reasoning/1%3A_Basic_Language_of_Mathematics/1.1%3A_Compound_Statements

Varsity Tutors (2007). Converse, Inverse, Contrapositive. Retrieved from


https://www.varsitytutors.com/hotmath/hotmath_help/topics/converse-inverse-contrapositive

15 | P a g e Propositional Logic
LESSON 2: PROVIDING TECHNIQUES IN
PROPOSITIONAL LOGIC

Overview
An important type of step used in a mathematical argument is the replacement of
a statement with another statement with the same truth value. These rules are
propositional equivalences. Propositional equivalences and rules of inference can be
used to simplify and validate mathematical statement.

Objectives
After successfully completing this lesson, the students should be able to:

• Formulate rules of inference to construct proofs in propositional and predicate


logic.
• Create convincing arguments using the different methods of proving.
• Write an argument using logical notation and determine if the argument is or is not
valid.

Course Materials

Propositional Equivalences

Idempotence P≡PᴠP
P≡PᴧP
Commutative (P ᴠ Q) ≡ (Q ᴠ P)
(P ᴧ Q) ≡ (Q ᴧ P)
Associative (P ᴠ (Q ᴠ R)) ≡ ((P ᴠ Q) ᴠ R)
(P ᴧ (Q ᴧ R)) ≡ ((P ᴧ Q) ᴧ R)
De Morgan’s ¬ (P ᴠ Q) ≡ (¬P ᴧ ¬Q)
¬ (P ᴧ Q) ≡ (¬P ᴠ ¬Q)
Distributive (P ᴧ (Q ᴠ R)) ≡ ((P ᴧ Q) ᴠ (P ᴧ R))
(P ᴠ (Q ᴧ R)) ≡ ((P ᴠ Q) ᴧ (P ᴠ R))
Material Equivalence (P ↔ Q) ≡ ((P → Q) ᴧ (Q → P))

Involution P 𠪪P

Material Implication (P → Q) ≡ (¬P ᴠ Q)

16 | P a g e Lesson 2: Providing Techniques in Propositional Logic


Exportation ((P ᴧ Q) → R) ≡ (P → (Q → R))

Identities (P ᴠ TRUE) ≡ TRUE


(P ᴠ FALSE) ≡ P
(P ᴧ TRUE) ≡ P
(P ᴧ FALSE) ≡ FALSE
(P ᴧ ¬P) ≡ FALSE

17 | P a g e Lesson 2: Providing Techniques in Propositional Logic


Idempotence
This idempotence says, for example, that "Lisa is a good dancer." is equivalent to
"Lisa is a good dancer or Lisa is a good dancer ". It is also equivalent to “Lisa is a good
dancer and Lisa is a good dancer”. Although rarely used in everyday life, these are useful
when manipulating propositions in reasoning in symbolic form and proving an argument.

Commutative
This commutative says, for example, that "Daniel Kang is rich or (Daniel Kang is)
famous." is equivalent to "Daniel Kang is famous or (Daniel Kang is) rich". On the other
hand, "Daniel Kang is rich and (Daniel Kang is) famous." is equivalent to "Daniel Kang is
famous and (Daniel Kang is) rich". It means that with this operation, the result obtained
does not differ with the order in which the elements are used.

Associative
This associative says, for example, that "Jennie Kim is beautiful, or she is also hot
or (she is) famous" is equivalent to "Jennie Kim is beautiful or (Jennie Kim is) hot, or she
is also famous". Using the logical operator “and”, "Jennie Kim is beautiful, and she is also
hot and (she is) famous" is equivalent to "Jennie Kim is beautiful and (Jennie Kim is) hot,
and she is also famous".

De Morgan’s Law
This De Morgan’s Law says, for example, "It is not the case that Park Jihyo is fat
or ugly." is true if and only if "Park Jihyo is not fat and she is not ugly." On the other hand,
it can also be "It is not the case that Park Jihyo is fat and ugly." that is equivalent to "Park
Jihyo is not fat or she is not ugly."

Distributive
This distributive says, for example, that "Kim Taehyung is an actor, and he is singer
or (he is) a dancer." is equivalent to "Kim Taehyung is an actor and (he is) a singer, or Kim
Taehyung is an actor and (he is) a dancer". It can also be "Kim Taehyung is an actor, or
he is singer and (he is) a dancer." which is equivalent to "Kim Taehyung is an actor or (he
is) a singer, and Kim Taehyung is an actor or (he is) a dancer".

Material Equivalence
This material equivalence says, for example, that "Chaeyoung is happy if and only
if Mina is healthy." is logically equivalent to "If Chaeyoung is happy, then Mina is healthy,
and if Mina is healthy, Chaeyoung is happy." On the other hand, the statement
"Chaeyoung is happy if and only if Mina is healthy." is also logically equivalent to
“Chaeyoung is happy and Mina is healthy, or Chaeyoung is not happy and Mina is not
healthy.”

Involution
This involution says, for example, that "It is not the case that John is not multi-
talented." is equivalent to "John is multi-talented."

18 | P a g e Lesson 2: Providing Techniques in Propositional Logic


Material Implication
For example, the statement "If I win the lottery, I will travel to South Korea." is not
true, that is, I am lying, if I win the lottery and don't travel to South Korea. It is true in all
the other cases. Similarly, the statement "I don't win the lottery or I travel to South Korea."
is false, if I win the lottery and don't travel to South Korea. It is true in all the other cases.
Thus these two statements are logically equivalent.

Exportation
This exportation says, for example, "If there are no corrupt government officials
and the Filipino people vote wisely, then there will be better future for all of us." is logically
equivalent to "If there are no corrupt government officials, then if the Filipino people vote
wisely, then there will be better future for all of us."

Identities
Here, true is a proposition that is always true. Regardless of what P is, the
proposition (P ᴠ TRUE) is always true. Although rarely used, this and the next three
identities, like identities 1 and 2, are useful when manipulating propositions in reasoning
in symbolic form.

This says that a statement such as "Chanyeol is 6 foot tall or he is not 6 foot tall." is always
true.

This says that a statement such as "Xiumin is 5 foot tall and he is not 5 foot tall." is always
false.

19 | P a g e Lesson 2: Providing Techniques in Propositional Logic


EXERCISE I

Identify the law applied in each of the following equivalences.

a. (P ∧ Q) ∧ T ≡ P ∧ Q

b. P ∧ (Q ∧ R) ≡ (P ∧ Q) ∧ R

c. ¬ (P ∨ Q) ≡ ¬P ∧ ¬ Q

d. P ∧ Q ≡ Q ∧ P

e. [¬ (¬P) ∨ Q)] ≡ P ∨ Q

20 | P a g e Lesson 2: Providing Techniques in Propositional Logic


Rules of Inference

P
Addition
∴P∨Q
P ∧ Q or P ∧ Q
Simplification
∴P ∴Q
P
Conjunction Q
∴P∧Q
P→Q
Absorption
∴ P → (P ∧ Q)
P→Q
Modus Ponens P
∴Q
P→Q
Modus Tollens ¬Q
∴ ¬P
P∨Q
Disjunctive Syllogism ¬P
∴Q
P→Q
Hypothetical Syllogism Q→R
∴P→R
(P → Q) ∧ (R → S)
Constructive Dilemma P∨R
∴Q∨S
(P → Q) ∧ (R → S)
Destructive Dilemma ¬Q ∨ ¬S
∴ ¬P ∨ ¬R
P∧Q
Decomposing a
P
Conjunction
∴Q

Addition
This inference is also called as “disjunction introduction”. It is similarly related to
Disjunctive Syllogism. This inference means that if “P” or the premise is true, then “P ∨ Q”
or the conclusion is also true. Addition builds up “∨” statements.

Simplification
This inference is also called as "conjunction elimination". It is some sort of the
opposite of conjunction. Simplification means that in an instance “P ∧ Q” appears on a line
of proof, it can result to either of “P” and “Q”. It is useful for breaking down or turning long
“∧” statements into shorter “∧” statements at the beginning of a proof.

21 | P a g e Lesson 2: Providing Techniques in Propositional Logic


Conjunction
If the statement p is true, and statement q is true, then we can conclude that the
logical conjunction of the two statements p and q is true. It is useful for building up “∧”
statements at the end of a proof.

Absorption
This rule of inference is an identity linking a pair of binary operations. Suppose P
implies Q, we can conclude that Q is absorbed by P.

Modus Ponens
The first premise is the conditional claim P implies Q (also known as the “if-then”
statement) which we know is true. The second premise is that P is also true. With these
two premises, we can conclude that Q must be true as well. It can be summarized as "P
implies Q and P is asserted to be true, therefore Q must be true."

Modus Tollens
It has two premises. The first premise is a conditional claim (an "if-then" statement)
which we know is true. The second premise is that it is not the case that Q. With these
two premises, we can conclude that it is not the case that P. In simplest terms, it states
that if a statement is true, and another statement is false, the conclusion must be false. If
so, it is a contrapositive.

Disjunctive Syllogism
This inference means that at least one of the two statements is true; if we know
that the former is not true, we can conclude that it has to be the latter that is true. So in
symbols, if P is true or Q is true and P is false, then Q is true. Disjunctive Syllogism breaks
down “∨” statements.

Hypothetical Syllogism
Hypothetical syllogism, also called as "chain reasoning" or "chain deduction" is a
valid rule of inference wherein if we know that P leads to Q, and that Q leads to R, then
we can conclude that P leads to R.

Constructive Dilemma
Suppose we know that P leads to Q and that R leads to S. And that either P or R
is true. Then we can arrive at the conclusion that either Q or S has to be true.

Destructive Dilemma
This inference is related to Constructive Dilemma. It states that if P leads to Q and
R leads to S, and either Q is false or S is false, then we can conclude that either P is false
or R is false.

22 | P a g e Lesson 2: Providing Techniques in Propositional Logic


Decomposing a Conjunction

It is a rule of inference that decomposes a conjunction to determine the


propositions to be true or false. Suppose that the statement P and Q is true, we
know that P is true, therefore Q must be true also.

Example:
Proof of Validity for the given arguments
a. ¬ Q → R
b. R ∧ P
c. ¬ (Q ∧ ¬ R) / ∴R
Solution
a. ¬ Q → R Given (Premise 1)
b. ¬R ∧ P Given(Premise 2)
c. ¬ (Q ∧ ¬ R) Given (Premise 3)
d. ¬R Simplification(from b)
e. ¬ Q ∨ ¬ ¬R De Morgan’s (from c)
f. ¬ Q ∨ R Double Negation (from e)
g. ¬ ¬ Q Modus Tollens(from a and d)
h. R Disjunctive Syllogism (from f and g)

23 | P a g e Lesson 2: Providing Techniques in Propositional Logic


EXERCISE II
Use the logical equivalences laws to prove the stated equivalence

1. P ∧ (¬ P ∨ Q) ≡ P ∧ Q

2. P ∨ (¬ P ∧ Q) ≡ P ∨ Q

3. ¬ (P ∧ Q) ∧ (¬ P ∨ Q) ≡ ¬ P

4. P ∨ (P∧ Q) ≡ P

5. [(P ∨ Q) ∧ (P ∨ ¬ Q)] ∨ R ≡ P ∨ (Q ∨ R)

24 | P a g e Lesson 2: Providing Techniques in Propositional Logic


Argument

It is made up of two parts: the given statements called the premises and a
conclusion. An argument is valid if the conclusion is true whenever the premises are
assumed to be true. It is said to be an invalid argument or fallacy if it is not valid.

Example:
Premise 1: If one loves Biology, then he loves Science
Premise 2: Shin loves biology
Conclusion: Therefore, Shin loves Science

Representing each simple statement with a letter:


P: One loves biology
Q: One loves science

Writing the two premises and the conclusion in symbolic for, we have:

Premise 1: P → Q If one loves biology then he loves science


Premise 2: P Shin loves biology
Conclusion ∴Q Therefore, Shin loves science

To check whether the argument is valid or fallacy we rewrite it as conditional statement in


the form
[(P → Q) ^ P] → Q

and construct a truth table for the statement

[(P → Q) ^ P] → Q

P Q P→Q ( P → Q) ^ P [( P → Q) ^ P]→Q
T T T T T
T F F F T
F T T F T
F F T F T

Since the final column in the truth table is true in every case, then the statement is
a tautology. Since the conclusion is true whenever the premises are true (first case), then
the argument is valid.

NOTE: If the conditional statement in the final column is false in the first case, then the
argument is invalid or is a fallacy. And the statement is no longer a tautology. Note that it
is not a contradiction either.

25 | P a g e Lesson 2: Providing Techniques in Propositional Logic


EXERCISE III

Use the truth table to determine whether the symbolic form of the argument is a tautology
and whether it is valid or a fallacy.

1. P → Q
Q→R
∴ ¬R→ ¬P

2. P → Q
¬P
∴P

3. (P ^ Q) ^ (Q^P)
P
∴P ∨ Q

4. [(P→Q) ^ (Q→R)] → (¬Q → ¬R)

5. (P ^ Q) → R
¬P ∨ ¬Q
∴¬R

26 | P a g e Lesson 2: Providing Techniques in Propositional Logic


Assessment

Test I. Proving
1. ¬ (p ∨ (¬p ∧ q)) ≡ ¬p ∧ ¬q
2. ¬ (q → p) ∨ (p ∧ q) ≡ q
3. ¬ (p ↔ q) ≡ (p ↔ ¬q)

Test II. Supply the missing reason for each proof

4. 1. ~ (~A V B) Premise
2. _______ De Morgan

5. 1. (A ∧ B) →~ C Premise
2. ~B→ C Premise
3. ~C Premise
4. ______ 1, 2 Transitive Law
5. ______ 3, 4 MT

6. 1. A→ (C ∧ B) Premise
2. ~C Premise
3. _______ 2, Addition of ~q
4. _______ 3, De Morgan
5._______ 1, 4 Modus Tollens

7. A→~ (~A) ∴A → (B→A)

1. A→ ~ (~A) Premise
2. A→A ______
3. ~A V A ______
4. (~A V A) A V ~B ______
5. ~A V (A V ~B) ______
6. ~A V (~B V A) ______
7. A → (~B V A) ______
8. A → (B → A) ______

8. (A V B) → (C ∧ D), A ∴C

1. (AVB) → (C∧D) Premise


2. A Premise
3. _______ 2, Addition
4. _______ 1, 3 MP
5. C ________

9. (S → r) ∧ (q → r) ∴(s ∨ q) → r

1. (s → r) ∧ (q → r) Premise
2. (¬s ∨ r) ∧ (¬q ∨ r) ________

27 | P a g e Lesson 2: Providing Techniques in Propositional Logic


3. (¬s ∧ ¬q) ∨ r ________
4. ______ 3, DML
5. (s ∨ q) → r ________

10. ~[q→~(r∧s)] ∴q∧(r∧s)


1. ~[q→~(r∧s)] Premise
2. ~[~qv~(r∧s)] _______
3. q∧(r∧s) _______

28 | P a g e Lesson 2: Providing Techniques in Propositional Logic


References
Zegarelli, M. (2007) Logic for Dummies. Retrieved from
https://cdchester.co.uk/wp-content/uploads/2018/05/Mark-Zegarelli-Logic-For-Dummies-
For-Dummies-2006.pdf

Identities (n.d) Retrieved from


https://www.cs.odu.edu/~toida/nerzic/content/logic/prop_logic/identities/identities.html

Tripathy, C. (2013, January 18) Rules of Inference. Retrieved from


https://www2.cs.duke.edu/courses/summer13/compsci230/restricted/lectures/L05.pdf

The University of Edinburgh (n.d) Retrieved from


https://www.inf.ed.ac.uk/teaching/courses/dmmr/slides/13-14/Ch1a.pdf

University of Texas at Austin (n.d) Retrieved from


https://www.cs.utexas.edu/~schrum2/cs301k/lec/topic01-propLogic.pdf

Millersville (n.d) Rules of Inference Retrieved from


http://sites.millersville.edu/bikenaga/math-proof/rules-of-inference/rules-of-inference.html

Internet Encyclopedia of Philosophy (n.d) Propositional Logic Retrieved from


https://www.iep.utm.edu/prop-log/#SH5b

Tomassi, Paul. (2013) Logic

Pospesel, Howard and William G. Lycan. (2000) Introduction to Logic: Propositional Logic

29 | P a g e Lesson 2: Providing Techniques in Propositional Logic


LESSON 3: PREDICATE LOGIC AND QUANTIFIERS

Overview
Propositional logic cannot adequately express the meaning of all statements in
mathematics and in natural language. For example, suppose that we know that:

“Every computer connected to the university network is functioning properly.”

No rules of propositional logic allow us to conclude the truth of the statement.

“MATH3 is functioning properly,”

where MATH3 is one of the computers connected to the university network. Likewise, we
cannot use the rules of propositional logic to conclude from the statement:

“CS2 is under attack by an intruder,”

where CS2 is a computer on the university network, to conclude the truth of

“There is a computer on the university network that is under attack by an intruder.”

In this lesson we will introduce a more powerful type of logic called predicate logic.
We will see how predicate logic can be used to express the meaning of a wide range of
statements in mathematics and computer science in ways that permit us to reason and
explore relationships between objects. To understand predicate logic, we first need to
introduce the concept of a predicate. Afterward, we will introduce the notion of quantifiers,
which enable us to reason with statements that assert that a certain property holds for all
objects of a certain type and with statements that assert the existence of an object with a
particular property.

Objectives
After successfully completing this lesson, the students should be able to:
• Explain the advantage of predicate logic from the propositional logic.
• List down and discuss the different types of quantifiers.
• Analyze basic mathematical proofs and discriminate between valid and unreliable
arguments.

30 | P a g e Lesson 3: Predicate Logic and Quantifiers


Course Materials

Predicate Logic and Quantifiers


In the last lesson, we studied about the propositional logic. Now we will discuss
another logic which is the predicate logic. But before that, let’s take a look at these
statements first.

Statement 1:
All students passed the Discrete Structure.
Statement 2:
John studied the Discrete Structure.

In these statements, we can “logically” conclude that since John studied the Discrete
Structure and he is a student technically, he passed the subject. But to further analyze
these statements, we need more lessons.

Predicate
In elementary English, you already learned that every complete sentence is
composed of a subject and a predicate. If we will connect this to our topic, these logical
statements also have subjects and predicate wherein the predicate refers to the property
a subject can have.

Example:
Y is greater than 5.
We can conclude that “Y” is the subject in the statement and the predicate is
“greater than 5”. The statement above can be denoted as K(Y) wherein the K represents
the predicate and the Y is the subject. By this representation, we can see that the predicate
is a function because it shows the truth values of the subject.

Another example:
Statement 1: x is the set of all animals.
S(x) = x has a fur.

We can say that S(x) is true if x is a bear and false if x is a snake. The domain of
a predicate variable is all the possible values the variable may have. The example above
shows that there are different possible answers in each predicate.

Quantifiers
Some statements look like this—

Example:
All students will pass discrete mathematics.
Some of the students are having a hard time on answering their assignments.

As you’ve noticed in the statements, they’ve used the words “all” and “some” which
are the keywords for using the quantifiers.

31 | P a g e Lesson 3: Predicate Logic and Quantifiers


Quantifiers are used with predicates to know on what extent a predicate is true
over a range of elements. There are two primarily quantifiers namely universal quantifier
and existential quantifier.

Universal Quantifier
Universal quantifier is the quantifier that tells the amount or quantity that means
“given any” or “for all”. It uses the symbol
∀ (𝑢𝑛𝑖𝑣𝑒𝑟𝑠𝑎𝑙 𝑞𝑢𝑎𝑛𝑡𝑖𝑓𝑖𝑐𝑎𝑡𝑖𝑜𝑛)

Example:
“∀x∈D P(x) is true” if only if “P(x) is true for every x in D”.
• ∀ – Universal quantifiers, “for all”, “for every”
• ∈ – “is a member (or) element of”, “belonging to”
• D – domain of predicate variable

Example #2:
All foxes are sly.

Based on the statement, we will use the universal quantifier but first we will convert
this into a predicate statement.
F(x) – x is a fox.
S(x) – x is sly.
Now that you’ve converted the statements into a predicate one, we will use the
quantifier to convert this into a mathematical statement. Giving us an answer—
∀x[F(x) → S(x)]

Existential Quantifier
Existential quantifier is the quantifier that tells the amount or quantity that means
“there is at least one” or “some”. It uses the symbol
∃ (existential
quantification)

Example #1:
“∃ x∈D, P(x) is true” if and only if “P(x) is true for at least one x in D”.
• ∃ Existential quantifier, “there exists”
Example #2:
Some students are having online classes.
Predicate statements:
S(x) – x is a student.
O(x) – x is having online classes.
The solution will be ∃x[S(x) → O(x)] .

If you fully understand the lesson, you also grasp the predicate logic. Predicate
Logic is the description of the property (or properties) a variable (or subject) may have.
Or simply the logic behind the predicate in each statement. The next part of the lesson will
discuss the proofs and techniques on how we can prove the predicate and quantified
statements we answered.

32 | P a g e Lesson 3: Predicate Logic and Quantifiers


EXERCISES

H(x): x is a Student.
E(x): x is Happy.
Y(x): x likes Taylor Swift.

Express the following statements:

1. All students are happy.

2. Some happy students like Taylor Swift.

3. Everyone who likes Taylor Swift is a sad student.

4. Only happy students like Taylor Swift.

5. Some happy students didn’t like Taylor Swift.

33 | P a g e Lesson 3: Predicate Logic and Quantifiers


PROOFS AND TECHNIQUES

In every argument, we need to check whether they are valid or not and these proof
techniques will help us to determine them fast.
Proof consists of a sequence of (algorithmic) steps that reduces, by certain
“reasoning rules” until it arrives at the situation at which answer is known. Proof should
not only tell whether or not a goal follows from the assumptions but it should also convince
the readers or listeners by giving arguments why the goal is true whenever the
assumptions hold. In almost every case, we prove the propositions by this form “if p then
q” which p is the hypothesis and q is the conclusion.

Example:
All fish is color orange.
Nemo is a fish.
Therefore, Nemo is color orange.

In this example we can see that the arguments are “All fish are orange” and “Nemo
is a fish”. The conclusion is “Nemo is color orange”.

We can only prove that these arguments are valid if it only uses the given
hypotheses together with the axioms, definitions, and the rules of inferences. These rules
of inference are the guides on making a conclusion in every premise like this rule:
𝑝𝑞
∴𝑝⋀𝑞

If there are rules of inference for arguments, there are also rules of inference for
quantifiers. These rules are added to the given rules of inference in the propositions
namely:

∀𝑥𝑃(𝑥)
Universal Instantiation
∴ 𝑃(𝑐)
𝑃(𝑐)𝑓𝑜𝑟 𝑎𝑟𝑏𝑖𝑡𝑟𝑎𝑟𝑦 𝑚𝑒𝑚𝑏𝑒𝑟, 𝑐, 𝑜𝑓 𝑡ℎ𝑒 𝑢𝑛𝑖𝑣𝑒𝑟𝑠𝑒
Universal Generalization
∴ ∀𝑥𝑃(𝑥)
𝑃(𝑐)𝑓𝑜𝑟 𝑠𝑜𝑚𝑒 𝑚𝑒𝑚𝑏𝑒𝑟, 𝑐, 𝑜𝑓 𝑡ℎ𝑒 𝑢𝑛𝑖𝑣𝑒𝑟𝑠𝑒
Existential Generalization
∴ ∃𝑥𝑃(𝑥)
∃𝑥𝑃(𝑥)
Existential Instantiation
∴ 𝑃(𝑐)

A valid argument for predicate logic is not needed to be a tautology to be valid.

Universal Instantiation
This says that if D is true for every element of the domain, we can name such
element by a variable, and D is still true for all these things.
𝑷(𝒙)
∴∀𝒙𝑷(𝒄)

Example #1: Universal Instantiation Statement

34 | P a g e Lesson 3: Predicate Logic and Quantifiers


All persons can read.
Therefore, Ana can read.

Example #2: We can use our earlier example to this.


Statements:
All fish is color orange.
Nemo is a fish
Therefore, nemo is color orange.
We will assign the predicates with variables.
O(x) – x is color orange.
n is a constant symbol for nemo.
F(x) – x is a fish.
The argument will be (∀x)[F(x) → O(x)] Λ F(n) → O(n)]
The proof sequence is as follows:

1. (∀x)[F(x) → O(x)] Hypothesis


2. F(n) Hypothesis
3. F(n) → O(n) Universal Instantiation (1)
4. O(n) Modus Ponens (2,3)

But universal instantiation have its restrictions wherein if F(t) derives F(n), n must
not fall within the scope of the quantifier for t. Because without this restriction, the premise
(∀x) (∃n)F(x,n) could lead to the conclusion of F(n,n) and this is invalid. We should take
consideration that F(x,n) means that "n>x".

Existential Instantiation
This says that if you want to prove the argument, you will specify a certain predicate
and make a variable out of that to make the argument true.
∃𝒙𝑷(𝒙)

∴𝑷(𝒄)𝒇𝒐𝒓 𝒔𝒐𝒎𝒆 𝒄 𝒊𝒏 𝒕𝒉𝒆 𝒅𝒐𝒎𝒂𝒊𝒏

Example #1: Existential Instantiation Statement


Someone got the highest score in the quiz; please call her that she got the highest
score in the quiz.

Example #2:
Domain = all students;
B(x) = "x gets a B"
J(x) = "x gets 85 in the exam"
- If any student gets >85 then s/he gets a B.
- There are students who get >85 in the exam, Jay is such a student.
- Therefore, Jay gets a B.

1. ∀x[J(x)→B(x)] Hypothesis
2. ∃xJ(x) Hypothesis
3. J(Jay) Hypothesis + Existential Instantiation
4. J(Jay)→B(Jay) Universal Instantiation (1)

35 | P a g e Lesson 3: Predicate Logic and Quantifiers


5. B(Jay) Modus Ponens (4, 3)

Universal Generalization
This says that if you want to prove the argument, you will assume a member and
will not put any restrictions to that for it to become true. If you can show that P(x) is true,
then all the objects satisfying the argument for x will also become true. In other words,
P(x) is true for the domain of ∀xP(x).
𝑃(𝑐)
∀𝑥𝑃(𝑥)

Example #1:
where P(c) holds for every element g of the domain
- Let F(x) = x>1
- Let W(x) = x-1>0
wherein we assume that every number is above 0.
[∀x[F(x)→W(x)^∀xF(x)] →∀xW(x)

Proving:
1. ∀x[F(x)→W(x)] Hypothesis
2. ∀xF(x) Hypothesis
3. [F(x)→W(x)] Universal Instantiation (1)
4. F(x) for the same x as in 3. Universal Instantiation (2)
5. W(x) Modus Ponens (3, 4)
6. ∀xW(x) Universal Generalization (6)

Existential Generalization
This rule says that if there is some element a in the domain that has a property P,
then we can say that there is at least one existing in the domain that has the property P.
𝑷(𝒄)
∃𝒙𝑷(𝒙)

Example #1: Existential Generalization Statement


She got a 1.0 grade in Discrete Structures.
Therefore, someone got a 1.0 grade in Discrete Structures.

Example #2:
P(a)
∴ ∃xP(x) for some specific element of domain.
Domain = (all people)
Sell(y) = "y is selling bananas"
- If everyone is selling bananas, then someone is selling bananas.

∀xSell(x)→∃xSell(x)
1. ∀xSell(x) (Hypothesis)
2. Sell(a) (Universal Instantiation)

36 | P a g e Lesson 3: Predicate Logic and Quantifiers


3. ∃xSell(x) (Existential Generalization)

Methods of Proof
★ If you are proving an implication p→q, there are different strategies you can try.
o Trivial Proof – if q is true, then p → q is true.

Example #1:
Prove the statement:
If 300 students enroll in this semester, then 52 = 25
This statement is true.
Example #2:
P(n): a>=b → an >= bn for positive integers
Is P(0) true?
Proof: P(0) a0 >= b0 is equivalent to 1>=1.
Therefore, q is true and thus p→q is true.

o Vacuous Proof – if p is a conjunction of another hypotheses and it is false then,


p → q is true regardless of the value of q.

Example #1:
Proving p→q ≡ ¬p is True
If n is odd and even, then n2 = n + n
Proof: The statement is false since n can never be both an odd and an even. So,
the theorem is vacuously true.
Example #2:
Prove the statement:
If 9 is an even number, then 92 = 20.
The statement is wrong. (Although q is also false)

o Direct Proof – Assume p, then use rules of inference, axioms, definitions, and
logical equivalences, to prove q.

Example #1:
Prove the statement: For all integers k and g, if k and g are odd integers, then k +
g is an even integer.
Proof:
k = 2h + 1 and g = 2b + 1
where h and b are also integer. Then,
k + g = (2h + 1) + (2b + 1) (Substitution)
= 2h + 2b + 2 (Associative and Commutative Laws of Addition)
= 2(h + b + 1) (Distributive Law)
Since h + g is twice another integer, namely, h + g + 1, h + g is an even integer.

Example #2:
Prove the statement:
if y is an odd number, then y2 is an odd number
Proof:
Assume that y is an odd integer.
Y = 2k + 1
Then y2 = (2k + 1)2 = 4k2 + 4k + 1 = 2(2k2 + 2k) + 1

37 | P a g e Lesson 3: Predicate Logic and Quantifiers


Thus, y2 is odd.

o Proof by Contrapositive - you give a direct proof of ~q → ~p

Example#1:
Prove the statement:
For all integers r and l, if the product of r and l is even, then r is even or l is even.

- But before proving this, we will change the statement into contrapositive: If r and l
are both odd integers, then rl is odd.

Proof:
r = 2a + 1 and l = 2b + 1
where a and b are also integers. Then,
rl = (2a + 1) (2b +1) (Substitution)
= 4ab + 2a + 2b + 1 (Associative, Commutative, Distributive Laws)
= 2 (2ab +a + b) + 1 (Distributive law)
Since rl is twice an integer (namely 2ab + a + b) plus 1, rl is old.

Example #2:
Prove the statement:
if g = r s, where r and s are positive, then r<= √g or s < = √g.
Proof:
Assume that both r and s are larger than √n. Thus, r s > g so that g!= a b. Since
the negation of conclusion implies the negation of hypothesis, the original
conditional statements is true.

o Proof of Cases - if the hypothesis p can be separated from p1vp2...pk, prove each
proposition separately.

Example #1:
Prove the statement:
if an integer y is not divisible by 3, then y2 = 3k + 1 fof some integer k
Proof:
" y is not divisible by 3" is equivalent to
" y = 3m + 1 for some integer m" or " y = 3m + 2 for some integer m"
Case 1:
y2 = (3m + 1)2 = 9m + 6m + 1
=3(3m2 + 2m) + 1 = 3k + 1 for some k.

Case 2:
y2 = (3m + 2)2 = 9m2 + 12m + 4
= 3(3m2 + 4m + 1) + 1 = 3k + 1 for some k.
We obtain the same answer making the statements true.

Example #2:
If p is a real number such that p2 - 1
---------- > 0, then either p > 1 or -2 < p < -1.
p2 + 2
Assume x is a real number for which the inequality

38 | P a g e Lesson 3: Predicate Logic and Quantifiers


p2 - 1
---------- > 0
p2 + 2
holds. Factor the numerator of the fraction to get the inequality
(p +1) (p -1) / p + 2 > 0
For this combination of p + 1, p - 1, and p + 2 to be positive, either all are
positive or two are negative and the other is positive. This gives four cases to
consider:
Case 1: p + 1 > 0, p - 1 > 0, and p + 2 > 0. In this case p > - 1, p > 1, and p > -2, which
implies p > 1.
Case 2: p + 1 > 0, p - 1 < 0, and p + 2 < 0. In this case p > -1, p < 1, and p < -2, and there
is no p satisfying all three inequalities simultaneously.
Case 3: p + 1 < 0, p - 1 > 0, and p + 2 < 0, in this case p < -1, p > 1, and p < -2, and there
is no p satisfying all three inequalities simultaneously.
Case 4: p + 1 < 0, p - 1 < 0, and p + 2 > 0, zin this case, p < -1, p < 1, and p > -2, which
implies that -2 < p < -1.

Thus either p > 1 (Case 1) or 2 < p < -1 (Case 4)

★ Existence Proof
This proves the statement ∃xP(x). The common types are:
1. Constructive Proof – establish P(k) for some k in the domain.

Example #1:
Prove a statement:
There exists a triple (d, j, k) of negative integers such that a2 + b2 + c.
Proof:
d = -1
j = -8
k = -2
As you can see, the values of the three givens are having the characteristics
being searched therefore its true.

Example #2:
If y(j) = j3 + j - 5, then there exists a positive real number y(h) = 7.
Proof:
We will calculate the derivative of y : y'(j) = 3j2 + 1. Then find a positive number
h such that y'(h) = 3h2 + 1 = 7. Solving for h.
3h2 = 6
h2 = 2
c = +-√2
Then c = √2 is a positive real number and y'(√2) = 3(√2)2 + 1 = 7.

2. Nonconstructive Proof – use proof by contradiction. This is indirect.

Example #1:
Prove a statement:
There exist irrational numbers x y s.t. xv is rational.
In these statements, we will provide only rational.
Proof:
Consider √2√2 . Either (a) it is rational of (b) it is rational

39 | P a g e Lesson 3: Predicate Logic and Quantifiers


Case 1: We have x = y= √2s.t. xv is rational.
Case 2: Let x = √2√2and y = √2, so both are irrational.
Then, √2√2√2 = √2√2 = 2. Thus, xv is rational.

Example #2:
There exists x ∈ R such that x5-3x+1=0
Proof:
Let f(x)=x5-3x+1
F(1) = -1<0 and f(2) =27 >0.
F(x) is a continuous function
We can define that because the function continuously give answers or there is
other possible ways to solve it, we use the Intermediate Value Theorem – if f is
continuous on a closed interval [a,b], and c is any number between f(a) and f(b)
inclusive wherein the closest value exists x∈[1, 2] such that f(x) = 0. So the answer
is f(x) = 0.

★ Biconditional
Use the fact that p↔q is equivalent to (p→q) ∧ (q→p) and proving both
the implication by using the methods above.

Example #1:
Prove the statement:
For any integer h, h is odd if and only if h2 is odd.
The implications are:
(a) if h is odd, then h2 is odd.
(b) if h2 is odd, then h is odd.
Proof of (a): Use direct proof in proving this statement
n = (2a + 1)2
= 4h2 + 4h + 1 = 2(2h2 + 2h) +1 which is twice an integer plus 1. Thus h2 is odd.
Proof of (b): In this statement, we can see that the hypothesis is clearly even
so we use contrapositive to prove this. The contrapositive of this statement is:
“If n is even, then n2 is even”. Then—
n=2a
N2=(2a)2 = 4a2 = 2(2a2), which is an even integer.

Example #2:
Prove the statement:
Suppose d and e are integers. Then a ≡ b (mod 6) if and only if a ≡ b (mod 2) and
a ≡ b (mod 3)
Proof:
We can substitute a ≡ b (mod 6) to a - b = 6n.
To prove this statement, we can get from a ≡ b (mod 2) the formula a - b = 2k
where we can conclude that a - b is even. For the a ≡ b (mod 3) we can get a formula of
a - b = 3l but since we know that a - b is even, then we can substitute l = 2m. Thus making
the formula, a - b = 3l = 3 • 2m = 6m, this means 6 (a-b), so a ≡ b (mod 6).
And at last you finished the chapter about predicate logic. But before going to the
next chapter why don't you assess yourself first if you learn something? We’ve prepare an
exercise and a quiz for you to practice and answer. Try first this exercise.

40 | P a g e Lesson 3: Predicate Logic and Quantifiers


EXERCISES

Proofs and Techniques


(Items 1-3) Consider the statement “for all integers p and q if p + q is even,
then p and q are even”1.

1. Write the contrapositive of the statement.


2. Is the original statement true or false? Prove your answer.
3. Is the contrapositive of the original statement true or false? Prove your answer.
4. Show that √ 2 is irrational. (use proof by Contradiction)
5. Show that if p and q are both square numbers, then pq is also a square number.
(use Direct Proof)

41 | P a g e Lesson 3: Predicate Logic and Quantifiers


Assessment

Translation
Let I(x) be the statement “x spends more than five hours every Wednesday in computer
programming class,” where the domain for x consists of IT students. Express each of these
quantifications in English.
1. ∃x = I(x)
2. ∀x = I(x)
3. ∃x = ¬I(x)
4. ∀x = ¬I(x)

Let, P(x) = “x is a notebooks


Q(x) = “x is small”
R(x) = “x is colorful”

5. Not all notebooks are colorful.


6. The notebook is large.
7. All notebooks that are small are dull in color.
8. Some notebooks are small and some are not.

Proving
9. ∃x (C(x) ∧ ¬B(x)) and ∀x(C(x) → P(x)) ≡ ∃x (P(x)∧¬B(x))
10. ∀x (H(x) → M(x)) H(x) ∴ M(x)

42 | P a g e Lesson 3: Predicate Logic and Quantifiers


References
Chapter 3 Predicate Logic. [PDF]. Retrieved from
http://www1.spms.ntu.edu.sg/~frederique/dm3.pdf

CS 2336: Discrete Mathematics Lecture 4 Proof: Methods and Strategies [PDF}.


http://www.cs.nthu.edu.tw/~wkhon/math/lecture/lecture04.pdf

CS311H: Discrete Mathematics Mathematical Proof Techniques. [PDF]. Retrieved


from https://www.cs.utexas.edu/~isil/cs311h/lecture4-6up.pdf

CS 381 (2010). Inferencing. Retrieved from


https://www.cs.odu.edu/~toida/nerzic/content/logic/pred_logic/inference/exist
_gen.html

Dr. Bryant, J., & Dr. Kirby, P. (2011). Florida State University Course Notes MAD 2104 Discrete
Mathematics I [PDF]. Tallahassee, Florida. Retrieved from
https://www.math.fsu.edu/~pkirby/mad2104/SlideShow/CourseNotesMAD2104

Formal Logic: Quantifiers, Predicates, and Validity. [PDF]. Retrieve from


https://www.cpp.edu/~ftang/courses/CS130/notes/predicate%20logic.pdf?fbcli
d=IwAR1ThbJ-8zBzCzdEHMT5mSd4Ktr4RZkuZ_tDbzrrTtBVreevQTPKguxasio

Proof Rules Predicate Logic. [PDF]. Retrieve from


https://www3.risc.jku.at/people/wwindste/Teaching/LogikAlsArbeitssprache/Skriptum/2-
ProofRulesPredicateLogic.pdf

Rules of inference for Predicate Calculus. [PDF]. Retrieved from


https://www.cs.rutgers.edu/~borgida/205Fa2016/FOL.proofs.pdf

John, R., & Eric W., W. Intermediate Value Theorem. Retrieved from
https://mathworld.wolfram.com/IntermediateValueTheorem.html

43 | P a g e Lesson 3: Predicate Logic and Quantifiers


LESSON 4: SET CONCEPTS

Overview
Set is the fundamental discrete structure on which all other discrete structures are
built. Sets are used to group objects together. Often, but not always, the objects in a set
have similar properties. For instance, all the students who are currently enrolled in your
school make up a set. Likewise, all the students currently taking a course in discrete
mathematics at any school make up a set. In addition, those students enrolled in your
school who are taking a course in discrete mathematics form a set that can be obtained
by taking the elements common to the first two collections. The language of sets is a
means to study such collections in an organized fashion. We now provide a definition of a
set. This definition is an intuitive definition, which is not part of a formal theory of sets.

Objectives
After successfully completing the lesson, the students should be able to:
• Identify and apply basic concepts of set, set representation and set operations.
• Create connection between set operations and logic.
• Prove elementary results involving sets.

Course Materials
Sets
A set is an unordered collection of different elements.
According to G. Cantor (Georg Cantor), a German mathematician, he had
defined a set as a collection of definite and distinguishable objects selected by the means
of certain rules or description.

Example of sets:
● A set of all positive integers
● A set of all the planets in the solar system
● A set of all the lowercase letters of the alphabet

Representations of Sets

1. Roster or Tabular Form


All elements of a set are listed and are separated by commas, enclosed within
braces { }.

Examples:
o Let N denote the set of first six natural numbers.
N = {1, 2, 3, 4, 5, 6}
o The set of all vowels of the English alphabet.

44 | P a g e Lesson 4: Set Concepts


V = {a, e, i, o, u}
o The set of all even numbers less than 9.
X = {2, 4, 6, 8}

2. Set Builder Notation


All elements of the set must possess a single property to become a member of a
set.

Example:
Assume that N is a set of counting numbers greater than 12:
P = {x : x is a counting number and greater than 12}
or
P = {x | x is a counting number and greater than 12}
Let A denote the set of even numbers between 4 and 16.
A = {x|x is an even number, 4 < x < 16}

3. Cardinality
The cardinality of a set is a measure of a set's size/ the number of elements in the
set, and is denoted by vertical bars, like absolute value signs; |A|

Example:
A = {2, 4, 6, 8, 12}
|A| = 5

A = {1, 2, 3, 3, 4, 6, 8}
|A| = 6

Operations of Sets

Union

The symbol ∪ is used to denote the union of two sets, the set that consists of all
elements belonging to either set A or set B (or both).

Examples:

Given:
U = {1, 2, 3, 4, 5, 6, 7, 8, 10}
A = {1, 2, 5, 8}
B = {1, 3, 4, 6, 7}

Find A ∪ B and use a Venn diagram.

Solution:

A ∪ B = {1, 2, 3, 4, 5, 6, 7, 8} ← 1 is written only


once.

45 | P a g e Lesson 4: Set Concepts


Intersection

The intersection operation is denoted


by the symbol ∩. The set A ∩ B—read “A
intersection B” or “the intersection of A and
B”.

Example:

Let:
A = {1, 2, 3, 4}
B = {2, 4, 6, 8}

Then A ∩ B = {b, d}.

The elements 2 and 4 are the only


elements that are in both
sets A and B.

Complement

The complement of a set A, denoted


by Ac or Ᾱ, is the set of all elements that are
in the universal set S but are not in A.

Example 1:

If A = { 1, 2, 3, 4}
U = { 1, 2, 3, 4, 5, 6, 7, 8}

Then find A complement ( A’).

Solution :

A = { 1, 2, 3, 4} and Universal set = U = { 1, 2, 3, 4, 5, 6, 7, 8 }


Complement of set A contains the elements present in universal set but not in set A.
Elements are 5, 6, 7, 8.
Then, A complement = A’ = { 5, 6, 7, 8}.

Example 2:

If A = { x | x is a multiple of 3, x ∉ N }. Find A’.

Solution :

46 | P a g e Lesson 4: Set Concepts


As a convention, x ∉ P in the bracket indicates P is the universal set.

P = U = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10,11, … }
A = { x | x is a multiple of 3, x ∉ N }
A = { 3, 6, 9, 12, 15, … }

Then, A’ = { 1, 2, 4, 5, 7, 8, 10,11, … }

Difference

The difference (subtraction) is defined as set A−B consists of elements that are
in A but not in B (Figure 1) or set B–A consists of elements that are in B but not in A (Figure
2).

Figure 1 Figure 2

Example:

Let’s consider:

set A = {1, 3, 5, 7, 9, 11}


set B = {3, 5, 6, 7, 8}.

To find the difference A - B of


these two sets, we begin by writing all of
the elements of A, then take away every
similar element of A and B.

Since the elements 3, 5 and 7are


the similar of A and B, the set difference
is A - B = {1, 9, 11}.

47 | P a g e Lesson 4: Set Concepts


Cartesian Product

The Cartesian products of sets mean the product of two non-empty sets in an
ordered way, obtained by the product of two non-empty sets. The Cartesian product of
two non-empty sets A and B is denoted by A × B.

Example:

Let:
A = {H, T}

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

A × B = {(H, 1), (H, 2), (H, 3), (H, 4), (H, 5), (H, 6), (T, 1), (T, 2), (T, 3), (T, 4), (T,
5), (T, 6)}

B × A = {(1, H), (2, H), (3, H), (4, H), (5, H), (6, H), (1, T), (2, T), (3, T), (4, T), (5,
T), (6, T)}

Note that in this case A × B ≠ B × A, i.e., the Cartesian product is not commutative.
Also, note that n(A) ∙ n(B) = 2(6) = 12 = n(A × B).

Symmetric Difference

The symmetric difference using Venn


diagram of two subsets A and B is a sub set
of U, denoted by A △ B and is defined by

A △ B = (A – B) ∪ (B – A)

Example:

Given:
A = {1, 2, 3, 4, 5, 6, 7, 8}
B = {1, 3, 5, 6, 7, 8, 9}

Then A – B = {2, 4}, B – A = {9}

And A △ B = {2, 4, 9}.

48 | P a g e Lesson 4: Set Concepts


Therefore, the shaded part of the Venn
diagram represents A △ B = {2, 4, 9}.

49 | P a g e Lesson 4: Set Concepts


Set Laws/ Rules

1. Commutative Laws:
AUB=BUA
A∩B=B∩A

2. Associative Laws:
(A U B) U C = A U (B U C)
(A ∩ B) ∩ C = A ∩ (B ∩ C)

3. Idempotent Laws:
AUA=A
A∩A=A

4. Distributive Laws:
A U (B ∩ C) = (A U B) ∩ (A U C)
A ∩ (B U C) = (A ∩ B) U (A ∩ C)

5. De Morgan’s Laws:
(A U B)’ = A' ∩ B'
(A ∩ B)’ = A' U B'

6. Identity Law
AU0=A
A∩B=A

7. Domination Law
AUB=B
A∩0=0

8. Complement
AUᾹ=u
A∩Ᾱ=0

9. Negation
(Ᾱ) = A

50 | P a g e Lesson 4: Set Concepts


EXERCISE

1. A secretary of an event was asked to buy drinks for the guests. The total number
of guests were 60 people, 27 like cold drinks and 42 like hot drinks and each guest
likes at least one of the two drinks. How many like both cold and hot drinks?

2. In elective classes, there are 50 students in business class and 77 students in


geographic class.
a. Find the number of students who are either in business class or in
geographic class.
b. When two classes meet at different hours and 15 students are enrolled in
both subjects.
c. When two classes meet at the same hour.

3. A language elective class has a total of 100 students enrolled, 75 students can
speak English and 47 can speak Italian.
a. How many can speak in English language only?
b. How many can speak Italian language only?
c. How many can speak both languages?

4. By the end of the year, art students were given medals according to their
excellency in their majors, 40 medals in dancing, 12 medals in theater acting and
18 medals in abstract painting. If the medals were awarded to 50 students and
only 8 students received medals in all three categories, how many received medals
in two categories?

51 | P a g e Lesson 4: Set Concepts


Assessment

SET OPERATIONS
Find the answer on the given sets below corresponding the operations (union,
intersection and complement) asked on each item.

o U = {1,2,3,4,5} A = {1,2,3} B = {5}


1. A’
2. 𝐴 ∩ B
3. 𝐴′ ∩ B

o U = {1,2,3,4,5,6} A = {1,2,3} B = {2,3,4} C = {1,5}


4. 𝐴 ∩ 𝐵 ∪ C
5. 𝐴′ ∪ 𝐵 ∩ 𝐶′
6. 𝐵 ∪ 𝐶 ∩ A
7. 𝐴′ ∪ 𝐵′ ∩ 𝐶′

o U = {1,2,3,4,5,6} A = {2,4,6} L = {1,2,4} R= {4,5,6}


8. (A ∪ L)′
9. L ∪ R′ ∪ A′
10. (R ∩ L)′ ∪ A

SET REPRESENTATION

Perform the exercises below on the representation of sets. The questions are based on
representing the set using both the methods Roster Form and Set-Builder Form.

Write each of the following sets in both Roster (tabular) Form and Set-Builder Notation:

1. Set of natural numbers that can divide by 12.

2. Set of odd numbers between 18 and 30.

3. Set of even natural numbers less than 15.

4. Set of names of the last five months of a year.

5. Set of letters used in the word ‘DUPLICATE’.

52 | P a g e Lesson 4: Set Concepts


References
Course Hero (2015, February), Operations with sets – Union, Intersection and
Complement. Retrieved from:
web.gccaz.edu/~johwd63181/MAT142/chapter_1/problems/section%201.4

Courtney Taylor (2018, June). What Is the Difference of Two Sets in Set Theory?
Retrieved from: https://www.thoughtco.com/difference-of-two-sets

Hossein Pishro-Nik (n.d.). Set Operations. Retrieved from:


https://www.probabilitycourse.com/chapter1/1_2_2_set_operations.php

Hossein Pishro-Nik (n.d.). Cardinality: Countable and Uncountable Sets. Retrieved


from: https://www.probabilitycourse.com/

Math Only Math (2010). Representation of A Set. Retrieved from:


https://www.math-only-math.com/representation-of-a-set.html

Math Only Math (2010), Worksheet on Representation on Set. Retrieved from:


https://www.math-only-math.com/worksheet-on-representation-on-set.html

Mrs. Anita Govilkar (2013). Complement of Set. Retrieved from:


https://www.ask-math.com/complement-of-set.html

Online Math Learning (2005), Set Theory: Union of Sets. Retrieved from:
https://www.onlinemathlearning.com/union-of-sets.html

Robert R. Stoll and Herbert Enderton (1999). Set theory. Retrieved from:
https://www.britannica.com/science/set-theory/Axiomatic-set-theory

Timothy Peil (2010, April). The Language of Sets — Cartesian Product. Retrieved from:
http://web.mnstate.edu/peil/MDEV102/U1/S7/Cartesian4.htm

Toppr (n.d.). Relations and Functions: Cartesian Product of Sets. Retrieved from:
https://www.toppr.com/guides/maths/

53 | P a g e Lesson 4: Set Concepts


LESSON 5: RELATIONS AND ITS PROPERTIES

Overview
Relationships between elements of sets occur in many contexts. Every day we
deal with relationships such as those between a business and its telephone number, an
employee and his or her salary, a person and a relative, and so on. In mathematics we
study relationships such as those between a positive integer and one that it divides, an
integer and one that it is congruent to modulo 5, a real number and one that is larger than
it, a real number x and the value f (x) where f is a function, and so on. Relationships such
as that between a program and a variable it uses, and that between a computer language
and a valid statement in this language often arise in computer science.

Relationships between elements of sets are represented using the structure called
a relation, which is just a subset of the Cartesian product of the sets. Relations can be
used to solve problems such as determining which pairs of cities are linked by airline flights
in a network, finding a viable order for the different phases of a complicated project, or
producing a useful way to store information in computer databases.

Objectives
After successfully completing this lesson, the students should be able to:
• Discuss the concept and definition of relation.
• Identify the properties of relation.
• Apply practical concepts to the appropriate set, function, or relation model,
• Interpret the associated operations and terminology in context.

Course Materials

Relation and Its Properties

Relations
It is the representation of the relationship between the elements of the set. Binary
relation is a set of ordered pairs. It may exist between the objects in a same set, or
between objects in a different set.
We use the notation a R b to denote (a,b) € R and a Ṟ b to denote (a,b) R. If a
R b, we say that a is related to b by R.

Domain and Range


Domain(x) – Set of all first members in a relation
Range(y) – Set of all second members in a relation

54 | P a g e Lesson 5: Relation and Its Properties


Representations of Relations
Relations can be represented in three possible ways:

1. Relation as a Table – We can represent relation by making a table wherein the


rows are equivalent to the domain and the columns are equivalent to the range.
Then, we mark (x) or (1, for true) the ordered pairs in the set.

Example:
Let p = { 1, 2, 3, 4}
q = { a, b, c, d}
R = { (1,a), (1,b), (2,c), (2,d), (3,b), (1,c), (4,a), (1,d) }
Table:
Range
a b c d
1 X X
2 X X
3 X X
4 X X
Domain

Or
Table:
Range
a b c d
1 1 1 0 0
2 0 0 1 1
3 0 1 1 0
4 1 0 0 1
Domain

2. Relation as an Arrow Diagram – This is a graphical way of showing relations.


We use arrow lines from the domain of each elements to the range of each
elements. If a R b then draw an arrow from a to b. (a ➔ b).

Example:
Let p = { Elisse, Teemo, Ashe }
q = { Math, Science }
R = { (Elisse,Math), (Teemo,Math), (Teemo,Science), (Ashe,Science) }

55 | P a g e Lesson 5: Relation and Its Properties


Graph:
Elisse
Math
Teemo
Science
Ashe

3. Relation as a Directed Graph or Digraph – Similar to Arrow Diagram, Digraph is


another graphical way to show relations or ordered pairs. Supposed if a R b, we
draw vertices equal to the number of elements from which set we are relating to,
then we use directed edges to draw from the a to b. If there is an ordered pair that
has the same value e.g. (a,a), there will be a self-loop in vertex a.

Example:
Let R = { (1,1), (1,2), (1,4), (2,2), (3,3), (4,1), (4,4) }

Graph:
1 3

2 4

56 | P a g e Lesson 5: Relation and Its Properties


Type Of Relations

1. Reflexive – In this type of relation, the element in a pair is related to itself. A


relation R on a set A is called reflexive if (a,a) € R for every element a € A.
- ∀a[(a,a) € R]
- Reflexive Relations: =, ≥, ≤
- Not Reflexive Relations: >, <
Irreflexive – The opposite of Reflexive. The element is not related to itself.
- ∀a[(a,a)  R]

Examples:
R = {(1,1), (2,1), (3,2), (4,3)} → NOT REFLEXIVE / IRREFLEXIVE
R = {(1,1), (2,2), (3,3), (4,4)} → REFLEXIVE

NOTE: The directed graph of Reflexive Relation includes a directed arrow of edges
on itself (i.e. loop)

1 3

2 4

2. Symmetric - A relation R on a set A is called symmetric if ∀a ∀b [(a,b) € R -> (b,a)


€ R].
- It means that if a is related to b, then the a is also related to b. There
is a relationship between each other.
- Symmetric Relations: =
- Not Symmetric Relations: >, <, ≤, ≥

Asymmetric – The opposite of symmetric. A relation R on a set A is called


asymmetric if ∀a ∀b [(a,b) € R -> (b,a)  R].
- Asymmetric Relations: >, <
- Not Asymmetric Relations: =, ≤, ≥

Examples:
R1 = {(1,1), (1,2), (2,4), (4,1)} → NOT SYMMETRIC / ASSYMETRIC
R2 = {(1,1), (2,2), (3,3), (4,4)} → SYMMETRIC
R1 = {(1,4), (1,2), (2,1), (4,1)} → SYMMETRIC

NOTE: The directed graph of Symmetric Relation includes a directed arrow in each
other:

3. Antisymmetric - A relation R on a set A is called antisymmetric if ∀a∀b [((a,b) €


R & (b,a) € R) -> (a=b)].

57 | P a g e Lesson 5: Relation and Its Properties


Examples:
R = {(1,1), (1,2), (2,2), (3,4), (4,4)} → ANTISYMMETRIC
R = {(1,1), (1,2), (2,1)} → NOT ANTISYMMETRIC

NOTE: The directed graph of Asymmetric Relation includes a directed edge


between distinct vertices:

4. Transitive – A relation R on a set A is called antisymmetric if (a,b) € R (b,c) € R


(a,c) € R for a b c € A.

Examples:
R = {(2,1), (3,1), (3,2), (4,1), (4,2), (4,3)} → TRANSITIVE
R = {(1,1), (1,2), (2,1)} → NOT TRANSITIVE

NOTE: The directed graph of Transitive Relation is if there is a path from one vertex
to another, there is an edge from the vertex to another.

Ordering of Relations

Order of Relations is a type of relation that deals with comparison between objects.
There are three types of order: partial order and total order.

1. Partial Order - A relation R on a set A is called a partial order relation if it satisfies


the following three properties:
a. Reflexive - ∀a[(a,a) € R]
b. Antisymmetric - ∀a∀b [((a,b) € R & (b,a) € R) -> (a=b)], and
c. Transitive - (a,b) € R (b,c) € R (a,c) € R for a b c € A

Example: Show whether the relation (x, y) ∈ R, if, x ≥ y defined on the set of +ve
integers is a partial order relation.

58 | P a g e Lesson 5: Relation and Its Properties


Solution: Consider the set A = {1, 2, 3, 4} containing four +ve integers. Find the
relation for this set such as R = {(2, 1), (3, 1), (3, 2), (4, 1), (4, 2), (4, 3), (1, 1), (2,
2), (3, 3), (4, 4)}.

Reflexive: The relation is reflexive as for every a ∈ A. (a, a) ∈ R, i.e. (1, 1), (2, 2),
(3, 3), (4, 4) ∈ R.

Antisymmetric: The relation is antisymmetric as whenever (a, b) and (b, a) ∈ R,


we have a = b.

Transitive: The relation is transitive as whenever (a, b) and (b, c) ∈ R, we have


(a, c) ∈ R.

Example: (4, 2) ∈ R and (2, 1) ∈ R, implies (4, 1) ∈ R.


As the relation is reflexive, antisymmetric and transitive. Hence, it is a partial order
relation.

Poset
The ordered pair (A, R) is called a poset (partially ordered set) when R is
a partial order.
Example 1: The less-than-or-equal-to (≤) relation on the set of integers X is a
partial order, and the set X with this relation is a poset.
Example 2: The relation on a set power {1, 2} , is also a partial order, and the set
{1, 2} with the subset relation is a poset.

Maximal element and Greatest element in a POSET:

Maximal element – element that is greater than or equal to every element


to which it is comparable. (There may be many elements to which it is not
comparable.)
Greatest element – element that is greater than or equal to every element
in the set

2. Total Order (or Linear Order) – When all the elements of a partial order relation
are Comparable.
- The “less than or equal to” relation on real numbers is a total order
relation.
- A binary relation R on a set A is a total order if and only if it is
(1) a partial order, and
(2) for any pair of elements a and b of A, (a,b) R or (b,a) R.

Example: Letters ordered alphabetically

59 | P a g e Lesson 5: Relation and Its Properties


EXERCISE
1. Express the following relations as a table and digraph.
a. {(1,2), (1,3), (1,4), (2,1), (3,3), (4,2), (4,3)}
b. {(1,1), (1,2), (2,2), (2,1), (3,3), (4,4), (4,3)}

2. Do an arrowed diagram to show the relation between the products (ball pen, pencil,
eraser, ruler, pad paper) and its estimated prices.

For each relation, decide whether or not that relation is reflexive, symmetric,
antisymmetric or transitive:

3. R1 = {(1,1), (1,2), (2,1)}

4. R2 = {(1,2), (2,3), (3,4), (1,3), (2,4)}

5. R3 = {(1,1), (2,2), (1,3), (3,1), (3,4), (3,3), (4,4)}

60 | P a g e Lesson 5: Relation and Its Properties


Function Notation
After determining a function, there are several ways to represent them. The
function notation is used to represent a function in a simple way. Single letter names are
usually used to represent functions such as f, g, and h. The most common way is f(x)
which is read as "f of x". However, remember that this is NOT the multiplication of any
letter to x.

The x or any letter inside the parentheses, represent the domain set while the
entire symbol, usually f(x), represent the range set.

The f (x) notation is also a substitute for the y-value in a function, y = f (x). The
ordered pairs may be written as (x, f (x)), instead of (x, y).

To evaluate a function, substitute the given number to the function's variable (place
holder, x).

1. Given the function f (x) = 3x - 5, find f (2).

SOLUTION: Substitute 2 into the function in place of x.


• f (2) = 3(2) - 5 = 1
The ordered pair will be written as (2,1). The answer can also be said as the image of 2
under f (x).

2. Find g (4w) when g (x) = x2 - 2x + 1.

SOLUTION: When substituting expressions, like 4w, into a function, parentheses should
be used to avoid algebraic errors.

For this problem, use (4w).


• g (4w) = (4w)2 - 2(4w) + 1 = 8w2- 8w +1 (Note: the answer is in terms of w.)

3. Given f (x) = x2 - x - 4. If f (z) = 12, what is the value of z?

SOLUTION: Set the function rule equal to 12 and solve for z.


x2 - x - 4 = 12
x2 - x - 16 = 0
(x - 4)(x + 4) = 0
x - 4 = 0; x + 4 = 0
x = 4; x = -4
The value of k can be either 4 or -4.
Exercise

1. f(x) = x2 + 7x –24
a. Find f(0)
b. Find f(-1)
c. Find f(3)
2. f(x) = x+5/x-5
a. find f(4)
b. find f(6)

61 | P a g e Lesson 5: Relation and Its Properties


c. find f(15)
3. Given f (x) = x2 - x + 16. If f (w) = 12, what is the value of w?
4. Consider the following demand function: d(p) = p2 –15p + 125
a. find d(3)
b. find d(7)
c. find d(12)

5. Evaluate the following function when w = 4 and z = 9.


f(w,z) = 150 + 25w + 15z + wz/10

62 | P a g e Lesson 5: Relation and Its Properties


The Algebra of Function

Algebraic Function
A function can be classified as algebraic function if only if the function used an
algebraic function such as addition, subtraction, multiplication, division and taking roots.
Example of an algebraic functions are polynomials, power functions, rational function,
exponential, logarithmic, and sinusoidal.

Polynomials
A function p is a polynomial if:
p(x) = anxn + an−1xn−1 + ... + a2x2 + a1x + a0
where n is a nonnegative integer and a0, a1, a2, ..., an−1, an are all constants called
coefficients of the polynomials

One example of an algebraic function is polynomial function. We can determine if


the function is a polynomial function if it has a construction of
f(x) = anx

n + an−1x
n−1 + . . . + a2x
2 + a1x + a0 where n is a non-negative integer. There are different function of
polynomials such as linear, quadratic, cubic, quartic, quintic function and so on.

If the degree of a polynomial is 1 we can classify it as linear function. If the degree


of a polynomial is 2 we can classify it as quadratic function. If the degree of a polynomial
is 3 we can classify it as cubic function. If the degree of a polynomial is 4 we can classify
it as quartic function. If the degree of a a polynomial is 5 we can classify it as quintic
function. If the algebraic expression has square root or divide by we cannot classify it as
polynomial function. The degree of polynomial is the highest power value in an algebraic
expression. Example of it is 3x^3+2x^2+x+9, and the degree of polynomial of this algebraic
expression is (3).

If an algebraic expression has long expression and you are assigned to find out
the degree of polynomial of it. There are 4 steps on how to find it.

Example
5x^5+3x^4+3x^5+3x^3+2x^2+3x^4+2x+5
Step 1. We must combine all the like the terms with also the same power.
(5x^5+3x^5)+(3x^4+3x^4)+3x^3+2x^2+2x+5
Step 2. We must ignore the coefficients
x^5+x^4+x^3+x^2+x+0

Step 3 Descend the order of the variable according to the power


x^5+x^4+x^3+x^2+x+0

Step 4 The largest power of the variable is alsk the degree of the polynomial
deg(x^5+x^4+x^3+x^2+x+0) =5

63 | P a g e Lesson 5: Relation and Its Properties


The most common form of polynomial function is linear function that has function
of (x) = ax + b, where a and b are both real numbers. The a in the function represents the
gradient of the line or the slope and it determines how steep is the line. f(x) = ax + b, where
a and b are real numbers while b represents the y-axis intercept or the vertical intercept
that intersects the y-axis.

Examples

Explanation

As you can in the image above, we have a constant b because all the expression
has the same value of b and that is (2). Meanwhile in the a, if the a is a>0 the straight line
goes up as the x increases. Example of a>0 is the function b, it has a value of x (2,3,4)
and you can see on the image above it increases. If the a is a<0 the straight goes down
as the x decreases. Example of a<0 is the function c, it has a value of (2,0, -2) and you
can see on the image above it decreases.

Power Function

A power function can be determined in the form of k(x) = kx^n, where k and x is a
variable that is a real number and n is the power. Both k and n are non-zero constants.
There is different form of power function:
a = n where is n a positive integer,
a = 1/n where n is a positive integer,
and a = −1.

Examples of power function:

1.f(x) = 5 is a constant function but also a power function because we can rewrite f(x) =5
as f=x^1

2.f(x) = x^3 is a cubic function but also a power function because f(x) =x^3 is a power
functions with a whole number.

64 | P a g e Lesson 5: Relation and Its Properties


3.f(x)= sq.rt of x is a square root function but also a power function because f(x)= sq.rt of
x can be write as x^1/2

Rational Function
A rational function can be determined in the form of f(x) = p(x)/q(x) where in q(x)
must not equal equal to zero. p(x) is the numerator and q(x) is the denominator.

The rational function has a asymptote, the vertical and horizontal asympote.

To find the vertical asymptote, find a way that the denominator of a rational function
must equal to zero.

For example:
x+5/x-3
The vertical asymptote is x=3

To find the horizontal asymptote, there are 3 scenarios to find it.

First, if the highest is in the denominator not in the numerator, the horizontal asymptote
must be y=0
For example: f(x)= x+5/x^2+5
Second, if the denominator and the numerator have the same degree, the horizontal
asymptote must be the ratio of the leading co efficient
For example: f(x) =5x+5/3x+5, the horizontal asymptote has a ratio of y= 5/3

Third, if the highest degree is in the numerator, there will be no horizontal asymptote.
For example: f(x)= x^2+4/x+2, there will be no horizontal asymptote

Operation of Function
Now that we have discussed some of the algebraic functions, let's now focus on
the operation of function.

Here is the operation of function.


Addition: (f+g) (x) =f(x) + g(x)
Subtraction: (f-g) (x) =f(x) - g(x)
Multiplication: (f×g) (x) =f(x) × g(x)
Division: (f/g) (x) =f(x)/ g(x)

Example:
Let f(x) = 5x+3 and g(x)= x^2
Operation to be used:
(f+g) (x) =f(x) + g(x)
and x=3
Let f(3)= 5(3)+3
=15+3
=18
Let g(3) =3^2
=9

65 | P a g e Lesson 5: Relation and Its Properties


Combine the two function
f(3)+g(3) = 18+9=27

EXERCISE

To the given function determine what it is function and tell whether it is power function or
not.

1. 5x^4+5x^3+3x^2+1
2. sq.rt of 144

Find the vertical and horizontal asympote of the given rational function.

3. 2x^4+4/x^4-3
4. 5x^3+2/ 3x^2+2

Solve the following algebraic function using the given operation of function.

5.f(x)=x^2+2x+4 and g(x) = x^2+6x+9


f(x) + g(x)
f(x) - g(x)
f(x) × g(x)
f(x)/ g(x)
x=3

In some cases, two or more functions are joined together to form a composite function. In
programming terms, the output of one function will serve as the input for the other.

66 | P a g e Lesson 5: Relation and Its Properties


Composition of Function

Composition of functions can be described as a series of “picking up” and


“dropping off”. For example, person X is picked up by the first taxi function, transported
to a location, and dropped off. Then, another taxi function comes along and picks up
person X at the new location, transports this person to another location, and drops person
x off. It is applying one function to the result of another.

→f() → g()→
The result of f() is sent through g()

The notation used for composition is (f ᵒ g)(x)= f(g(x)) and is read as “f composed
with g of x” or simply “f of g of x”. Take note that the symbol for composition is a small
circle and not a filled dot as that means multiply.

Let us define a function f from the set A to set B as follows:


f: A→B
i.e. for some a in A, and for some b in B, f(a)=b

Also, let us have a function from the set B to set C.


g: B→C
i.e. for some b in B, and for some c in C, f(a)=c

If we combine these two functions, then we get the composite function as follows:
g ᵒ f: A→C
i.e. for some a in A, and for some c in C, g(f(x))=c

Above is a graphical representation of composition of function.

For example,
Starting domain for function g is limited to the values 1,2,3, and 4.

Let: g(x)= 2x
f(x)= x+1

“x” is just a placeholder. Do not be confused. To avoid confusion, let us treat it as the input.

Therefore,
g(input)= 2(input)

67 | P a g e Lesson 5: Relation and Its Properties


f(input)= (input)+1

Note: Always start with the inner parentheses

Then,
f ᵒ g(1)= f(g(1))= f(2x1)= 2
f ᵒ g(2)= f(g(2))= f(2x2)= 4
f ᵒ g(3)= f(g(3))= f(2x3)= 6
f ᵒ g(4)= f(g(4))= f(2x4)= 8

As we can see, the range of g(x) which is 2,4,6, and 8 will be the domain of f(x)

f(2)= 2+1= 3
f(4)= 4+1= 5
f(6)= 6+1= 7
f(8)= 8+1= 9

Giving us the range of f(x) 3,5,7, and 9.

Under the composition In this given example, the following ordered pairs (x,y) are created:
(1.3), (2,5), (3,7), and (4,9).

Another example,

Let A, B, and C be sets of natural numbers = {1,2,3,4,5,…..}

Let f: A→B be defined as


f(x)=2x

And let g: B→C be defined as


g(x)=x+1

Then,
g ᵒ f(1)= g(f(1))= g(2x1)= g(2)= 2+1= 3
g ᵒ f(2)= g(f(2))= g(2x2)= g(4)= 4+1= 5
g ᵒ f(3)= g(f(3))= g(2x3)= g(6)= 6+1= 7

Again,
f ᵒ g(1)= f(g(1))= f(1+1)= f(2)= 2x2= 4
f ᵒ g(2)= f(g(2))= f(2+1)= f(3)= 3x2= 6
f ᵒ g(3)= f(g(3))= f(3+1)= f(4)= 4x2= 8

Therefore,
gᵒf≠fᵒg

68 | P a g e Lesson 5: Relation and Its Properties


Pigeonhole Principle

“If more than n objects are placed into n boxes, then at least one box contain
more than one object”

Also known as the Dirichlet’s principle, the Pigeonhole principle might appear
too confusing and not clear but it is actually too obvious to be useful. This principle states
that if n+1 or more pigeons are placed in the n holes, then one hole must contain two or
more pigeons.

Imagine that 3 pigeons need to be placed into 2 pigeonholes. Is it possible? Yes.


Yes it can be done but with one catch; no matter how the pigeons are placed into the
holes, one hole will contain more than 1 pigeon.

Although a very simple and easily understandable concept, this is powerful theory
to prove truths that are impossible to be obvious.

For example,

Two or more people watching a movie in a cinema has the same birthday.

There are 366 days in a year (including February 29). Meaning, 366 possible
birth dates and if more than 366 people are watching in a cinema, then 2 of them
must be sharing the same birthday.

Another one,

A section composed of 14 boys and 22 girls is playing the game the Boat is Sinking.
How many members should a group be composed in order to form a group with at least
one female member?

Knowing the fact that there are 36 players with only 14 boys, having 15 members in
a group will surely guarantee that the 15 th member is a female. Therefore, the answer
is 15.

EXERCISE

(COMPOSITION OF FUNCTION)
1.) Let: f(x)= 3x+4
Find (f ᵒ f)(x)

2-4) Let: f(x)= 2x+1 and g(x)=x+3


A. Find (f ᵒ g)(x)
B. Find (g ᵒ f)(x)
C. Find (g ᵒ g)(x)

5.) Let: f(x)=3x+2 and g(x)= x+5


Find (g ᵒ f)(x)

69 | P a g e Lesson 5: Relation and Its Properties


(PIGEONHOLE PRINCIPLE)
Answer the following problems:

1) March 2020, a woman was said to be exactly 3 months pregnant. How many days
will it take to make sure that the baby is already delivered?

2) How many letter characters should a password be composed making sure that there
are at least 2 same letter in the password?

3) If John has a box containing 1 pair of yellow, red, blue, and black handkerchiefs,
how many handkerchiefs must John pull out of the box to guarantee that he has a
pair?

4.) How many cards should you pick in a deck making sure that at least two of the cards
will be spades?

5.) If a woman has 45 pairs of sandals, how many days will it take for her to repeat her
sandals if she uses one everyday?

70 | P a g e Lesson 5: Relation and Its Properties


Assessment

Representation And Ordering Of Relations

1. Using the table graph, show the association “number of letters” from a set of the colors:
blue, green, orange, red and yellow.

2. From the set of relation {(1,1), (1,2), (1,4), (2,1), (2,2), (2,4), (3,3), (4,3), (4,4)}, draw
the directed edges/lines to the digraph.

1 3

2 4

Functional Notation

For 3-4, consider the following problem,

A firm spends x dollars on product development and y dollars on advertising. Its profit is
described by the following relationship:

• f(x,y) = 46,000 + 50x + 40y + xy/100

3. What is profit if the firm spends $5,000 on product development and $15,000 on
advertising?

4. What is profit if the firm spends $8,000 on product development and $12,000 on
advertising?

Algebra of Function

71 | P a g e Lesson 5: Relation and Its Properties


Find the vertical and horizontal asymptote of the given rational function.
5. 2x^2+5/2x^2-8

Solve the following algebraic function using the given operation of function.

6. f(x)=x^2+3 and g(x) = x^3+6


f(x) + g(x)
f(x) - g(x)
f(x) × g(x)
f(x)/ g(x)
x=2

Composition Of Function And Pigeon Principle

7-8.) Prove that g ᵒ f ≠ f ᵒ g given that the starting domain for function g is limited to the even
values less than 10.
Let: g(x)= 2x
f(x)= x+1

9.) How many cards should you pick in a deck making sure that at least two of the cards will be
of the same suit/sign?

10.) How many birth certificates do you need to guarantee that there are at least 2 people who
have the same birth month?

72 | P a g e Lesson 5: Relation and Its Properties


References
REPRESENTATION AND ORDERING OF RELATIONS:

Aslam, A. (n.d). Discrete Mathematics and Its Applications 7th Edition. Retrieved from
https://www.slideshare.net/AdilAslam4/chapter-9-relations-in-discrete-mathematics

Hauskrecht, M. (n.d). CS 441 Discrete Mathematics for CS: Relations. Retrieved from
https://people.cs.pitt.edu/~milos/courses/cs441/lectures/Class21b.pdf

Representation of Relations. Retrieved from https://www.javatpoint.com/representation-of-


relations

He, M. (2009, August 2). CS381 Discrete Structures/Discrete Mathematics Web Course
Manual: Order Relations. Retrieved from
https://www.cs.odu.edu/~toida/nerzic/content/relation/order/order.html

Partial Order Relations. Retrieved From https://www.javatpoint.com/partial-ordering-relations

FUNCTIONAL NOTATION:

Abramson, J. (2019). Functions and Function Notation. Retrieved from


https://math.libretexts.org/Bookshelves/Precalculus/Book%3A_Precalculus_(OpenStax)/01
%3A_Functions/1.02%3A_Functions_and_Function_Notation

Hutchinson K. (n.d). Function Notation. Retrieved from https://www.algebra-class.com/function-


notation.html

Roberts, D. (n.d). Function Notation and Evaluation. Retrieved from


https://mathbitsnotebook.com/Algebra1/Functions/FNNotationEvaluation.html

Online Math Learning (n.d). Function Notation. Retrieved from


https://www.onlinemathlearning.com/function-notation.html

ALGEBRA OF FUNCTIONS:

Algebra-Of-Functions. (n.d.). Retrieved


http://www.mathmotivation.com/lectures/Algebra-Of-
Functions.pdf&ved=2ahUKEwiHwPqS2qLoAhVQWH0KHdMmCCMQFjAAegQIARAB&usg=
AOvVaw3iaYRwfbpZ8X8Yns-U1mIv&cshid=1584489184646. (n.d.).

Degree of Polynomials: Meaning, Calculation Methods, Solved Examples. (2019,


November 22). Retrieved from
https://www.toppr.com/guides/maths/polynomials/degree-of-polynomials/(n.d.).

Linear functions - mathcentre.ac.uk. (n.d.). Retrieved from


http://www.mathcentre.ac.uk/resources/mc-healthsciences/mc-linearfunctions-2009-1.pdf

Wallace, T. (n.d.). Retrieved from www.wallace.ccfaculty.org › ...PDF Functions - Algebra of


Functions

73 | P a g e Lesson 5: Relation and Its Properties


COMPOSITIION OF FUNCTION AND PIGEON PRINCIPLE:
Christ University (n.d). Discrete Mathematics Lectures. Retrieved from
https://sites.google.com/a/cs.christuniversity.in/discrete-mathematics-
lectures/functions/composition-of-functions

Christ University (n.d). Discrete Mathematics Structures. Retrieved from


https://sites.google.com/a/cs.christuniversity.in/1425002-discrete-mathematical-
structures/unit-i-foundations/k-composition-of-functions

Jaiswal, S. (2011). Composition of Functions. Retrieved from


https://www.javatpoint.com/compositions-of-functions

Tutorials Point (2006). Learn Discrete Mathematics. mathematical structures. Retrieved from
https://www.tutorialspoint.com/discrete_mathematics/discrete_mathematics_functions.ht
m

Veisdal, J. (2019). The Pigeonhole Principle. Retrieved from


https://medium.com/cantors-paradise/the-pigeonhole-principle-e4c637940619

74 | P a g e Lesson 5: Relation and Its Properties


LESSON 6: BASIC COUNTING PRINCIPLES

Overview
Combinatorics, the study of arrangements of objects, is an important part of
discrete mathematics. This subject was studied as long ago as the seventeenth century,
when combinatorial questions arose in the study of gambling games. Enumeration, the
counting of objects with certain properties, is an important part of combinatorics. We must
count objects to solve many different types of problems. For instance, counting is used to
determine the complexity of algorithms. Counting is also required to determine whether
there are enough telephone numbers or Internet protocol addresses to meet demand.

The basic rules of counting can solve a tremendous variety of problems. For
instance, we can use these rules to enumerate the different telephone numbers possible,
the allowable passwords on a computer system, and the different orders in which the
runners in a race can finish. Another important combinatorial tool is the pigeonhole
principle. This states that when objects are placed in boxes and there are more objects
than boxes, then there is a box containing at least two objects. For instance, we can use
this principle to show that among a set of 15 or more students, at least 3 were born on the
same day of the week.

Objectives
After successfully completing this lesson, the students should be able to:
• Identify the counting principles and rules that can be applied to a certain problem.
• Solve discrete mathematics problems that involve: computing permutations and
combinations of a set, and fundamental enumeration principle
• Apply counting principles to real life scenarios.

Course Materials
Sum Rule

If the task cannot be performed simultaneously, that means the first task can only
be performed in n1 ways and the second task can be performed in n2 ways. Then doing
whichever order task can be done in n1 + n2 ways. In simple terms, it states that the
number of ways either task 1 or task 2 can be done but strictly not both.

Here, we are generalizing the ways on how to define: n (A) +n (B) +n(C) or simply
A or B or C

Product Rule

If we can separate a procedure into two tasks and there are n1 ways to finish the
first task and n2 ways to finish the second after completing the first task. There should be

75 | P a g e Lesson 6: Basic Counting Principles


n1 – n2 ways to do the procedure. It states the number of ways that both tasks can be
done.

For this scenario we generalizing that there are n(A)×n(B)×n(C) ways to do A and
B and C

Generalized Product Rule

Suppose the Procedure consists sequential tasks: T1, T2, T3, T4, T5...Tm, it can
be done by n1, n2, n3, n4, n5, ways, respectively.

EXERCISE

1. Haniemay wants to try all the 23 dishes and 6 desserts in offered in PUP lagoon
but she is limited to 1 meal/dessert per day fortunately. How many days would It
take for her to try every meal/dessert in PUP lagoon?

2. How many passwords can a 3-digit numeric (0-9) produce?

3. In a sportsfest consisting of 40 males and 20 female members, if they were to pick


1 team leader, how many ways are there to choose a single team leader?

4. If there were 2 team leaders are to be chosen, how many male & female pairs are
possible

5. If there were 2 team leaders are to be chosen again but this time there should be
always 1 male team leader, how many mixed pairs are possible?

76 | P a g e Lesson 6: Basic Counting Principles


Permutations and Combinations

The next topic in basic counting is permutation. Permutation is where we count or


calculate the number of ways a certain outcome will appear. It depends whether the
chosen topics are ordered or not. I this case, we are trying to see the outcomes in an
ordered manner, so we will use permutations.
The ordered arrangement of the elements in A is called a permutation of set A. We
use P (n, r) to denote the number of r-permutations of a set with n elements when your
integers are non-negative.

𝑃 (𝑛, 𝑟) = 𝑛(𝑛 − 1)(𝑛 − 2) … (𝑛 − 𝑟 + 1) = 𝑛!


(𝑛 − 𝑟)! ∙ 1
A Permutation is an ordered Combination. Just think that if you will look for an
ordered outcome, you call for permutation of it. "A Permutation is a Position."

There are two types of permutation:


1. Repetition is allowed: When you engage in your padlock. It could be "999".
2. No Repetition: The first five students to pass the project.

Permutations With Repetition

This will be the easiest to calculate because we can repeat the choice and the
calculation is straightforward.

Example:
If you choose 3 objects with those of the same kind, your equation would be:
n×n×n (n multiplied 3 times)

Thus,
Example: 4 × 4 × 4 = 64
Now if you choose 3(r) objects out of 5(n) types, your equation would be:
n × n × ... (r number of times)

thus,
Example: 5 × 5 × 5 = 125
Where we can derive this equation:
n × n × ... (r number of times) = nr

Permutations Without Repetition

When we’re looking for an outcome without repetition, here, we have to use the
factorial (!) where n will be multiplied to n-1, n-2 and so on in decreasing order (ex.
5x4x3x2x1).

Example:
In how many ways can you put 64 candidates in order?

77 | P a g e Lesson 6: Basic Counting Principles


Let’s say you chose candidate number 34, therefore we can’t pick that candidate
again.
That will leave our first choice with 64 possibilities, and our next choice has 63
possibilities, then 62, 61, 60, . . . etc.

And the total permutations are:


64 × 63 × 62 × 61 × ... × 1 = 1.26886932186E89

But if you want to only pick 5 candidates:


64 × 63 × 62 × 61 × 60 = 914, 941, 440
We multiplied 64 only up to 60 because we only want 5 candidates
Without repetition, our choices get reduced each time.

EXERCISE

1. There are 4 Programming and 3 Discrete Structures books on the bookshelf.


Programming books should be placed on the left side of the bookshelf and Discrete
structures books on the right side of the bookshelf. How many ways are there to
arrange the books?

2. Nine students booked a room in a hotel. They should be accommodated in two 3-


bed and one 2-bed room. In how many ways can they be accommodated?
3. In how many ways can you have a sum of 15 by 3 playing cubes?

4. In a men's volleyball team, there are 4 spikers. A team of nerds were used as
targets. For every successful spike, the team scores 1 point and for every hit in the
face, the team scores 3 points. The team needs at least 25 points to end the
training session. In how many ways can the team end the training?
5. An 8 digit password is made of digits 91235564. How many possible passwords
are there?

78 | P a g e Lesson 6: Basic Counting Principles


Notation

Mathematicians and other people started to derive new formula instead of sticking
with the whole formula:

Permutation notation ->> P(n,r) = nPr = n!/(n-r)!

Example: P (10,2) = 90

Combination

• The act of combining or the way things are combined.


• There are two types of combination, repetition is allowed and repetition is not
allowed.

These are the formulas you will use in this lesson:


a. Combination without repetition:

𝑛!
𝐶 = (𝑛−𝑘)!𝑘!

b. Combination with repetition

(𝑘 + 𝑛 − 1)!
𝐶∗ =
(𝑛 − 1)𝑘!

NOTE: A tip on finding k from n is stated below:

1. How many different committees of five (k) people can be appointed from
ten (n) people?
2. How many possible combinations can a lottery ticket of 6 (k) numbers have
from a lottery that consists of 64 (n) balls?

So, in order to find k from n, you must first know that k is the number of
combinations from an n number of elements. In other words, k is most probably
the smaller number and n is the bigger number.

Repetition Is Not Allowed

• This is how lotteries work. First, the numbers are drawn one at a time. Second,
after drawing a certain pick of numbers, doesn’t matter what order they are
drawn, we win.

Example:
How many possible groups of four members can you create from a
selection of 15 people?

79 | P a g e Lesson 6: Basic Counting Principles


Answer: There are possible combinations of four-member
groups from a set of 15 people.

15 15! 15 ∗ 14 ∗ 13 ∗ 12
= = = 𝟏𝟑𝟔𝟓
4 4! 11! 4∗3∗2∗1

There are 1365 different committees.

Example: In how many ways can a conductor choose three


Soloists among five singers?

Solution: There are 5 singers to be taken 3 at a time.

Using the formula:

The conductor can choose the soloists in 10 ways.

Repetition Is Allowed

• When given a set of n elements, the combinations with repetition are different
groups formed by k elements of a subset so that the order of elements will not
matter and the elements are repeated
(𝑘 + 𝑛 − 1)!
𝐶=
(𝑛 − 1)𝑘!

Example: Ma’am Dastas asked you to add statement labels on your program.
How many labels can you form if you can only use a 3-letter statement or a 2-letter
statement followed by a number?

(5 + 4 − 1)! 8!
𝐶(5,4) = = = 70
(5 − 1)! 4! (4!)4!

Example: How many different ways can we have 3 scoops from 5 different flavors
of ice cream?

(3 + 5 − 1)!
𝐶= = 35
3! (5 − 1)!

80 | P a g e Lesson 6: Basic Counting Principles


EXERCISE

1. In a house of 10 people, how many ways can a squad of 4 people be arranged?

2. 15 participants have written their names on small sheets of paper for a raffle. Show
different ways on how the three names will be chosen.

3. School is over, your family is planning a vacation somewhere outside the city, and
your mom is letting you bring your five favorite books. Suppose there are 12 total
books (including academic books, history books), how many different ways can
you choose the five books?

4. On a circle there are 24 points selected. How many squares with edges in these
points exist?

5. On the plane there are 6 different points (no 3 of them are lying on the same line).
By joining all the points, how many segments do you get?

81 | P a g e Lesson 6: Basic Counting Principles


Assessment

1. A registration code begins with three numbers. If the possible numbers are 1, 2, 7, 9 and
0, how many different permutations of these numbers can be made if no number is used
more than once?

2. In how many ways can a fragger, a sniper and a medic be chosen from among 7 soldiers?

3. Suppose a landline number contains 5 digits. How many different landline numbers can
be made with the digits 0–9 if no digit is used more than once and the first digit is not 0?

4. How many words can be formed with the letters of the word "IZOLA" with or without
meaning?

5. In the confectioners 5 different sundae are sold. A father would like to buy 15 cups of
sundae for his family. In how many different ways can he buy the sundaes?

6. Ino Til wants to go countryside. The schedule for that day is 33 jeepney trips or 22 UV
services to head from home to AraAra Station. From the station, he can choose from 2
jeepney trips or 3 UV services to head to the countryside. This time, he has to purchase
a jeepney fee, or a UV Fee. If he only has money for 11 fees, how many ways are there
for him to get to the countryside?

7. Six friends Evan, Elijah, Miguel, Leo, Francis and Caev want to sit in a row at the cinema.
If only six cinema seats available, how many ways can we seat them?
8. How many positive divisors does 2000= (2^4)(5^3) have?
9. in a 5-digit numeric password, how many possible combinations are there if a digit cannot
be repeated?

10. In Classmate club, secret codes consisted of two letters followed by 3 digits. How many
possible secret codes are there?

82 | P a g e Lesson 6: Basic Counting Principles


References
Simon Fraser University. (n.d). Basic Counting Principles. Retrieved from
https://www2.cs.sfu.ca/CourseCentral/101.MACM/hskhangu/lecture01.pdf

Combinations. (2005). Retrieved from


https://www.onlinemathlearning.com/combinations.html

Combinations and Permutations. (n.d.). Retrieved from


https://www.mathsisfun.com/combinatorics/combinations-permutations.html

Combinations with Repetition. (n.d.). Retrieved from


https://www.superprof.co.uk/resources/academic/maths/probability/combinatorics/combi
nations-with-repetition.html

Divide - math word problem. (n.d.). Retrieved from


https://www.hackmath.net/en/math-problem/15273?tag_id=146

Permutations and Combinations. (n.d.). Retrieved from


https://www.mathsisfun.com/combinatorics/combinations- permutations.html

Pierce, Rod. (30 Sep 2018) “Combinations and Permutations.” Math is Fun. Retrieved 17 Mar
2020 from
http://www.mathisfun.com/combinatorics/combinations-permutations.html

Simmons, B. (2000). Combination Formula. Retrieved March 13, 2020,


from https://www.mathwords.com/c/combination_formula.htm

Simon Fraser University. (n.d). Basic Counting Principles. Retrieved from


https://www2.cs.sfu.ca/CourseCentral/101.MACM/hskhangu/lecture01.pdf

Permutation Problems. Retrieved 17 Mar 2020 Retrieved from


https://www.onlinemathlearning.com

83 | P a g e Lesson 6: Basic Counting Principles


LESSON 7: SUMMATION AND SERIES

Overview
Sequences are ordered lists of elements, used in discrete mathematics in many
ways. For example, they can be used to represent solutions to certain counting problems.
They are also an important data structure in computer science. We will often need to work
with sums of terms of sequences in our study of discrete mathematics. A "series" is what
you get when you add up all the terms of a sequence; the addition, and the resulting value,
are called the "sum" or the "summation". Summation notation (or sigma notation) allows
us to write a long sum in a single expression.

Objectives
After successfully completing this lesson, the students should be able to:
• Apply different techniques used to find formula and terms in a series
• Solve discrete mathematics problems that involves summation series.
• Use mathematical induction in solving summation and series.

Course Materials

Sequences

Definition (1): Sequence is an ordered list of numbers, containing any set of positive or
natural numbers. It may appear as a finite sequence or as an infinite sequence.
Notation: where an is the nth term of the sequence and a1, a2, a3, … is the first, second,
third term and so on ...

Example (1): {1, 2, 3, 4,..}


Denoted as a1 = 1, a2 = 2, a3 = 3, a4 = 4

Example (2): an = 5n, where n = 1, 2, 3, 4, ...


(5)n = (5)1, (5)2, (5)3, (5)4, ...
= {5, 25, 125, 625, ...}

Arithmetic Progression

Definition (1): A sequence of numbers called an arithmetic progression contains two or


more successive members that has the same difference called the common difference
(d).
Notation: where an is the initial term and d is the common difference,
Common difference: d = a2 – a1

Example (1): The sequence {2, 5, 8, 11, 14, ...} has a common difference of what?

84 | P a g e Lesson 7: Summation and Series


= a2 = 5, a1 =2;
= 5 – 2;
d = 3;

Example (2): The sequence {15, 10, 5, 0, -5, -10, ...} has a common difference of
what?
= a2 = 10, a1 =15;
= 10– 15;
d = -5;

Recursive Formula For Arithmetic Progression

Definition (1): A recursive formula allows finding any term of an arithmetic progression by
multiplying the common difference d to (n-1) and adding it to the first or initial term of the
sequence.
an = a1 + d(n-1)

Example (1): {40, 37, 34, 31, …}


d = a2 – a1
d = 37 – 40; = -3
4th term =?
a4 = 40 - 3(4-1); = 40 - 3(3)
a4 = 31

Example (2): {2, 5, 8, 11, …}


d=5–2
d=3
3rd term =?
a3 = 2 + 3(3-1); = 2 + 3(2)
a3 = 8

EXERCISE

A. Find the next three terms of each arithmetic progression/sequence


1) {3, 6, 9, 12, 15, …} = ______________
2) {-21, -14, -7, 0, …} = ______________
3) {15, 11, 7, 3, -1, …} = ______________

B. Find the common difference of each arithmetic progression


4) {99, 199, 299, 399} = _______________
5) {266, 282, 298, 314} = _______________

85 | P a g e Lesson 7: Summation and Series


Geometric Progression

Definition (1): A sequence of numbers called geometric progression is found by


multiplying the previous term with its common ratio/the factor between terms.
a, ar, ar2, ar3, …
Notation: where a is the initial term of the geometric progression and r is the common
ratio.
Common Ratio: r = a2/a1

Example (1):
a = 15, r = 3; 5th =?
15, 15 x 3, 15 x 32, 15 x 33, 15x 34
(15, 45, 135, 405, 1 215)
5th = 1 215

Example (2):
a = 30, r = 2; 4th =?
30, 30 x 2, 30 x 22, 30 x 23
(30, 60, 120, 240)
4th = 240

Recursive Formula For Geometric Progression


Description (1): The recursive formula of geometric progression shows the relationship
between terms by multiplying the term to its common ratio raised to (n-1).
an =ar (n-1)

Example (1):
a = 15, r = 3
5th term: a5 = 15 x 3(5-1) = 15 x 34
= 15 x 81
= 1 215

Example (2):
a = 30, r = 2
4th = a4 = 30 x 2(4-1) = 30 x 23
= 30 x 8
4th term = 240

EXERCISE
A. Answer the following questions.

1) Find the terms a2, a3, a4 and a5 in geometric sequence, if a1 = 10 and the
common ratio is
r = - 1.

2) Find the 10th term of the geometric sequence, if a1 = 45 and the common ration
r = 5.
=

86 | P a g e Lesson 7: Summation and Series


3) Find the common ratio for the sequence given by 1, 2/4, 4/16, …
=

4) Find the common ratio for the sequence given by 100, 0, 0, …


=

5) Find the common ratio for the sequence given by 1, 3/4, 9/16, …
=

87 | P a g e Lesson 7: Summation and Series


Fibonacci Sequence

Definition (1): A series of numbers that starts with a zero followed by a one and two
previous numbers is added up to find the next sequence of numbers (0, 1, 1, 2, 3, 5, 8,
13, 21, 34, ...).
xn = xn-1 + xn-2
Notation: where xn is the nth term and xn-1 is the previous term and xn-2 is the term before
the previous term.

Example (1): x8 =?
x8 = x7 + x6
= 13+ 8
x8 = 21

Example (2): x10 =?


x10 = x9 + x8
= 34 + 21
x10 = 55

EXERCISE

A. Answer the following questions.


1) Find the 15th term of the Fibonacci sequence.
=
2) Find the 10th term of the Fibonacci sequence.
=
3) Find the 20th term of the Fibonacci sequence.
=

B. Fill in the blanks of the missing corresponding values in the Fibonacci sequence.
4) 21, 34, 55, 89, ____, ____

5) 5, 8, 13, 21, ____, ____

88 | P a g e Lesson 7: Summation and Series


Summation
Definition (1): Summation is the act of adding terms in a sequence to be able to get the
sum of all terms in a sequence.
a1 + a2 + a3 …. + an
n = upper
∑ ai = a k + a k +… + an
i=k = lower

Notation: where i is the index of summation.


k is the lower limit
n is the upper limit

Example (1):
5
∑ (3(n)-1) = (3(3) -1 + 3(4) -1 + 3(5)-1)
j=3
= 8 + 11 + 14
= 33

Example (2):
4
∑ 10k = 10(1) + 10(2) + 10(3) + 10(4)
k=1
= 10 + 20 + 30 + 40
= 100

Arithmetic Series

Definition (1): An arithmetic series is the sum of the terms of an arithmetic sequence. It
is equal to n multiplied by the total average of the 1st and last term.
S = n (a1+an / 2)

Example (1): 2 + 4 + 6 + 8 +…. 100


Where a1 = 2 and d = 2 and n =25;
S = 25(2 + 100 / 2)
= 25 (51)
S = 1 275

Theorem:

Proof:

Example (1):
100 100 100
∑ (2 + 2i) = ∑ 2 + ∑ 2i
i =1 i=1 i=1
100 100

89 | P a g e Lesson 7: Summation and Series


=2 ∑ 1 + 2 ∑ i
i=1 i=1
= 2(100) + 2(100(100 + 1)/2)
= 400 + 10 100
= 10 500
Note:

∑ 1 = n;
𝑖=1
𝑛
𝑛(𝑛 + 1)
∑= ;;
2
𝑖=1

EXERCISE

A. Evaluate the following questions.

1.
5

∑ 2i =
𝑖=1
2.
10

∑ 6i =
𝑖=1
3.
5

∑(4(i) − 1) =
𝑖=0

4.
50

∑(−5i + 12) =
𝑖=1
5.

90 | P a g e Lesson 7: Summation and Series


275

∑(−5i + 12) =
𝑖=1

91 | P a g e Lesson 7: Summation and Series


Geometric Series

Definition (1): The sum of all the terms of a geometric progression is called geometric
series.

Theorem:
𝑛
𝑟𝑛 − 1
∑(𝑎𝑟 𝑘 ) = 𝑎 [ ]
𝑟−1
𝑘=0

Example (1):

3
𝑘
𝑟𝑛 − 1
∑ 2(7) = 𝑎 [ ]
𝑟−1
𝑘=0

𝑘
74 − 1
∑ 2(7) = 2 [ ]
7−1
𝑘=0
2401 − 1 2400
=2 [ ]= 2 [ ] = 2 ∗ 400 = 𝟖𝟎𝟎
7−1 6

= 2(7)0 + 2(7)1 + 2(7)2 + 2(7)3 ; = 2 + 14 + 98 + 686

= 800

EXERCISE
A. Evaluate the given Geometric Series.

1.
7

∑ 2𝑗−1
𝑗=1
2.
10

∑ 8𝑗−1
𝑗=1
3.
5

∑ 2(10) 𝑗
𝑗=0

92 | P a g e Lesson 7: Summation and Series


4.
5

∑ 5𝑗−1
𝑗=1
5.
7

∑ 2(8)𝑗
𝑗=0

93 | P a g e Lesson 7: Summation and Series


Infinite Geometric Series

Definition (1): The infinite geometric series is the total sum of terms inside of an infinite
geometric sequence.

Example (1):
3 + 2 + 4/3 + 8/9 + 16/27 + …

To get the common ratio we divide the second term by the first term:
r = a2/a1 in this case this is represented by:

r = 2/3
r = a3/a2;
r = 4/3 / 2
= (4/3 / 2) 3
= 4/6 or 2/3
r = 2/3

S = a1 / 1 – r
(Note: You can only use this method if r is < 1 but not equals to 0)
S = 3 / 1 – 2/3
= (3) 3 / (1 – 2/3) 3
= 9 / 3 – 2; 9/1
S = 9;
(S = is the sum of the infinite geometric sequence)
In Sigma notation or summation, the Infinite geometric series is presented
like this:


𝑎
∑ 𝑎𝑟 𝑛−1 =
1−𝑟
𝑛=1
Example (2):

4 4 16 64
∑( )𝑛−1 = 1 + ( ) + ( ) + ( )+⋯
5 5 25 125
𝑛=1

Listing of terms:
Where:
a = 1 and r = 4/5
0th term = (4/5 )1-1 = (4/5)0 = 1;
1st term = (4/5)2-1 = (4/5)1 = 4/5
2nd term = (4/5)3-1 = (4/5)2 = 16/25
3rd term = 64/125;
Because r is less than 1:

94 | P a g e Lesson 7: Summation and Series


𝑎 1 5
𝑆= = 4
∗5
1−𝑟 (1−(5))
5 5
𝑆= =
5−4 1
𝑺= 𝟓
EXERCISE
A. Evaluate the following Infinite Geometric Sequences.

1.

2
∑(8 ( ))𝑛−1
3
𝑛=1
2.

2
∑(4 ( ))𝑛
5
𝑛=0
3.

2
∑(8 ( ))𝑛−1
3
𝑛=1

4.

8 𝑛
∑(5 ( ))
25
𝑛=1
1
5. 8+4+2+1+ +
2
1
+⋯
4

95 | P a g e Lesson 7: Summation and Series


Assessment

A. Determine whether the sequences below form an Arithmetic progression. If they do,
identify its common difference (d).

1) -1.2, -1.4, -1.6, -1.8, -2, …


________________________
2) 7, 10, 16, 19, 25, ….
________________________

B. Write the geometric sequence using the general term.

3) an = 2 x (5) n+1
=
4) an = -5 x (3) n-1
=
5) an = -10 x (-5) n-1
=

C. Evaluate the given questions.

6) In the arithmetic sequence 1, 3, 5, 7, 9, …


a. What is the common difference?
b. What is the 10th element?
7) Fill the missing elements in the arithmetic sequence: 10, 7, a, 1, b, …
a. ____
b. ____
8) Base on your answer in 7.
a. What is the common difference of the sequence?
b. What is the 8th element in the sequence?
9) What is the sum of the arithmetic series 2, 4, 6, 8, 10?
=

D. Evaluate the given Infinite Geometric Series

10)

𝑝𝑛
∑ 𝑛−2
3
𝑛=1

96 | P a g e Lesson 7: Summation and Series


References
Math 10 Banners (2020, March). Arithmetic Progression. Retrieved from
https://www.math10.com/en/algebra/arithmetic-progression.html

Aslam, A. (2016, November 25). Sequences and Summation in Discrete Mathematics.


Retrieved from https://www.slideshare.net/AdilAslam4/sequences-and-summations-in-
discrete-mathematics

Bhardwaj et al. (2020, March). Geometric Progressions. Retrieved from


https://brilliant.org/wiki/geometric-progressions/

Everything Computer Science (2020, March). Summations. Retrieved from


https://everythingcomputerscience.com/discrete_mathematics/Summations.html

Lumen Learning (2020, March). Explicit Formulas for Geometric Sequences.


Retrieved from
https://courses.lumenlearning.com/waymakercollegealgebra/chapter/explicit-formulas-
for-geometric-sequences/

Lumen Learning (2020, March). Explicit Formulas for Arithmetic Sequences. Retrieved from
https://courses.lumenlearning.com/waymakercollegealgebra/chapter/formulas-for-
arithmetic-sequences/

Math is Fun (2016, March). Fibonacci Sequence. Retrieved from


https://www.mathsisfun.com/numbers/fibonacci-sequence.html

Math is Fun (2016, March). Geometric Sequence. Retrieved from


https://www.mathsisfun.com/algebra/sequences-sums-geometric.html

Math is Fun (2016, March). Infinite Series. Retrieved from


https://www.mathsisfun.com/algebra/infinite-series.html

Varsity Tutors (2010, March). Infinite Geometric Series. Retrieved from


https://www.varsitytutors.com/hotmath/hotmath_help/topics/infinite-geometric-series

97 | P a g e Lesson 7: Summation and Series


LESSON 8: MATHEMATICAL INDUCTION

Overview
Proofs using mathematical induction have two parts. First, they show that the
statement holds for the positive integer 1. Second, they show that if the statement holds
for a positive integer then it must also hold for the next larger integer. Mathematical
induction is based on the rule of inference that tells us that if P(1) and ∀k(P(k) → P(k + 1))
are true for the domain of positive integers, then ∀nP (n) is true. Mathematical induction
can be used to prove a tremendous variety of results. Understanding how to read and
construct proofs by mathematical induction is a key goal of learning discrete mathematics.

Objectives
After successfully completing this lesson, the students should be able to:
• Apply mathematical induction and other techniques to prove mathematical
results.
• Construct induction proofs involving summations, inequalities, and divisibility
arguments.

Course Material

Mathematical Induction

Mathematical induction is a proof technique used to verify if a statement, a


formula or a theorem is TRUE for every natural number.

For example,
1 + 3 + 5 … + (2𝑛 − 1) = 𝑛2
This formula affirms that the sum of consecutive numbers from 1 to 2n-1 is equal
to the square root of n (√𝒏). We want to prove that this will be true for n = 1, n = 2, n =
3, and so on. So now we can test the formula for any given number, let n = 3:
1 + 3 + 5 = 32
9=9

Thus, it is TRUE. It is also true for n = 4:

1 + 3 + 5 + (2(4) − 1) = 42
16 = 16
But how do we prove that this technique is true for every value of n?

98 | P a g e Lesson 8: Mathematical Induction


Principle of Mathematical Induction

In order to prove that P(n) is true for every natural numbers n, where P(n) is a
propositional function, we complete two (2) steps:

1.) Basis step – in this step, we determine if the first iteration P(1) is true.
2.) Inductive step – in this step, for every natural numbers k, if P(k) is true,
then P(k+1) is also true. The inductive step can be represented as P(k) →
P(k+1).

The inductive step is still incomplete.

So as to complete the step, we must assume that P(k) is true for an


arbitrary natural number k, while under this assumption, P(k+1) must also be true.

The assumption that P(k) is true is called the inductive hypothesis.


If we have successfully completed both steps, we have shown that P(n) is true for
every natural numbers.
This proof technique can be expressed in rule of inference as:

(𝑃 (1) ∧ ∀ 𝐾 (𝑃 (𝑘 ) → 𝑃 (𝑘 + 1))) → ∀ 𝑛𝑃 (𝑛),

Where the domain is the set of natural numbers.


Here is another example in detail:

For instance,
3 + 7 + 11 … (4𝑛 − 1) = 𝑛(2𝑛 + 1)
As shown above, we are asserting that the sum of consecutive numbers from 1
to n. We want to prove that this will be true for n = 1, n = 2, n = 3, and so on.

Now we can test the formula for any given number, let n = 1:
3 = 1(2(1) + 1)
3 = 1(2 + 1)
3 = 1(3)
3=3
3 = 3 is TRUE.
Now, let’s try n = 3:
3 + 7 + 11 = 3(2(3) + 3)
21 = 3(6 + 3)
21 = 3(9)
21 = 21
21 = 21 is TRUE.

99 | P a g e Lesson 8: Mathematical Induction


The outcome MAY be TRUE for ALL TERMS, but WHAT IF it is FALSE for
other arbitrary terms, for instance the 5th or the 24th term? How will we prove this rule
for every value of n?
Rather than performing the test multiple times, there is a method to prove that the
statement will be true for all value of n.

1.) First, we’ll see if the statement is TRUE for any specific number k (e.g. 104).
2.) And then, we’ll see if it is ALSO TRUE for k+1 (e.g. 105).
3.) If statement k and k+1 are both TRUE, therefore, it will ALSO BE TRUE for
the term after k+1. It will be TRUE for any natural number we choose.

Mathematical Induction Is Useful In Proving

• Theorems about graphs and trees.


• The accuracy of certain types of computer programs.
• Results about the complexity of algorithms.
• Wide range of identities and inequalities.

NOTE: Mathematical induction is not applicable for finding a new formulae or theorems.
It is only used to prove the results obtained in the same way.

100 | P a g e Lesson 8: Mathematical Induction


EXERCISE

1.) Mathematical induction is useful in determining whether the statement REMAINS


TRUE with any natural number as k. Is the statement TRUE or FALSE?

2.) We have only one (1) step that we may utilize in Mathematical induction – the
Inductive step. Is this statement TRUE or FALSE?
a. Underline only the PART that makes the following statement erroneous:
“The Basis step helps in determining whether the first iteration of the
statement, which is P(k+10), is TRUE.”

3.) In a statement in Mathematical induction, we may only use positive integers or


natural numbers for k. Is this statement TRUE or FALSE?

4.) We use k and k+1 for the Inductive step and Basis step respectively.
Is this statement TRUE or FALSE?

5.) Prove that given any integer for n, n3 + 2n will be divisible by 3.


𝒏𝟐 (𝒏+𝟏)𝟐
6.) 𝟏𝟑 + 𝟐𝟑 + 𝟑𝟑 + … + 𝒏𝟑 =
𝟒

𝟏 𝟏 𝟏 𝟏 𝒏
7.) + + + …+ = , given that any integer for n is positive.
𝟏(𝟐) 𝟐(𝟑) 𝟑(𝟑) 𝒏(𝒏+𝟏) 𝒏+𝟏

8.) Write the formal proof that 𝟐𝒏+𝟐 + 𝟑𝟐𝒏+𝟏 is divisible by 7 for all positive integers.

9.) Is 𝟗𝒏 + 𝟑 is divisible by 4? PROVE IT!

101 | P a g e Lesson 8: Mathematical Induction


Assessment

1.) Mathematical induction is useful in knowing whether a statement remains _____ for
every ______ ________.

2.) We may utilize two (2) steps in Mathematical induction,


the ______ step and the _______ step.

3.) We use the ______ step in instances where we need to test if P(k) is TRUE with every
______ ________ as k. For instance, to see if both P(k) and P(k+1) are TRUE.

4.) We use the __________ when we need to determine only the first iteration of P(k).

5.) Mathematical induction MAY be used for finding new formulae and theorems. Write T if
the statement is FALSE, otherwise write F.

𝑛2 (𝑛+1)2
6.) 13 + 23 + … + 𝑛3 =
4

𝑛2 (𝑛+1)2
7.) 13 + 23 + … + 𝑛3 =
4

8.) 1 + 2 + 22 + … + 2𝑛−1 = 2𝑛 − 1

(𝑛)(𝑛+1)(𝑛+2)
9.) 1(2) + 2(3) + 3(4) + (𝑛)(𝑛 + 1) =
3

𝑛(𝑛+1)(2𝑛+1)
10.) 12 + 22 + … + 𝑛 2 = 6

102 | P a g e Lesson 8: Mathematical Induction


References
Dobson, K., & Slomson, A. (n.d.). Proof by Induction : Further Examples. Retrieved March, 2020
from mathcentre: http://www.mathcentre.ac.uk/resources/uploaded/mathcentre-
proof2.pdf
Mathematical Induction. (n.d.). Retrieved March, 2020 from MathsIsFun.com:
https://www.mathsisfun.com/algebra/mathematical-induction.html
Mathematical Induction - Problems With Solutions. (n.d.). Retrieved March, 2020 from
analyzemath.com:
https://www.analyzemath.com/math_induction/mathematical_induction.html
Rosen, K. H. (2012). Discrete Mathematics and Its Applications (7th ed.). New York, NY: The
McGraw-Hill Companies, Inc. Retrieved March, 2020
Simplifying Polynomial Fractions. (n.d.). Pearson Prentice Hall. Retrieved March, 2020 from
Alliance Gertz-Ressler High School:
http://www.gertzresslerhigh.org/ourpages/auto/2013/1/8/49315658/Std%2012.pdf
Spector, L. (n.d.). Mathematical induction - Topics in precalculus. Retrieved March, 2020 from
TheMathPage: http://www.themathpage.com/aPreCalc/mathematical-induction.htm
Tutorials Point India Ltd. (n.d.). Mathematical Induction - Tutorialspoint. Retrieved March, 2020
from Tutorialspoint:
https://www.tutorialspoint.com/discrete_mathematics/discrete_mathematical_induction.ht
m

103 | P a g e Lesson 8: Mathematical Induction


LESSON 9: INTRODUCTION TO GRAPHS

Overview
Graphs are discrete structures consisting of vertices and edges that connect these
vertices. There are different kinds of graphs, depending on whether edges have directions,
whether multiple edges can connect the same pair of vertices, and whether loops are
allowed. Problems in almost every conceivable discipline can be solved using graph
models. Using graph models, we can determine whether it is possible to walk down all
the streets in a city without going down a street twice, and we can find the number of
colors needed to color the regions of a map. Graphs can be used to determine whether a
circuit can be implemented on a planar circuit board. We can distinguish between two
chemical compounds with the same molecular formula but different structures using
graphs. We can determine whether two computers are connected by a communications
link using graph models of computer networks. This lesson will introduce the basic
concepts of graph theory and present many different graph models. To solve the wide
variety of problems that can be studied using graphs, we will introduce many different
graph algorithms. We will also study the complexity of these algorithms.

Objectives
After successfully completing this lesson, the students should be able to:
• Identify different types of graphs and its applications.
• Illustrate different traversal methods for trees and graphs.
• Model problems in Computer Science using graphs and trees.

Course Materials
Graph
A graph is made up of points and lines between those points. These points are
also called as nodes or vertices, and the lines between them are called as edges.
Edges connect the endpoints of these vertices.
NOTE: A graph can be identified as an infinite graph or finite graph.
Infinite Graph - a graph is said to be an infinite graph if it consists of an infinite or
set of vertices and edges.
Finite Graph - on the other hand, a graph is finite if it consists of a finite or defined
set of vertices and edges.

104 | P a g e Lesson 9: Introduction to Graphs


Types of Graph

1. Simple Graph - a graph is considered as a


simple graph if it connects two different
vertices and if there are no two edges
connecting to the same pair of vertices. In
other words, there’s no loop in this type of
graph.

2. Multigraph - a graph is considered as


multigraph if its multiple edges are connected to
the same pair of vertices. Meaning, this type of
graph has loops.

3. Directed Graph - a graph is considered as


directed graph when its edges have direction,
represented by arrows which implies the relation from
only one vertex to another but not vice versa.

Notice that in the given graph, a is related to b, but


b is not related to a and the same thing goes to b and c,
and c and a.

4. Undirected Graph - a graph is considered undirected


when its edges have no direction. For example, the given
graph is undirected since the relation between a and b,
and b and a goes both ways.

5. Connected and Disconnected Graph - a graph is


connected if any of its two vertices are connected by a
path. The graph is disconnected if at least two of its vertices are not connected
by a path.

6. Weighted and Unweighted Graph -


a graph is weighted when numerical values are assigned to its edges. It is
unweighted if its edges are not valued.

105 | P a g e Lesson 9: Introduction to Graphs


Terminologies In Graph

To further understand the following terms, refer to every graph presented.


A vertex is the node of a graph. An edge connects two vertices. This edge is
attached to the end (endpoints) of the vertices.

The origin of a vertex is the first endpoint of a directed edge and the other end is
its destination.

106 | P a g e Lesson 9: Introduction to Graphs


Two vertices are called adjacent if they are endpoints of the same edge.

Incident - when the vertex of an edge is one of the edges endpoints

107 | P a g e Lesson 9: Introduction to Graphs


An edge of a vertex is described as outgoing edges if they are directed and if its
origin is that vertex.

An edge of a vertex is described as incoming edges if they are directed and its
destination is that vertex.

Two vertices are described as adjacent and neighbors if the endpoints of an edge
are those two vertices.

Notice that in the graph A and B are adjacent, but A and


D are not.

Degree refers to the number of edges


incident on a node or vertex.
The degree of B in the given graph
is 2.

108 | P a g e Lesson 9: Introduction to Graphs


The number of edges entering a node or vertex is called in degree. On the other
hand, out degree refers to the number of edges leaving a node.
NOTE: degree= in degree + out degree

In degree of vertex 2: 2
Out degree of vertex 2: 3

Note: In an undirected graph, the degree


of a vertex is the number of edges incident
with it, except that a loop at a vertex
contributes twice to the degree of that
vertex. The degree of the vertex v is
denoted by deg(v).

THEOREM 1: shows that the sum of the degrees


of the vertices of a n undirected graph is even.

The Handshaking Theorem

Let G = (V, E) be an undirected graph with m edges. Then:

∑ deg(𝑣)
𝑣∈𝑉

NOTE: This applies even if multiple edges and loops are present.

Example on theorem 1:
How many edges are there in a graph with 10 vertices each of degree six?
Solution: because the sum of the degrees of the vertices is 6*10 = 60, it follows
that 2m = 60 where m is the number of edges. Therefore, m = 30.

THEOREM 2: An undirected graph has an even number of vertices of odd degree.

Proof: Let V1 and V2 be the set of vertices of even degree and the set of vertices of odd
degree, respectively, in an undirected graph G = (V, E) with m edges. Then:

2𝑚 = ∑ deg(𝑣) = ∑ deg(𝑣) + ∑ deg(𝑣)


𝑣∈𝑉 𝑣∈𝑉1 𝑣∈𝑉2

The first term in the right-hand side of the last equality is even, because deg(v) is
even for v∈ V1. Furthermore, because this sum is 2m, the sum of the two terms on the
right-hand side of the last equality is even. Hence, the second term in the sum is also
even. There must be an even number of such terms, because all the terms in this sum are
odd. Thus, there are an even number of vertices of odd degree.

109 | P a g e Lesson 9: Introduction to Graphs


Directed edges reflect the fact that edges in directed graphs have directions based
on the terminology for graphs.
A path refers to the sequence of vertices and edges such that each successive is
connected by edge. A path is described as simple if each vertex is distinct. When the
terminal vertex of a path coincides with its initial vertex, it is called circuit.

Path = { 1, 2, 4, 5, 4 }
Simple Path = { 1, 2, 4, 5 }
Circuit = { 1, 2, 4, 5, 4, 1 }

Cycle refers to a path that


starts from a vertex and ends to itself.
A graph is described as cyclic if it
consists of cycle and as acyclic if it
has no cycle.

110 | P a g e Lesson 9: Introduction to Graphs


Representation Of Graphs

We will use the graph below to show the different ways in representing a graph.

Adjacency Matrix Representation

Adjacency Matrix is used to represent a finite graph and its element is used to
indicate whether the pairs of vertices are adjacent or not. We use the formula n x n (n is
the number of vertex) to determine the number of elements in the matrix. If there is an
edge from vertex i to vertex j, we represent it using 1, but if none, we use 0. The source
vertices are represented by row, while column represents the destination vertices.

NOTE: If the graph is undirected, the matrix will be symmetric.


Representing the given graph above using the adjacency matrix will be like:

Adjacency List

In the adjacency list, each vertex is associated with its neighboring vertices or
edges (all the vertex stores a list of adjacent vertices). In other words, in this
representation, a vertex contains a pointer to a linked list of all the out-neighbors of that
vertex.

111 | P a g e Lesson 9: Introduction to Graphs


Now, using adjacent list to represent our given graph, it will look like this:

Adjacency Array

Adjacency array is similar to adjacency list. In this type of representation, we


keep the neighbors of all vertices consecutively in an array and we also keep and array of
indices separately that will tell us the location of the neighbors of each vertex in the first
array.

Using adjacency array, the given graph will look like this:

112 | P a g e Lesson 9: Introduction to Graphs


EXERCISE

1. For each of the following, try to give two different unlabeled graphs with the given
properties, or explain why doing so is impossible.
a. Two different trees with the same number of vertices and the same number
of edges. A tree is a connected graph with no cycles.
b. Two different graphs with 8 vertices all of degree 2.
c. Two different graphs with 5 vertices all of degree 4.
d. Two different graphs with 5 vertices all of degree 3.

2. Which of the graphs below is a simple path? Justify your answers.

3. You are a city engineer tasked to graph a model that represents the proposed
subway system in a large city. Should edges be directed or undirected? Should multiple
edges be allowed? Should loops be allowed? Explain.

4. In a round-robin tournament the SKT T1 beat the Invictus Gaming, the SKT T1
beat the TSM, the SKT T1 beat the Fnatic, the Invictus Gaming beat the TSM, the Invictus
Gaming beat the Fnatic, and the TSM beat the Fnatic. Model this outcome with a directed
graph.

5. The number of edges in a regular graph of degree 46 and 8 vertices is


____________
a) 347
b) 230
c) 184
d) 18

113 | P a g e Lesson 9: Introduction to Graphs


Trees

Trees are connected and acyclic graphs that contain no simple circuits is called a
tree. This graph was first used by the English mathematician Arthur Cayley in 1857 to
count certain types of chemical compounds.

Application Of Trees

Trees are used to construct efficient algorithms for locating items in a list.
Trees can be used to study games such as checkers and chess and can help to
determine winning strategies for playing these games. It can also be used to model
procedures carried out using a sequence of decisions.

General Trees

General trees consist of vertices and each vertex can have a minimum degree of
1 and maximum degree n. We use the formula n+1 to partition it into subsets wherein the
root of the tree is the first subset.

114 | P a g e Lesson 9: Introduction to Graphs


Directed Trees

An acyclic directed graph is classified as directed tree. Directed tree has an


indegree of 0 and all other nodes have an indegree of 1.

External node (terminal node or leaf) - node or vertex with outdegree of 0.

Internal node - node or vertex with an outdegree of greater than or equal to 1.

115 | P a g e Lesson 9: Introduction to Graphs


Rooted Trees

A rooted tree is a directed tree with exactly one node (root) that has incoming
degree of 0 while all other vertices have incoming degree of 1.

Application Of Graph
There are various applications of graphs, but here are some of the common
applications.

Social Network
This graph shows who
communicates with whom. Social
networks are a representation of your
twitter followers, Facebook friends, G-
mail etc. and how you connect with
each other. Vertices represent the
sender or receiver of information and
the edges represent the network.

116 | P a g e Lesson 9: Introduction to Graphs


Transportation Network

In transportation networks,
the stops or destinations are
represented by vertices, and the
edges represent the link between
them. This can be observed when
you use Google Maps.

Network Packet Traffic Graphs

This graph is used to identify legal or illegal activity for network security of a
computer. The IP or internet protocol addresses are represented by vertices, while the
edges represent the packets.

117 | P a g e Lesson 9: Introduction to Graphs


Graphs in Compilers

This graph is used in visualizing and analyzing data flow. It can also be used I n
other processes in optimizing database languages.

118 | P a g e Lesson 9: Introduction to Graphs


Robot Planning

In this graph, the vertices represent the state or stages a robot must undergo, while

the edges represent the possible transition between the states.

119 | P a g e Lesson 9: Introduction to Graphs


EXERCISE

1. Which of these graphs are trees?

2. Which of these graphs are trees?

3. A _____________ is a tree the vertices of which are assigned unique numbers from 1
to n
A. Unlabeled Tree
B. Labeled Tree
C. Direct Tree
D. Indirect Tree

120 | P a g e Lesson 9: Introduction to Graphs


4. An _____________ is a tree the vertices of which are not assigned any numbers.
A. Unlabeled Tree
B. Labeled Tree
C. Direct Tree
D. Indirect Tree

5. An email with malicious content starts to spread when a person opens the email and
it automatically sends a letter to five others.
Each person who receives the email either opens it and emails are sent again to
5 persons who have never received it or marks it as spam. Suppose that 10,000 people
send out the email before the chain ends and that no one receives more than one email.
How many people receive the email, and how many marks it as spam?

121 | P a g e Lesson 9: Introduction to Graphs


Assessment

1. The vertex set and the edge set are finite sets in a ______
a) finite graph
b) bipartite graph
c) infinite graph
d) connected graph

2. _______ cannot be a part of a bridge.


a) a simple cycle
b) a tree
c) a clique with size ≥ 3 whose every edge is a bridge
d) a graph which contains cycles

3. In a directed graph modeling a round-robin tournament, what do the in-degree and the out-
degree of a vertex represent?

4. If a full binary tree has 1000 internal vertices, how many edges does it have?

5. A____________ can be on a non-planar graph.


a) complete graph
b) subgraph
c) line graph
d) bar graph

6. If a tree has 10,000 vertices, how many edges does the tree have?

7. A Balanced Tree has an equal number of items on each subtree.


___ True ___ False

8. Suppose 1000 people enter a Tekken tournament. Use a rooted tree model of the tournament
to determine how many games must be played to determine a champion, if a player is eliminated
after one loss and games are played until only one entrant has not lost.

9. For each course at a university, there may be one or more other courses that are its
prerequisites. How can a graph be used to model these courses and which courses are
prerequisites for which courses?
Should edges be directed or undirected? Looking at the graph model, how can we find
courses that do not have any prerequisites and how can we find courses that are not the
prerequisite for any other courses?

10. Describe a graph model that represents whether each employee at a company gathering
knows the name of each other person at the event.
Should the edges be directed or undirected?
Should multiple edges be allowed?
Should loops be allowed?

122 | P a g e Lesson 9: Introduction to Graphs


References
Chapter 9: Graphs: Definition, Applications, Representation [PDF]. Retrieved from
http://www.cs.cmu.edu/afs/cs/academic/class/15210-s14/www/lectures/graphs.pdf

CS 411 (2017). Graph Theory Basic Terminology Part 1. Retrieved from


https://www2.cs.siu.edu/~cs441/lectures/Graph%20Theory%20Intro.pdf

JavaTPoint (n.d.). Introduction of Trees. Retrieved from


https://www.javatpoint.com/discrete-mathematics-introduction-of-trees

LibreTexts (2019). Graph Theory Exercises. Retrieved from


https://math.libretexts.org/Courses/Saint_Mary's_College%2C_Notre_Dame%2C_IN/SM
C%3A_MATH_339_-
_Discrete_Mathematics_(Rohatgi)/Text/5%3A_Graph_Theory/5.E%3A_Graph_Theory_(
Exercises)?fbclid=IwAR3-oNNWQ3u7rdVSCkkd1q-c-
XRqEhpfelWWBfunYiMIACu3P2DLRjcoLg4

Math Works (2020). Directed and Undirected Graphs. Retrieved from


https://mathworks.com/help/matlab/math/directed-and-undirected-graphs.html

Rosen, K. (2012). Discrete mathematics and its applications seventh edition.


Sanfoundry (2020). Discrete Mathematics Question and Answers – Graph Properties.
Retrieved from
https://www.sanfoundry.com/discrete-mathematics-questions-answers-graphs-
properties/

Techie Delight (n.d.). Terminology and Representation of graphs. Retrieved from


https://techiedelight.com/terminology-and-representations-of-graphs/

University of Hamburg (2020). Discrete Mathematics exercise sheet. Retrieved from


https://www.math.uni-hamburg.de/home/janko/exercise7sol

123 | P a g e Lesson 9: Introduction to Graphs

You might also like