Module 2b - Logical Operators
Module 2b - Logical Operators
Definition: Given a proposition, its truth table show all its possible truth values.
Example 1. Since a proposition has two possible truth values, a proposition 𝑝 would
have the following truth table
𝑝
T
F
Truth tables can also be used to display various combinations of the truth values of
two propositions 𝑝 and 𝑞. The rows of the table will correspond to the each truth value
combination of 𝑝 and 𝑞, so there will be 2$ = 4 rows. The truth table for propositions 𝑝
and 𝑞 are as follows
𝑝 𝑞
T T
T F
F T
F F
Similarly, suppose 𝑝, 𝑞, and 𝑟 are propositions. Then a truth value involving the given
propositions has 2( = 8 rows, as shown below
𝑝 𝑞 𝑟
T T T
T T F
T F T
T F F
F T T
F T F
F F T
F F F
𝑝 ∼𝑝
T F
F T
1
Example 2. State the negation of the following propositions.
𝑛$ : 2 is an odd number.
Solution.
𝑝 ∧ 𝑞: (𝑝 and 𝑞)
and is defined through the truth table
𝑝 𝑞 𝑝∧𝑞
T T T
T F F
F T F
F F F
The conjunction 𝑝 ∧ 𝑞 is true only when both conjuncts 𝑝 and 𝑞 are true, as shown in
its truth value.
𝑝: Angels exist.
𝑞: 𝜋 > 3.
1. 𝑝 ∧ 𝑞
2. 𝑝 ∧ (∼ 𝑞)
2
4. “While angels do not exist, 𝜋 > 3.”
Solution.
3. ∼ 𝑝 ∧ ∼ 𝑞
4. ∼ 𝑝 ∧ 𝑞
𝑝 ∨ 𝑞: (𝑝 or 𝑞)
and is defined through its truth table
𝑝 𝑞 𝑝∨𝑞
T T T
T F T
F T T
F F F
The above truth table shows us that the disjunction 𝑝 ∨ 𝑞 is false only when both
disjuncts 𝑝 and 𝑞 are false.
𝑞: Janree is sleeping.
𝑟: Eumir is eating.
Express the following propositions in English sentences or in symbols, as the case
may be.
1. 𝑝 ∨ 𝑞
2. 𝑞 ∨ (∼ 𝑟)
3. 𝑝 ∨ (𝑞 ∨ 𝑟)
4. “Either Victor has a date with Liza or Janree is sleeping, or Eumir is eating.”
5. “Either Victor has a date with Liza and Janree is sleeping, or Eumir is eating.”
6. “Either Victor has a date with Liza, or Janree is sleeping and Eumir is eating.”
7. “Either Victor has a date with Liza and Janree is sleeping, or Victor has a date with
Liza and Eumir is eating.”
3
Solution. The corresponding English sentences or symbols are given below.
3. “Either Victor has a date with Liza, or Janree is sleeping or Eumir is eating.”
4. 𝑝 ∨ 𝑞 ∨ 𝑟
5. 𝑝 ∧ 𝑞 ∨ 𝑟
6. 𝑝 ∨ 𝑞 ∧ 𝑟
7. 𝑝 ∧ 𝑞 ∨ (𝑝 ∧ 𝑟)
𝑝 𝑞 𝑟 ∼𝑝 𝑞∧𝑟 ∼𝑝 ∨ 𝑞∧𝑟
F F T T F T
𝑝 → 𝑞: (If 𝑝, then 𝑞)
𝑝 𝑞 𝑝→𝑞
T T T
T F F
F T T
F F T
The conditional 𝑝 → 𝑞 may also be read as “𝑝 implies 𝑞”. The proposition 𝑝 is called
the hypothesis, while the proposition 𝑞 is called the conclusion.
4
Example 6. Suppose that Geebee is a Grade 11 student. Consider the following
conditionals.
𝑝( : If Geebee has a degree in computer science, then she believes in true love.
Solution.
𝑝- : The hypothesis and the conclusion are true, the conditional 𝑝- is true (from the first
row of the truth table for the conditional statement).
𝑝$ : While the hypothesis is true, the conclusion is not (a Grade 11 student is not
qualified to be a lawyer). From the definition of the conditional, the conditional
statement 𝑝$ is not true.
𝑝( : The hypothesis is not true since Geebee is still in Grade 11. On the other hand, we
cannot determine the truth value of the conclusion “she believes in true love.” From
the last two rows of the truth table, regardless of the truth value of the conclusion, the
conditional statement is true.
Example 7. One day, Richard tweeted, to the delight of his friends: “If I get promoted,
then I will stop posting selfies on Facebook.” Determine whether the implication is true
given the following scenarios.
Scenario A: Richard got the promotion and promptly stopped posting selfies on
Facebook.
Scenario B: Richard got promoted, but then he realized that posting selfies has
become a habit he cannot break easily.
Scenario C: Richard stopped posting selfies, but he did not get the promotion.
Solution. Let 𝑝: “Richard gets promoted” and 𝑞: “Richard will stop posting selfies on
Facebook”.
Scenario A: Both the hypothesis and conclusion are true, so the conditional 𝑝 → 𝑞 is
true.
𝑝 ↔ 𝑞: (𝑝 if and only if 𝑞)
5
and is defined through its truth table:
𝑝 𝑞 𝑝↔𝑞
T T T
T F F
F T F
F F T
The proposition may also be written as “𝑝 iff 𝑞”. The propositions 𝑝 and 𝑞 are the
components of the biconditional.
Example 9. Suppose that Geebee is a Grade 11 student. Let us now consider the
following biconditionals.
𝑝( : Geebee has a degree in Computer Science if and only if she believes in true love.
Solution.
𝑝$ : It is true that Geebee is in Grade 11, but it is not true that Geebee is working as a
lawyer. Therefore, the biconditional is not true, referring to the second row of its truth
table.
𝑝( : The first primitive proposition, that Geebee has a degree in Computer Science, is
false. The truth value of the entire biconditional depends on the truth value of the
second primitive, that she believes in true love. If this is true, then the biconditional is
false (referring to the third row of the truth table); otherwise, the biconditional is true.
Example. Let 𝑝 and 𝑞 be propositions. Using truth tables, show the following:
a. 𝑝 ∨ 𝜏 is a tautology.
b. 𝑝 ∧ 𝜙 is a contradiction.
c. 𝑝 → 𝑝 ∨ 𝑞 is a tautology.
6
d. 𝑝 ∧ (∼ 𝑞) ∧ (𝑝 ∧ 𝑞) is a contradiction.
Solution.
a. Note that 𝜏 is always true. Hence in the disjunction 𝑝 ∨ 𝜏, there is at least one true
disjunct. Therefore, 𝑝 ∨ 𝜏 is a tautology since regardless of the truth value of 𝑝, 𝑝 ∨ 𝜏 is
true.
𝑝 𝜏 𝑝∨𝜏
T T T
F T T
b. Since 𝜙 is always false, then the second column of the truth table we will be
constructing will contain Fs. We have the following truth table
𝑝 𝜙 𝑝∧𝜙
T F F
F F F
𝑝 𝑞 𝑝∨𝑞 𝑝 → (𝑝 ∨ 𝑞)
T T T T
T F T T
F T T T
F F F T
𝑝 𝑞 ∼𝑞 𝑝 ∧ (∼ 𝑞) 𝑝∧𝑞 𝑝 ∧ (∼ 𝑞) ∧ (𝑝 ∧ 𝑞)
T T F F T F
T F T T F F
F T F F F F
F F T F F F
7
Exercises
1. State the negation of the following propositions.
𝑏: 𝑥 $ + 𝑦 $ = 𝑧 $ .
𝑑: James was not able to fetch his sister from school today.
e: The student brings at most two bags with him every school day.
a. “Annie does not have an upset stomach, yet she misses the exam”.
b. “If Annie has an upset stomach, then she misses the exam and does not receive a
passing grade for the subject”.
c. Either Annie has an upset stomach and misses the exam, or she does not miss the
exam and she receives a passing grade for the subject.
d. 𝑞 → (∼ 𝑟)
e. 𝑝 → ∼ 𝑟 ∨ 𝑞→ ∼𝑟
f. ∼ 𝑞 ↔ 𝑟
3. Let 𝑢, 𝑣, and 𝑤 be the propositions 𝑢: “Bea drives over the speed limit along EDSA”,
𝑣: “Bea is pulled over by the MMDA traffic enforcer” and 𝑤: “Bea receives a speeding
ticket”. Express the following propositions in English sentences or in symbols, as the
case may be.
a. “Bea does not drive over the speed limit and does not receive a speeding ticket”.
b. “Whenever Bea drives over the speed limit, she is pulled over by the MMDA traffic
enforcer.”
c. “Bea receives a speeding ticket only if she drives over the speed limit along EDSA
or if she is pulled over by the MMDA traffic enforcer”.
d. 𝑣 → 𝑢∧𝑤 ∨ ∼𝑤
e. 𝑤 ↔ (𝑢 ∧ 𝑣)
f. ∼𝑢 ∧𝑣 → ∼𝑤
8
4. Suppose 𝑝 is a true proposition, 𝑞 is a false proposition, and 𝑟 is a true proposition.
Determine the truth value of the following propositions.
a. 𝑝 ∧ 𝑞 ∧ 𝑟
b. 𝑝 ∨ (𝑞 ∨ 𝑟)
c. 𝑝 → ∼𝑞 ∨𝑟
d. 𝑝 ∨ 𝑞 ∧ (∼ 𝑟)
e. ∼ 𝑝 → (𝑞 → 𝑟)
f. 𝑝 ↔ 𝑞 ∨ ( ∼ 𝑝 ↔ 𝑞)
5. Determine the truth values of the propositions 𝑝 and 𝑞 that will make the following
statements false.
a. 𝑝 ∨ ∼ 𝑞 →𝑞
b. 𝑝 ∨ (∼ 𝑞) → 𝑝 ∧ 𝑞