Download as pdf or txt
Download as pdf or txt
You are on page 1of 4

MH1300 FOUNDATIONS OF MATHEMATICS

Tutorial 2 Solutions

Ex. 2.1.22, 24 Determine which of the pairs of statement forms are logically equivalent.
Justify your answers using truth tables and include a few words of explanation.
22. p ^ (q _ r) and (p ^ q) _ (p ^ r).
24. (p _ q) _ (p ^ r) and (p _ q) ^ r.
SOLUTION . 22.
p q r q_r p^q p^r p ^ (q _ r) (p ^ q) _ (p ^ r)
1 1 1 1 1 1 1 1
1 1 0 1 1 0 1 1
1 0 1 1 0 1 1 1
1 0 0 0 0 0 0 0
0 1 1 1 0 0 0 0
0 1 0 1 0 0 0 0
0 0 1 1 0 0 0 0
0 0 0 0 0 0 0 0
| {z }
same truth values
The truth table shows that p ^ (q _ r) and (p ^ q) _ (p ^ r) always have the same truth
values. Therefore they are logically equivalent. This proves the distributive law for ^ over _.

24.
p q r p_q p^r (p _ q) _ (p ^ r) (p _ q) ^ r
1 1 1 1 1 1 1
1 1 0 1 0 1 0
1 0 1 1 1 1 1
1 0 0 1 0 1 0
0 1 1 1 0 1 1
0 1 0 1 0 1 0
0 0 1 0 0 0 0
0 0 0 0 0 0 0
| {z }
di↵erent truth values
The truth table shows that (p _ q) _ (p ^ r) and (p _ q) ^ r have di↵erent truth values in
rows 2, 4, and 6. Hence they are not logically equivalent. ⇤

1
2

Ex. 2.1.28. Use De Morgan’s laws to write a negation for the statement
“This computer program has a logical error in the first ten lines or it is being run with an
incomplete data set.”
SOLUTION . This computer program does not have a logical error in the first ten lines and
it is not being run with an incomplete data set.
Note the statement “This computer program does not have a logical error in the first ten
lines and it is being run with a complete data set.” is not an acceptable answer. The negation
of “it is being run with an incomplete data set” is not “it is being run with a complete data
set”. For example, it could be the case that the program is not running at all. ⇤

Ex. 2.1.33. Assume x is a particular real number and use De Morgan’s laws to write
negations for the statement
10 < x < 2.
SOLUTION .
10 x or x 2.
(Here we are assuming x 2 R.) ⇤

Ex. 2.1.42. Use a truth table to establish if the statement form is a tautology or a contra-
diction.
((¬p ^ q) ^ (q ^ r)) ^ ¬q.
SOLUTION . The truth table can be done like this:

p q r ¬p ¬p ^ q q^r ¬q (¬p ^ q) ^ (q ^ r) ((¬p ^ q) ^ (q ^ r)) ^ ¬q


1 1 1 0 0 1 0 0 0
1 1 0 0 0 0 0 0 0
1 0 1 0 0 0 1 0 0
1 0 0 0 0 0 1 0 0
0 1 1 1 1 1 0 1 0
0 1 0 1 1 0 0 0 0
0 0 1 1 0 0 1 0 0
0 0 0 1 0 0 1 0 0
| {z }
all 0’s
Since all the truth values of ((¬p ^ q) ^ (q ^ r)) ^ ¬q are 0’s, ((¬p ^ q) ^ (q ^ r)) ^ ¬q is a
contradiction. ⇤
3

Ex. 2.1.49. Supply a reason for each step.


(p _ ¬q) ^ (¬p _ ¬q) ⌘ (¬q _ p) ^ (¬q _ ¬p) by (a)
⌘ ¬q _ (p ^ ¬p) by (b)
⌘ ¬q _ F by (c)
⌘ ¬q by (d)
Therefore, (p _ ¬q) ^ (¬p _ ¬q) ⌘ ¬q.
SOLUTION .
(p _ ¬q) ^ (¬p _ ¬q) ⌘ (¬q _ p) ^ (¬q _ ¬p) by commutative law
⌘ ¬q _ (p ^ ¬p) by distributive law
⌘ ¬q _ F by negation law
⌘ ¬q by identity law.

Ex. 2.1.52. Use the logical laws to verify the logical equivalence
¬(p _ ¬q) _ (¬p ^ ¬q) ⌘ ¬p.
Supply a reason for each step.
SOLUTION .
¬(p _ ¬q) _ (¬p ^ ¬q) ⌘ (¬p ^ ¬(¬q)) _ (¬p ^ ¬q) by De Morgan’s law
⌘ (¬p ^ q) _ (¬p ^ ¬q) by double negation
⌘ ¬p ^ (q _ ¬q) by distributive law
⌘ ¬p ^ T by negation law
⌘ ¬p by identity law.

Ex. 2.2.12 (Modified). Apply Ex. 2.2.13a (below) to establish the logical equivalence
p _ q ! r ⌘ (p ! r) ^ (q ! r).
Next, use it rewrite the following statement. (Assume that x represents a fixed real number.)
If x > 2 or x < 2, then x2 > 4.
SOLUTION . (a)
p _ q ! r ⌘ ¬(p _ q) _ r by Ex. 2.2.13a
⌘ (¬p ^ ¬q) _ r by De Morgan’s law
⌘ r _ (¬p ^ ¬q) by commutativity law
⌘ (r _ ¬p) ^ (r _ ¬q) by distributive law
⌘ (¬p _ r) ^ (¬q _ r) by commutativity law
⌘ (p ! r) ^ (q ! r) by Ex. 2.2.13a
(b) If x > 2 then x2 > 4, and if x < 2 then x2 > 4. ⇤
4

Ex. 2.2.13a. Use a truth table to verify the following logical equivalence. Include a few
words of explanation with your answer.
p ! q ⌘ ¬p _ q.
SOLUTION .
p q p!q ¬p _ q
1 1 1 1
1 0 0 0
0 1 1 1
0 0 1 1
| {z }
same truth values
The table shows that p ! q and ¬p _ q have the same truth values. Therefore, they are
logically equivalent. ⇤

Question E1. Are the following statement forms tautologies, contradictions, or neither?
a. p ^ (p _ ¬p)
b. ¬(p _ ¬p) _ p
c. ¬(p ^ q) _ p
SOLUTION . a. p ^ (p _ ¬p) ⌘ p ^ T ⌘ p. (We used negation law and identity law). So
neither tautology nor contradiction.
b. ¬(p _ ¬p) _ p ⌘ ¬T _ p ⌘ F _ p ⌘ p. (We used negation law and identity law). So neither
tautology nor contradiction.
c.
¬(p ^ q) _ p ⌘ (¬p _ ¬q) _ p (De Morgan’s Law)
⌘ (¬q _ ¬p) _ p (Commutative Law)
⌘ ¬q _ (¬p _ p) (Associative Law)
⌘ ¬q _ T (Negation Law)
⌘T (Universal Bound Law)
It is a tautology.

You might also like