Assignment 1 Solution
Assignment 1 Solution
Solutions to Assignment 1
1. (1pt) This is a problem about an island in which the inhabitants are all either knights or knaves. Knights always tell the truth and knaves always lie. Suppose we have three people, A, B, and C, each of whom is a knight or a knave. A and B make the following statements: A: All of us are knaves. B: Exactly one of us is a knight. What are A, B, and C? Explain your reasoning. Answer: If A was a knight, then A could not make the statement All of us are knaves. Therefore A must be a knave. Since A tells a lie, at least one of B and C must be a knight. Suppose B is a knave, then C must be a knight, which means B spoke the truth, which is impossible. Therefore B must be a knight. Since B speaks the truth, C must be a knave. 2. (1pt) The police have three suspects for the murder of Mr Cooper: Mr Smith, Mr Jones, and Mr Williams. Smith, Jones, and Williams each declare that they did not kill Cooper. Smith also states that Cooper was a friend of Jones and that Williams disliked him. Jones also states that he did not know Cooper and that he was out of town the day Cooper was killed. Williams also states that he saw both Smith and Jones with Cooper the day of the killing and that either Smith or Jones must have killed him. Can you determine who the murderer was if i) one of the three men is guilty, the two innocent men are telling the truth, but the statements of the guilty man may or may not be true? Answer: At least two people are telling the truth. Looking for agreement between two people: Smith says that Cooper was a friend of Jones. Williams says he saw Jones with Cooper. Jones says he did not know Cooper. Thus Smith and Williams agree, Jones contradicts them. Let us try Jones as our rst suspect. (Another way to get to this conclusion is: If Jones was telling the truth then both Williams and Smith would be lying, thus Jones is lying.) If Jones is the killer, then the last statement by Williams is a correct statement by an innocent man. If Jones is the killer, then the rst statement is according to assumption, namely the guilty man lies and the two innocent men tell the truth. If Jones is the killer, than Smiths second statement is a correct statement by an innocent man. If Jones is the killer, then his statement is a lie by a guilty man, which is according to the assumption. So we conclude that Jones is the killer. 1
ii) innocent men do not lie? Answer: If we know that innocent men dont lie we can determine that one of the three was the killer because if they were all three innocent, they could not contradict each other. From there the reasoning is the same at in (i). 3. (1pt) Classify each of the following as a contradiction, a tautology, or a contingency, using truth tables: (Note that in order to show that a proposition is a contingency, I only need to list two rows in a truth table, one where the proposition is true, and one where the proposition is false. When solving an exercise you usually dont know which two, so you do the complete truth table. I only include two rows for contingencies here. Tautologies and contradictions, however, always require the complete truth table, because they state a same truth value for all possible assignments. (a) p (q p) is a tautology p q q p p (q p) T T T T T F T T F T F T F F T T (b) ((p q) p) is a contradiction p q p q (p q) p ((p q) p) T T T T F T F F T F F T F T F F F F T F (c) p (q p) is a contingency p q q p p (q p) T T T T T F F F (d) (p q) (r s) p (q r) s is a contingency as can be shown by the rst two lines of the truth table: p q r s p q r s LHS q r RHS LHS RHS T T T T T T T T T T T T T F T F T T F F (e) (p q) [(p q) (r s)] (p q) is a tautology (and a reason not to rush into truth tables if it can be seen more easily through transformations!)
p
T T T T T T T T F F F F F F F F
q T T T T F F F F T T T T F F F F
r T T F F T T F F T T F F T T F F
s T F T F T F T F T F T F T F T F
pq T T T T T T T T T T T T F F F F
rs T F F F T F F F T F F F T F F F
(p q) (r s) T T T T T T T T T T T T T F F F 2
(p q) [(p q) (r s)] T T T T T T T T T T T T F F F F
T T T T T T T T T T T T T T T T
4. (1pt) Prove the following logical equivalences without using truth tables: (a) (p (q r)) (q (p r)) Answer: Note that the equivalence sign of the question cannot be assumed and thus we start our equivalence transformations on one side or the other and derive the opposing side. LHS p (q r) () p (q r) (Commutative Law) p (r q) (Associative Law) (p r) q (Commutative Law) q (p r) () q (p r) RHS (b) (p (q r)) ((p q) r) Answer: RHS (p q) r () (p q) r (De Morgan) (p q) r (Associative Law) p (q r) () p (q r) RHS (c) ((p q) (p r) (q r)) r T Answer: LHS ((p q) (p r) (q r)) r () ((p q) (p r) (q r)) r (De Morgan) ((p q) (p r) (q r)) r (De Morgan, )) ((p q) (p r) (q r)) r (De Morgan) ((p q) (p r) (q r)) r (Associative Law) ((p q) [(p r) (q r)]) r (Distributive Law) ((p q) [(p q) r)]) r (Associative Law) ((p q) [(p q) r)]) r (Double Negation) ((p q) [(p q) r)]) r (De Morgan) (p q) ([(p q) r] r) (Associative Law) (p q) (r [(p q) r]) (Commutative Law) ((p q) r) [(p q) r] (Associative Law) ((p q) r) [(p q) r] (De Morgan) T (Negation Law) (Note that this is only one of many correct transformations.) (d) ((p q) (q r)) (p r) T Answer: LHS ((p q) (q r)) (p r) () ((p q) (q r)) (p r) (De Morgan) ((p q) (q r)) (p r) () ((p q) (q r)) (p r) () ((p q) p) ((q r) r) (Associative Laws) ((p q) p) ((q r) r) (De Morgan) ((p p) (q p)) ((q r) (r r)) (Distributive Law ) 3
(T (q p)) ((q r) T ) (Negation Law ) (q p) (q r) (Identity Law ) q p q r (Associative Law ) (q q) p r (Commutative and Associative Law ) T p r (Negation Law ) T (Domination Law) 5. (1pt) Let the universe of discourse for x and y be the set of integers. P (x, y) is the predicate x2 < y +2. Determine the truth values of (a) xyP (x, y) is true (b) xyP (x, y) is false (c) xyP (x, y) is true (d) xyP (x, y) is is false (e) yxP (x, y) is false (f) yxP (x, y) is ase 6. (1pt) Determine the truth value of the following: (a) xP (x) xQ(x) x(P (x) Q(x)) is not true. Let P(x) mean x is even, Q(x) mean x is odd and let x be an integer. Then x(P (x) Q(x)) T but xP (x) F and xQ(x) F thus xP (x) xQ(x) F (b) xP (x) xQ(x) xy(P (x) Q(y)) is true 7. (1pt) Let I(x) be the statement x has an internet connection and C(x, y) be the statement x and y have chatted with each other over the internet, where the universe of discourse for the variables x and y is the set of all students in your class. Express each of the following using logical operations and quantiers. (a) Not everyone in your class has an internet connection. xI(x) (b) Everyone except one student in your class has an internet connection. xI(x)yI(y)x = y (c) Everyone in your class with an internet connection has chatted over the internet with at least one other student in your class. xyI(x) (C(x, y) x = y) (d) Someone in your class has an internet connection but has not chatted with anyone over the internet. xI(x) yC(x, y) (e) There are two students in your class who have not chatted with each other over the internet. xyC(x, y) (f) Noone in your class has chatted with everyone else in the class over the internet. xyC(x, y) (g) There are at least two students in your class who have not chatted with the same person over the internet. xyz(C(x, z) C(y, z)) (C(y, z) C(x, z)) (h) There are two students in your class who between them have chatted with everyone else in the class over the internet. xyzC(x, z) C(y, z) 8. (1pt) For each part in the previous question, form the negation of the statement so that all negation symbols immediately precede predicates. (a) xI(x) xI(x) (b) xI(x) yI(y) x = y xI(x) yI(y) x = y (c) xyI(x) (C(x, y) x = y) xyI(x) (C(x, y) x = y) (d) xI(x) yC(x, y) xI(x) yC(x, y) (e) xyC(x, y) xyC(x, y) 4
(f) xyC(x, y) xyC(x, y) (g) xyz(C(x, z) C(y, z)) (C(y, z) C(x, z)) xyz(C(x, z) C(y, z)) (C(y, z) C(x, z)) xyz(C(x, z) C(y, z)) (h) xyzC(x, z) C(y, z) xyzC(x, z) C(y, z) 9. The notation !xP (x) denotes the proposition: There exists a unique x such that P (x) is true. If the universe of discourse is the set of integers, what are the truth values of the following statements: (a) !x(x > 1) is false (2 > 1 3 > 1) (b) !x(x2 = 1) is true (c) !x(x + 3 = 2x) is true (d) !x(x = x + 1) is false (there exists no such integer) 10. (1pt) Express the quantication !xP (x) using existential and universal quantiers and logical operators. xP (x) (yP (y) x = y)