Assignment 1

A STUDENT MODEL SOLUTION
Assignment 1
Excellent work folks. Please review these solutions carefully along with
your work. Bear in mind that there was a typo in the Logic Text document
that did not get corrected. The inverse of p q is ~p  ~q NOT ~p 
q. Marks were not taken off for this confusion. The important thing is to be
able to manipulate these statements
Solution
pq
~ q ~ p q  p
~ p ~ q
p
q
~p
~q
T
T
F
F
T
T
T
T
T
F
F
T
F
F
T
T
F
T
T
F
T
T
F
F
F
F
T
T
T
T
T
T
The inverse ~ p ~ q is equivalent to the converse q  p because they have the same truth
values in the truth table above.
Solution
p
q
~p
~q
T
T
F
F
F
F
T
T
F
T
F
T
T
F
T
F
Solution
pq
T
T
T
F
pq
T
F
F
F
~  p  q
~ p ~ q
~  p  q
~ p ~ q
F
F
F
T
F
F
F
T
F
T
T
T
F
T
T
T
(i)
If the sun is shining, it will not snow in August.
Inverse: If the sun is not shining, then it will snow in August.
Converse: If it does not snow in August, then the sun is shining.
Contrapositive: If it snows in August, then the sun is not shining.
(ii)
If the moon is made of blue cheese, Paul Martin is the prime minister.
Inverse: If the moon is not made of blue cheese, Paul Martin is not the prime minister.
Converse: If Paul Martin is the prime minister, the moon is made of blue cheese.
Contrapositive: If Paul Martin is not the prime minister, the moon is not made of blue
cheese.
(iii)
If you do not eat, you will starve.
Inverse: If you eat, you will not starve.
Converse: If you starve, you do not eat.
Contrapositive: If you eat, you will not starve. xxxxxx
Correct version of contrapositive: “ If you do not starve, you will eat” or in better
English - “ If you have not starved, you will have eaten”
Solution
There exists a student x such that for every student y and every student z who is not y, if x and y
are friends and x and z are friends, then y and z are not friends.
OR
There exists a student x such that for every student y and every student z, if x and y are friends
and x and z are friends, and y is not z, then y and z are not friends.
Solution
xy C ( x)  (C ( y )  F ( x, y ))
(i)
For every student x, x has a computer or there exists a student y such that y has a computer and x
and y are friends. (Every student has a computer or has a friend that does)
Negation xy ~ C ( x)  (~ C ( y )  ~ F ( x, y ))
There exists a student x such that x does not have a computer and for every y, y does not have a
computer or x and y are not friends. (Every student does not have a computer and does not have a
friend that does.)
xyz ((( F ( x, y )  F ( x, z )  ( y  z ))  ~ F ( y, z ))
(ii)
There exists a student x such that for every student y and every student z who is not y, if x and y
are friends and x and z are friends, then y and z are not friends.
Negation xyz ((( F ( x, y )  F ( x, z )  ( y  z ))  F ( y, z ))
For every student x, there exists a student y and a student z who is not y. If x and y are friends
and x and z are friends then y and z are friends.