Anda di halaman 1dari 7

# CmpE 220 Fall 2012 PS #1 Fundamentals of Logic

## October 10, 2012

1. (Rosen: Section 1.1, pp. 17 Question 10) Let p, q and r be the propositions p : You get an A on the nal exam. q : You do every exercise in this book. r : You get an A in this class. Write these propositions using p, q and r and logical connectives. (a) You get an A in this class, but you do not do every exercise in this book. (b) You get an A on the nal, you do every exercise in this book, and you get an A in this class. (c)To get an A in this class, it is necessary for you to get an A on the nal. (d) You get an A on the nal, but you do not do every exercise in this book; nevertheless you get an A in this class. (e) Getting an A on the nal and doing every exercise in this book is sucient for getting an A in this class. (f) You will get an A in this class if and only if you either do every exercise in this book or you get an A on the nal. Solution (a) r q (b) p q r (c) r p (d) p q r (e) (p q ) r (f) r (p q ) 2. (Grimaldi: Section 2.1, pp. 54 Question 5) Let p,q,r denote the following statements about a particular triangle ABC . p : Triangle ABC is isosceles. q : Triangle ABC is equilateral. r : Triangle ABC is equiangular.

Translate each of the following into an English sentence. (a) q p (b) p q (c) q r (d) p q (e) r p Solution (a) If triangle ABC is equilateral, then it is isosceles. (b) If triangle ABC is not isosceles, then it is not equilateral. (c) Triangle ABC is equilateral if and only if it is equiangular. (d) Triangle ABC is isosceles but it is not equilateral. (e) If triangle ABC is equiangular, then it is isosceles. 3. (Grimaldi: Section 2.1, pp. 54 Question 6) Determine the truth value of each of the following implications. (a) If 3 + 4 = 12 then 3 + 2 = 6 (b) If 3 + 3 = 6 then 3 + 4 = 9 Solution (a) F F T (b) T F F 4. (Rosen: Section 1.1, pp. 18 Question 18) Write each of these statements in the form if p, then q in English. (a) It is necessary to wash the bosss car to get promoted. (d) Willy gets caught whenever he cheats. (e) You can access the website only if you pay a subscription fee. Solution (a) p: You wash the bosss car. q : You get promoted. (q p) If you get promoted then you must have washed the bosss car. (d) p: Willy gets caught. q : Willy cheats. (q p) If Willy cheats, he gets caught. (e) p: You can access the website. q : You pay a subscription fee. (p q ) If you can access the website then you must have paid a subscription fee. 5. (Grimaldi: Section 2., pp. 67 Question 19c) Simplify the following compound statement by giving reasons at each step.

[(p q ) (p q r)] p q Solution [(p q ) (p q r)] (p q ) (p q r) s t s t (p q ) (p q r) DeMorgans Laws (p q ) (p q r) Law of Double Negation (p q ) Absorption Law

6. (Grimaldi: Section 2., pp. 67 Question 18b) Give the reasons for each step in the following simplications of compound statement. (p q ) [q (r q )] (p q ) q (p q ) q q (p q ) (q p) (q q ) (q p) F0 (q p) (q p)

Solution (p q ) [q (r q )] (p q ) q Absorption & Commutative Law (p q ) q s t s t q (p q ) Commutative Law over (q p) (q q ) Distributive Law of over . (q p) F0 Inverse law (q p) Identity law (q p) DeMorgans Laws

7. (Rosen: Section 1.3, pp. 47 Question 10) Let C (x) be the statement x has a cat, D(x) be the statement x has a dog,and F (x) be the statement x has a ferret. Express each of these statements in terms of C (x), D(x), and F (x) quantiers, and logical connectives. Let the universe of discourse consist of all the students in your course. (a) A student in your class has a cat, a dog, and a ferret. (b) All students in your class have a cat, a dog, or a ferret. (c) Some student in your class has a cat and a ferret, but not a dog. (d) No student in your class has a cat, a dog, and a ferret. (e) For each of the three animals, cats, dogs, and ferrets, there is a student in your