ELEMENTARY DISCRETE MATHEMATICS NTNU, SPRING 2021
Solutions Set 1
Deadline: Wednesday 27 January, 2021, 13:00.
Exercise 1. Let p, q be propositional variables for which the implication p ⇒ q is false. Determine the truth value for each of the following.
a) p ∧ q b) ¬p ∨ q c) q ⇒ p d) ¬q ⇒ ¬p
Solution. Recall that p ⇒ q ≡ ¬p ∨ q. If this proposition is false, then both of ¬p and q must be false by definition of ∨. This is equivalent to say that p is true and q is false. Hence
a) p ∧ q is false since q is false.
b) ¬p ∨ q is false since both of ¬p and q are false. c) q ⇒ p is true, since q is false.
d) ¬q ⇒ ¬p is false since ¬q is true and ¬p is false.
Exercise 2. Let p, q, r denote the following statements about a particular triangle ABC.
• p : Triangle ABC is isosceles. • q : Triangle ABC is equilateral. • r : Triangle ABC is equiangular.
Translate each of the following into an English sentence.
a) q ⇒ p b) ¬p ⇒ ¬q c) q ⇔ r d) p ∧ ¬q e) r ⇒ p Solution. a) If the triangle ABC is equilateral then ABC is isosceles.
b) If the triangle ABC is not isosceles then ABC is not equilateral. c) The triangle ABC is equilateral if, and only if, ABC is equiangular. d) The triangle ABC is isosceles and not equilateral.
e) If the triangle ABC is equiangular then ABC is isosceles.
Exercise 3. Construct a truth table for each of the following compound statements, where p, q, r denote propositional variables.
a) ¬(p ∧ ¬q) ⇒ ¬p b) p ⇒ (q ⇒ r) solution. a) The truth table is the following:
p q ¬q p ∧ ¬q ¬(p ∧ ¬q) ¬p ¬(p ∧ ¬q) ⇒ ¬p
T T F F T F F
T F T T F F T
F T F F T T T
F F T F T T T
Date: Deadline: Wednesday 27 January, 2021, 13:00.
b) The truth table is the following: p q r q ⇒ r p ⇒ (q ⇒ r) T T T T T T T F F F T F T T T T F F T T F T T T T F T F F T F F T T T F F F T T Exercise 4. Using truth tables, verify if the following compound statements are tautologies.
a) q ⇔ (¬p ∨ ¬q) b) [(p ⇒ q) ∧ (q ⇒ r)] ⇒ (p ⇒ r) Solution. a) The truth table is the following:
p q ¬p ¬q ¬p ∨ ¬q q ⇔ (¬p ∨ ¬q)
T T F F F F
T F F T T F
F T T F T T
F F T T T F
Since there are false values in the last column in the above table, we conclude that the statement is not a tautology.
b) The truth table is the following:
p q r p ⇒ q q ⇒ r (p ⇒ q) ∧ (q ⇒ r) p ⇒ r [(p ⇒ q) ∧ (q ⇒ r)] ⇒ (p ⇒ r) T T T T T T T T T T F T F F F T T F T F T F T T T F F F T F F T F T T T T T T T F T F T F F T T F F T T T T T T F F F T T T T T
Since the last column only consists of T ’s, we conclude that the statement is a tautology. Exercise 5. If the statement q has the truth value T, determine all truth value assignments for the propo-sitional variables, p, r and s for which the truth value of the statement
(q ⇒ [(¬p ∨ r) ∧ ¬s]) ∧ [¬s ⇒ (¬r ∧ q)] is T.
Solution. Suppose that q has the truth value T . Notice that the statement has the truth value T if and only if (q ⇒ [(¬p ∨ r) ∧ ¬s]) and [¬s ⇒ (¬r ∧ q)] have both the truth value T .
• Since q is true, then we need that (¬p ∨ r) ∧ ¬s is true. This is equivalent to say that ¬p ∨ r and ¬s are both true. In particular we have that s is false. We also need that one of ¬p and r is true.
• From above, ¬s is true. Since we need that ¬s ⇒ (¬r ∧ q) is true, then ¬r ∧ q must be true. Since q is true, then ¬r is true and hence r is false.
• Finally, since ¬p ∨ r is true and r is false, we conclude that ¬p is true and hence p is false.
Therefore given that q has the truth value T , in order to (q ⇒ [(¬p ∨ r) ∧ ¬s]) ∧ [¬s ⇒ (¬r ∧ q)] has the truth value T , the truth values of p, r, s are F, F, F , respectively. Exercise 6. Let p, q, r be propositional variables. Use truth tables to verify the following logical equivalences.
a) [p ⇒ (q ∧ r)] ≡ [(p ⇒ q) ∧ (p ⇒ r)] b) [p ⇒ (q ∨ r)] ≡ [¬r ⇒ (p ⇒ q)] Solution. a) The truth table is the following
p q r q ∧ r p ⇒ (q ∧ r) p ⇒ q p ⇒ r (p ⇒ q) ∧ (p ⇒ r) T T T T T T T T T T F F F T F F T F T F F F T F T F F F F F F F F T T T T T T T F T F F T T T T F F T F T T T T F F F F T T T T
Since the fifth and eighth columns are identical, we conclude that [p ⇒ (q ∧ r)] ≡ [(p ⇒ q) ∧ (p ⇒ r)].
b) he truth table is the following
p q r q ∨ r p ⇒ (q ∨ r) ¬r p ⇒ q ¬r ⇒ (p ⇒ q) T T T T T F T T T T F T T T T T T F T T T F F T T F F F F T F F F T T T T F T T F T F T T T T T F F T T T F T T F F F F T T T T
Since the fifth and eighth columns are identical, we conclude that [p ⇒ (q ∨ r)] ≡ [¬r ⇒ (p ⇒ q)]. Exercise 7. Negate each of the following and simplify the resulting statement.
a) (p ∧ q) ⇒ r b) p ⇒ (¬q ∧ r)
Proof. a) Recall the equivalence a ⇒ b ≡ ¬a ∨ b and the DeMorgan’s laws ¬(a ∨ b) ≡ ¬a ∧ ¬b and ¬(a ∧ b) ≡ ¬a ∨ ¬b. Hence
¬((p ∧ q) ⇒ r) ≡ ¬(¬(p ∧ q) ∨ r) ≡ ¬(¬(p ∧ q)) ∧ ¬r ≡ (p ∧ q) ∧ ¬r ≡ p ∧ q ∧ ¬r. b) In a similar way that the previous item, we have
¬(p ⇒ (¬q ∧ r) ≡ ¬(¬p ∨ (¬q ∧ r)) ≡ ¬(¬p) ∧ ¬(¬q ∧ r) ≡ p ∧ (¬(¬q) ∨ ¬r) ≡ p ∧ (q ∨ ¬r) ≡ (p ∧ q) ∨ (p ∧ ¬r). Exercise 8. Lewis, Zax: Exercise 9.3.
p q r p ∨ q (p ∨ q) ∨ r q ∨ r p ∨ (q ∨ r) T T T T T T T T T F T T T T T F T T T T T T F F T T F T F T T T T T T F T F T T T T F F T F T T T F F F F F F F
Since the fifth and the seventh columns are identical, then we have that (p ∨ q) ∨ r ≡ p ∨ (q ∨ r). Now, for the case of ∧, we have the following truth table
p q r p ∧ q (p ∧ q) ∧ r q ∧ r p ∧ (q ∧ r) T T T T T T T T T F T F F F T F T F F F F T F F F F F F F T T F F T F F T F F F F F F F T F F F F F F F F F F F
Since the fifth and the seventh columns are identical, then we have that (p ∧ q) ∧ r ≡ p ∧ (q ∧ r). Exercise 9. Lewis, Zax: Exercise 9.5. Using a truth table, determine whether each of the following compound propositions is satisfiable, a tautology, or unsatisfiable.
a) p ⇒ (p ∨ q), b) ¬(p ⇒ (p ∨ q)), c) p ⇒ (p ⇒ q) Solution. a) The truth table is the following:
p q p ∨ q p ⇒ (p ∨ q)
T T T T
T F T T
F T T T
F F F T
Since the last column consists only of T ’s, we have that the proposition is a tautology. b) Using the above table, we have
p q p ⇒ (p ∨ q) ¬(p ⇒ (p ∨ q))
T T T F
T T T F
F T T F
F F T F
Since the last column consists only of T ’s, we have that the proposition is unsatisfiable. c) The truth table is the following
p q p ⇒ q p ⇒ (p ⇒ q)
T T T T
T F F F
F T T T
F F T T
Since there is an assignment of truth values for p and q such that the compound statement is true, we have
that the statement is satisfiable.
Exercise 10. Lewis, Zax: Exercise 9.6 a.
Solution. Using the propositions p = “I study”, q = “I will pass the course”, and r = “The professor accepts bribes”, translate the following into statements of propositional logic:
(1) If I do not study, then I will only pass the course if the professor accepts bribes: ¬p ⇒ (q ⇒ r). (2) If the professor accepts bribes, then I do not study: r ⇒ ¬p.
(3) The professor does not accept bribes, but I study and will pass the course: ¬r ∧ (p ∧ q). (4) If I study, the professor will accept bribes and I will pass the course: p ⇒ (r ∧ q). (5) I will not pass the course but the professor accepts bribes: ¬q ∧ r.