You are on page 1of 5

MACM 101 — Discrete Mathematics I

Outline Solutions to Exercises on Propositional Logic


1. Construct a truth table for the following compound statement: (p ↔ q) ⊕ (¬p ↔ ¬r).

p q r (p ↔ q) ⊕ (¬p ↔ ¬r)
0 0 0 0
0 0 1 1
0 1 0 1
0 1 1 0
1 0 0 0
1 0 1 1
1 1 0 1
1 1 1 0

2. Show that the following compound statement is a tautology

¬(p → q) → ¬q.

Method 1. Construct a truth table.


Method 2. Use logical equivalences:

¬(p → q) → ¬q
⇐⇒ ¬¬(p → q) ∨ ¬q expression for implications
⇐⇒ ¬p ∨ q ∨ ¬q expression for implications + double negation law
⇐⇒ T law of excluded middle + domination law.

3. Show that (p → q) ∨ (p → r) and p → (q ∨ r) are logically equivalent.


Method 1. Construct the truth tables for both statements and compare.
Method 2. Use logical equivalences.

(p → q) ∨ (p → r)
⇐⇒ ¬p ∨ q ∨ ¬p ∨ r expression for implications
⇐⇒ ¬p ∨ (q ∨ r) idempotent law + associative law
⇐⇒ p → (q ∨ r) expression for implication

4. Show that (p → q) → r and p → (q → r) are not logically equivalent. Do not use truth tables.
Method 1. It is sufficient to find one assignment of values to p, q, r such that the two statements get different
truth values. For instance if p = q = r = 0 then (p → q) → r = 0 while p → (q → r) = 1.
Method 2. Use logical equivalences to simplify the biconditional

((p → q) → r) ↔ (p → (q → r)).

It can be shown to be equivalent to p ∨ r, that is not a tautology.

1
5. Simplify the compound statement

((((p ∧ q) ∧ r) ∨ ((p ∧ q) ∧ ¬r)) ∨ ¬q) → s.

Use logical equivalences:

((((p ∧ q) ∧ r) ∨ ((p ∧ q) ∧ ¬r)) ∨ ¬q) → s


⇐⇒ (((p ∧ q) ∧ (r ∨ ¬r)) ∨ ¬q) → s distributive law
⇐⇒ ((p ∧ q) ∨ ¬q) → s law of excluded middle + domination law
⇐⇒ ((p ∨ ¬q) ∧ (q ∨ ¬q)) → s distributive law
⇐⇒ (p ∨ ¬q) → s. law of excluded middle + domination law

6. Prove that the Rule of Proof by Cases is a valid argument.


It suffices to prove that the corresponding expression

((p → r) ∧ (q → r)) → ((p ∨ q) → r)

is a tautology.
Method 1. Construct the truth table.
Method 2. Use logical equivalences to show that this statement is equivalent to 1.

((p → r) ∧ (q → r)) → ((p ∨ q) → r)


⇐⇒ ¬((p → r) ∧ (q → r)) ∨ ((p ∨ q) → r) expression for implication
⇐⇒ ¬((¬p ∨ r) ∧ (¬q ∨ r)) ∨ (¬(p ∨ q) ∨ r) expression for implication
⇐⇒ (¬(¬p ∨ r) ∨ ¬(¬q ∨ r)) ∨ (¬(p ∨ q) ∨ r) De Morgan’s law
⇐⇒ (p ∧ ¬r) ∨ (q ∧ ¬r) ∨ ¬(p ∨ q) ∨ r De Morgan’s law + double negation law
⇐⇒ ((p ∨ q) ∧ ¬r) ∨ ¬(p ∨ q) ∨ r distributive law
⇐⇒ ((p ∨ q ∨ r) ∧ (¬r ∨ r)) ∨ ¬(p ∨ q) distributive law
⇐⇒ (p ∨ q ∨ r) ∨ ¬(p ∨ q) law of excluded middle + domination law
⇐⇒ (p ∨ q) ∨ r ∨ ¬(p ∨ q) associative law
⇐⇒ T ∨ r law of excluded middle
⇐⇒ T domination law

Method 3. Suppose that the premises (p → r) and (q → r) are true. If p ∨ q is false then, by definition of
implication, the conclusion (p ∨ q) → r is true. Therefore let p ∨ q be true. From p ∨ q = 1 we know that either
p or q is true. Suppose p is true. Then, since p → r is true, by definition of implication, r must be true. If q is
true then, as q → r is true, we again conclude that r must be true. Thus, in all cases r is true, and therefore the
conclusion is true. Q.E.D.
Method 4. Show that starting from premises p → r and q → r one can infer the conclusion (p ∨ q) → r:

Steps Reason
1. p → r premise
2. ¬p ∨ r expression for implication to Step 1
3. q → r premise
4. ¬q ∨ r expression for implication to Step 3
5. (¬p ∨ r) ∧ (¬q ∨ r) rule of conjunction to Steps 2 and 4 (see Exercise 8)
6. (¬p ∧ ¬q) ∨ r DeMorgan’s law to Step 5
7. ¬(p ∨ q) ∨ r DeMorgan’s law to Step 6
8. (p ∨ q) → r expression for implication to Step 7

2
7. Each of two rooms (room I and room II) contains either a lady or a tiger. If a room contains a lady, the
sign on its door is true. If it contains a tiger, the sign is false. The signs are

I II
AT LEAST ONE ROOM THE OTHER ROOM
CONTAINS A LADY CONTAINS A LADY

Which rooms contain ladies?


Let the primitive statements be:
p, ‘the first room contains a lady’
q, ‘the second room contain a lady’
Then the sign on the first door says that p ∨ q, and the sign on the second door claims p. We know that a sign is
true if and only if the corresponding room contains a lady. Therefore the statements p ↔ (p ∨ q) and p ↔ q are
true.
By checking all possible truth values of p, q we find that both statements above are true only if p = q = 1 or
p = q = 0, that is, both rooms contain ladies, or both rooms contain tigers.
8. What relevant conclusion or conclusions can be drawn from this set of premises? Explain the rules of
inference used to obtain each conclusion from the premises. “If I take the day off, it either rains or
snows.” “I took Tuesday off or I took Thursday off.” “It was sunny on Tuesday.” “It did not snow on
Thursday.”
The relevant conclusions are: “I take Thursday off” and “It was raining on Thursday”.
Method 1. Let the primitive statements be:
o, ‘I take day off on Tuesday’
h, ‘I take day off on Thursday’
p, ‘it rains on Tuesday’
s, ‘it snows on Tuesday’
r, ‘it rains on Thursday’
t, ‘it snows on Thursday’
Then the premises are translated as: o → (p ∨ s), h → (r ∨ t), o ∨ h, ¬(p ∨ s), and ¬t.
And the conclusions: h, r.

Steps Reason
1. o → (p ∨ s) premise
2. ¬(p ∨ s) → ¬o contrapositive to Step 1
3. ¬(p ∨ s) premise
4. ¬o modus ponens to Steps 2 and 3
5. o ∨ h premise
6. h disjunctive syllogism to Steps 4 and 5
7. h → (r ∨ t) premise
8. r ∨ t modus ponens to Steps 6 and 7
9. ¬t premise
10. r disjunctive syllogism to Steps 8 and 9.

Method 2. Use the rule of resolution. Let the primitive statements be: o, ‘today is my day off’
t, ‘today is Tuesday’
h, ‘today is Thursday’
r, ‘it is raining today’
s, ‘it is snowing today’

3
Then the premises are translated as: o → (r ∨ s), o → (t ∨ h), t → ¬(r ∨ s), h → ¬s. Note that the second
premise does not only say that “If today is day off then today is Tuesday or Thursday”, but also that one of
these days is a day off. One can formulate it as follows, “If Tuesday is not a day off, then Thursday is”, or,
symbolically, (t → ¬o) → (h → o)
And the conclusions: o → h, h → r.

Steps Reason
1. o → (r ∨ s) premise
2. t → ¬(r ∨ s) premise
3. (r ∨ s) → ¬t contrapositive to Step 2
4. o → ¬t rule of syllogism to Steps 1 and 3
5. ¬o ∨ ¬t expression for implication to Step 4
6. o → (t ∨ h) premise
7. ¬o ∨ t ∨ h expression for implications to Step 6
8. ¬o ∨ h rule of resolution to Steps 5 and 7
9. o → h expression for implications to Step 8, the first conclusion
10. h → ¬s premise
11. o → ¬s rule of syllogism to Steps 9 and 10
12. ¬o ∨ ¬s expression for implication to Step 11
13. ¬o ∨ r ∨ s expression for implication to Step 1
14. ¬o ∨ r rule of resolution to Steps 12 and 13
15. (t → ¬o) → (h → o) premise
16. ¬(¬t ∨ ¬o) ∨ (¬h ∨ o) expression for implications to Step 15
17. (t ∧ o) ∨ (¬h ∨ o) DeMorgan’s law and double negation law to Step 16
18. (t ∨ ¬h ∨ o) ∧ (¬h ∨ o) distributive law to Step 17
19. ¬h ∨ o rule of conjunctive simplification to Step 18
20. ¬h ∨ r rule of resolution to Steps 14 and 19
21. h → r expression for implication to Step 20, the second conclusion

Method 3. Show that statements

((o → (p ∨ s)) ∧ (h → (r ∨ t)) ∧ (o ∨ h) ∧ ¬(p ∨ s) ∧ ¬t) → h


((o → (p ∨ s)) ∧ (h → (r ∨ t)) ∧ (o ∨ h) ∧ ¬(p ∨ s) ∧ ¬t) → r

in Method 1, or statements

((o → (r ∨ s)) ∧ (o → (t ∨ h)) ∧ (t → ¬(r ∨ s)) ∧ (h → ¬s) ∧ ((t → ¬o) → (h → o))) → (o → h)


((o → (r ∨ s)) ∧ (o → (t ∨ h)) ∧ (t → ¬(r ∨ s)) ∧ (h → ¬s) ∧ ((t → ¬o) → (h → o))) → (h → r)

in Method 2, are tautologies.


9. Write the following argument in symbolic form. Then establish the validity of the argument or give a
counterexample to show that it is invalid.
If Dominic goes to the racetrack, then Helen will be mad. If Ralph plays cards all night,
then Carmela will be mad. If either Helen or Carmela gets mad, then Veronica (their attorney)
will be notified. Veronica has not heard from either of these two clients. Consequently, Dominic
didn’t make it to the racetrack and Ralph didn’t play cards all night.
Let the primitive statements be:
d, ‘Dominic goes to the racetrack’
h, ‘Helen is mad’
r, ‘Ralph plays cards all night’

4
c, ‘Carmela is mad’
v, ‘Veronica is notified’
Then the premises are translated as: d → h, r → c, (h ∨ c) → v, and ¬v.
And the conclusions: ¬d, ¬r.

Steps Reason
1. (h ∨ c) → v premise
2. ¬v premise
3. ¬(h ∨ c) Modus Tollens to 1 and 2
4. ¬h ∧ ¬c DeMorgan’s law to 3
5. ¬h rule of simplification to 4
6. d → h premise
7. ¬d Modus Tollens to 5 and 6
8. ¬c rule of simplification to 4
9. r → c premise
10. ¬r Modus Tollens to 8 and 9

Using the rule of conjunction from the next problem we can also obtain ¬d ∧ ¬r.
10. Using the Rule of Conjunction and other rules of inference and logic equivalences give the reasons for the
steps verifying the following argument.
Premises: (¬p ∨ q) → r, r → (s ∨ t), ¬s ∧ ¬u, ¬u → ¬t.
Conclusion: p.

Steps Reasons
1) ¬s ∧ ¬u premise
2) ¬u conjunctive simplification to Step 1
3) ¬u → ¬t premise
4) ¬t modus ponens to Steps 2 and 3
5) ¬s conjunctive simplification to Step 1
6) ¬s ∧ ¬t rule of conjunction to Steps 4 and 5
7) r → (s ∨ t) premise
8) ¬(s ∨ t) → ¬r contrapositive to Step 7
9) (¬s ∧ ¬t) → ¬r DeMorgan’s law to Step 8
10) ¬r modus ponens to Steps 6 and 9
11) (¬p ∨ q) → r premise
12) ¬r → ¬(¬p ∨ q) contrapositive to Step 11
13) ¬r → (p ∧ ¬q) DeMorgan’s law to Step 12
14) p ∧ ¬q modus ponens to Steps 10 and 13
15) p conjunctive simplification to Step 14.

You might also like