Q2. Week 9 Logical Operators and Truth Values
Q2. Week 9 Logical Operators and Truth Values
OPERATORS
Friday, 20 January 2023
TRUTH TABLES
Truth table shows all the possible truth
values of a proposition.
Simple Proposition
For a simple proposition p, p
the number of possible truth T
values is two. Then,
F
Compound Propositions
Suppose p and p q
q are T T
propositions, T F
the truth table is F T
F F
Compound Propositions
p q r
Similarly, T
T
T
T
T
F
suppose p, q and r T F T
T F F
are propositions, F T T
the truth table is F T F
F F T
F F F
Logical Operators
Truth table is used to define the logical
operators. It is used to exhibit the
relationship between the truth values of
its simple components and the
compound proposition itself.
NEGATION
The negation of a proposition p is
denoted by
~𝑝: (𝑛𝑜𝑡 𝑝)
NEGATION: Definition
It is being defined through its truth
table. p ~p
T F
F T
NEGATION: Example
State the negation of the ff: propositions
n1: 2 is an odd number.
~n1: 2 is not an odd number.
~n1: It is not true that 2 is an odd number.
~n1: It is not the case that 2 is an odd number.
~n1: 2 is an even number.
NEGATION: Example
n2: CCNHS is the biggest high school in
Cauayan City.
~n2: CCNHS is not the biggest high
school in Cauayan City.
NEGATION
It is a common mistake to assume that
~𝑝 is automatically false. Also, the
negation ~𝑝 is not necessarily the
complete opposite of 𝑝.
NEGATION: Example
n3: Everyone in Isabela speaks Ybanag.
~n3: Everyone in Isabela does not speak
Ybanag.
~n3: Not everyone in Isabela speaks
Ybanag.
DRILL
State the negation of the following:
1. Sun is the biggest star in the universe.
2. Every Isabelino resides in Isabela.
3. The weather in the Philippines is rainy
during summer.
Conjunction
The conjunction p and q is denoted by:
𝑝 ∧ 𝑞: 𝑝 𝑎𝑛𝑑 𝑞
and is defined through its truth table:
Conjunction: Truth Table
p q 𝑝∧𝑞
T T T
T F F
F T F The propositions p
and q are called
F F F conjuncts..
CONJUNCTION: Example
Let p and q be the following
propositions:
𝑝:Angels exist.
𝑞: Angels can fly.
CONJUNCTION: Example
Express the ff conjunctions as English sentences or in
symbols as the case may be.
1. 𝑝 ∧ 𝑞
Ans: Angels exist and they can fly.
2. 𝑝 ∧ (~𝑞)
Ans: Angels exist but they cannot fly.
Conjunction: Example
3. Angels do not exist and can’t fly.
Ans: (~𝑝) ∧ (~𝑞)
4. Angels do not exist but they can fly.
Ans: (~𝑝) ∧ 𝑞
Conjunction: Truth Table Example
Construct the truth tables for examples 3 and 4.
3. Angels do not exist and can’t fly.
Ans: (~𝑝) ∧ (~𝑞)
4. Angels do not exist but they can fly.
Ans: (~𝑝) ∧ 𝑞
Conjunction: Solution (Truth Table)
3.(~p)∧(~q)
p q ~p ~q (~p)∧(~q)
T T F F F
T F F T F
F T T F F
F F T T T
Conjunction: Solution (Truth Table)
4. (~𝑝) ∧ 𝑞
p q ~p (~p)∧q Homework:
T T F F Construct
T F F F the truth table
F T T T for example 2:
F F T F 𝑝 ∧ (~𝑞)
Note:
Conjunctions do not always use the
word “and”. Words like “but, even,
though, yet” and “while” can also be
used.
Examples:
1. Carlo is competitive and hardworking.
2. Carlo is competitive but hardworking.
3. Carlo is competitive yet hardworking.
4. Although Carlo is competitive, he is hardworking.
5. While Carlo is competitive, he is hardworking.
DISJUNCTION
The disjunction of propositions p and
q is denoted by
𝑝 ∨ 𝑞: (𝑝 𝑜𝑟 𝑞)
DISJUNCTION: Truth Table
p q 𝑝∨𝑞
T T T
T F T
F T T
F F F The propositions p and q
are called disjuncts.
DISJUNCTION: Example
Let p, q and r be the following propositions:
p: Victor has a date with Liza.
q: Janree is sleeping.
r: Eumir is eating.
DISJUNCTION: Example
Express the ff. propositions in English sentences or in
symbols as the case may be.
1. 𝑝 ∨ 𝑞
Ans: Victor has a date with Liza or Janree is sleeping.
2. 𝑞 ∨ (~𝑟)
Ans: Either Janree is sleeping or Eumir is not eating.
DISJUNCTION: Example
3. 𝑝 ∨ (𝑞 ∨ 𝑟)
Ans: Either Victor has a date with Liza, or Janree is
sleeping or Eumir is eating.
4. (𝑝 ∧ 𝑞) ∨ (𝑝 ∧ 𝑟)
Ans: Either Victor has a date with Liza and Janree is
sleeping or Victor has a date with Liza and Eumir is eating.
DISJUNCTION: Example
Consider the propositions in the previous example:
“One Friday night, Victor and Janree are busy
studying for their Logic exam. Meanwhile, Eumir
just tweeted a picture of himself eating crispy pata
and sisig.” What is the truth value of the proposition
(~𝑝) ∨ (𝑞 ∧ 𝑟)
SOLUTION: Truth Table
p: Victor has a date with Liza. “One Friday night, Victor and Janree are
q: Janree is sleeping. busy studying for their Logic exam.
r: Eumir is eating. Meanwhile, Eumir just tweeted a picture
(~𝑝) ∨ (𝑞 ∧ 𝑟) of himself eating crispy pata and sisig.”
p q r ~p (𝑞 ∧ 𝑟) (~𝑝) ∨ (𝑞 ∧ 𝑟)
F F T T F T
CONDITIONAL
The conditional of propositions p and
q is denoted by:
𝑝 → 𝑞: (𝑖𝑓 𝑝, 𝑡ℎ𝑒𝑛 𝑞)
CONDITIONAL: The truth value is
FALSE only when the
HYPOTHESIS IS
Truth Table TRUE and the
CONCLUSION IS
FALSE
The table of the
conditional statement is as p q 𝑝→𝑞
follows:
T T T
𝑝 → 𝑞 is being read as p implies q.
T F F
p: hypothesis
F T T
q: conclusion
F F T
CONDITIONAL: Example
Consider Mark is a G11 student. Consider the ff. conditionals:
It is defined through
its table. p q 𝑝↔𝑞
T T T
It may also be written
as “p iff q”. p and q are T F F
called the components. F T F
F F T
BICONDITIONAL: Example
Consider Mark is a G11 student. Consider the ff. biconditionals:
p1: Mark is in G11 if and only if he is a senior high school student. TRUE
T T
p2: Mark is in G11 if and only if he is working as a lawyer. FALSE
T F
P3: Mark has a degree in Computer Science if and only if he believes in true love. F OR T
F T OR F
TRUTH
TABLES
LOGICAL
CONNECTORS/OPERATORS
Logical Connectors Logical Operators
not p ~p
p and q p^q
p or q pvq
if p then q p→q
p if and only if q p ↔q
NEGATION: Definition
It is being defined through its truth table.
p ~p
T F
F T
Conjunction: Truth Table
p q 𝑝∧𝑞
T T T
T F F
F T F The propositions p
and q are called
F F F conjuncts..
DISJUNCTION: Truth Table
p q 𝑝∨𝑞
T T T
T F T
F T T
F F F The propositions p and q
are called disjuncts.
The truth value is
CONDITIONAL: FALSE only when the
HYPOTHESIS IS
Truth Table TRUE and the
CONCLUSION IS
FALSE
It is defined through
its table. p q 𝑝↔𝑞
T T T
It may also be written T F F
as “p iff q”. p and q are F T F
called the components. F F T
CONSTRUCTING TRUTH
TABLES
1. Determine if the final result is a
conjunction, disjunction, or negation.
Recall dominant connectives and the
use of parenthesis.
CONSTRUCTING TRUTH
TABLES
2. Complete the columns under
• a.) the simple statements p, q….
• b.) the connectives negations inside parentheses
• c.) any remaining statements and their negations
• d.) any remaining connectives
• reaching the final column as determined in Step 1.
CONSTRUCTING TRUTH
TABLES
3. The truth table of compound
proposition of n component
statements, each represented by a
𝑛
different letter, has 2 number of rows.
EXAMPLE 1
• Construct the truth table for
a. P v (~ Q)
b. ~(~P ^ Q)
c. Q^~(P v Q)
EXAMPLE 1
a. P v (~ Q)
P Q ~Q P v (~ Q)
T T F T
T F T T
F T F F
F F T T
EXAMPLE 1
• b. ~(~P ^ Q)
P Q ~P (~P) ^ Q ~(~P ^ Q)
T T F F T
T F F F T
F T T T F
F F T F T
EXAMPLE 1
• c. Q^~(P v Q)
P Q PvQ ~(P v Q) Q^~(P v Q)
T T T F F
T F T F F
F T T F F
F F F T F
TIME TO REACT…
Please don’t share it to your classmates so that everyone will read.
10 9 8 7 6
POINTS POINTS POINTS POINTS POINTS
END OF FIRST SEMESTER
THANK YOU
AND GOD BLESS YOUR
2ND SEMESTER!