w01 Tutorial Propositional Logic Solutions
w01 Tutorial Propositional Logic Solutions
Week 1 Tutorial
Sample solutions
August 3, 2017
Solution:
(a) A B
(b) A B
(c) A B which is a simplification of the more literal translation
(A B)
Solution:
P Q P Q
T T T
T F T
F T T
F F F
1
P P
T F
F T
P Q P Q
T T T
T F F
F T T
F F T
Solution:
P xor Q means either P is true or Q is true but not both.
P Q P xor Q
T T F
T F T
F T T
F F F
(P (Q R))
is logically equivalent to
(P ) (Q R).
Solution:
2
Hint: if the question specifically asks for a truth table, then make
sure you use one. And if asked to prove or disprove a statement,
be aware that it might be false, as in this case.
P Q R Q R (P (Q R)) (P (Q R))
T T T T T F
T T F T T F
T F T T T F
T F F F F T
F T T T F T
F T F T F T
F F T T F T
F F F F F T
P Q R Q R Q R P (P ) (Q R)
T T T F F F F F
T T F F T T F T
T F T T F T F T
T F F T T T F T
F T T F F F T T
F T F F T T T T
F F T T F T T T
F F F T T T T T
3
5. Use logical equivalence laws to prove or disprove the following state-
ment.
Solution:
Hint: if the question specifically asks you to use logical equivalence
laws, then make sure you do so.
LHS (P (Q R))
(P ) (Q R)) by De Morgan
(P ) (Q R)) by De Morgan
Extension Questions
These questions are optional. They are provided to extend those who have
completed the first part of the tutorial and would like something more inter-
esting to get their teeth into.
Solution: Please feel free to share your own answers for the exten-
sion questions. Email them to the unit co-ordinator and I will add them
to the solution set.
P Q P nand Q
T T F
T F T
F T T
F F T
4
(a) For each of the following expressions, find an equivalent expression
using only nand and (not), as well as grouping parentheses to
specify the order in which the operations apply. You may use A,
B, and the operators any number of times.
i. A B
ii. A B
iii. A B
(b) It is actually possible to express each of the above using only nand,
without needing to use . Find an equivalent expression for A
using only nand and grouping parentheses.
(c) The constants true and false themselves may be expressed using
only nand. Construct an expression using an arbitrary statement
A and nand that evaluates to true regardless of whether A is true
or false. Construct a second expression that always evaluates to
false. Do not use the constants true and false themselves in your
statements.
Solution:
(a) A B (A nand B)
(b) A B (A) nand (B)
(c) A B A nand B
A (A nand A)
(A nand A) nand A
5
2. Use the logical equivalence laws from lectures to show that
(((P Q) R) (P Q)) (P R)
is a tautology.
6
3. A long time ago, in a country far away, the King sentenced a man to
death. He told the man You shall be shot at dawn, one day next week.
However, the evening before you are shot, you will not know that you
are going to be shot the next day.
While the King was a brutal dictator, he never told a lie. The con-
demned man proved that it was impossible for him to be executed.
How did he do this and was he correct?
Questions 2 is from Stueben, Michael and Diane Sandford. Twenty
Years Before the Blackboard, Math. Assoc America, 1998 quoted by
Prof. Albert R. Meyer and Prof. Ronitt Rubinfeld in MIT course
6.042J/18.062J
4. See the Lewis Caroll Logic Problems under Further Reading on the
cits2211 Resources web page. Convert the following statements into
implication statements in propositional logic. Consider both the impli-
cation and its contrapositive.
(a) No one studies logic, unless she is well educated.
(b) No hedgehogs can read
(c) Those who cannot read are not well educated.
Then, using transitive reasoning, derive a conclusion that uses all three
statements. Give the deduced statement using propositional logic and
also in words.
Solution:
Let L = studies logic, E = is educated,
H = is a hedgehog, R = can read
No one studies logic, unless she is well educated: L E,
L E, E L
No hedgehogs can read: R H, H R
Those who cannot read are not well educated: R E, E R
From which we can derive the chain of implications
L E R H
and so can conclude
L H that is, Those who study logic are not hedgehogs.