Assignment 1 Solutions COMP2130 Winter 2014. Obey all instructions given in the ROASS document. Total Number of Marks = 55 Q1) [4] Construct a truth table and a justifying sentence to show that the statement 1 and statement 2 are logically equivalent or not. a) 1) pt 2) t p T F t pt T T T T [1] |_______| These two columns are the same so 1) and 2) are logically equivalent. [1] b) 1) ~(p q) p T T F F ~p F F T T 2) ~p ^ ~q q T F T F ~q F T F T pq T T T F ~(pq) ~p ^ ~q F F [1] F F F F T T |____________| These columns are the same so 1) and 2) are logically equivalent. [1] Q2) [3] Use De Morgan’s Laws to write the negation for the following statements a) John is a brown belt and Val is a blue belt. b) 0 < x 9. a) John is not a brown belt or Val is not a blue belt. [1] b) Rewrite 0 < x and (x < 9 or x=0). [1] Negation 0 ≥ x or x > 9 . [1] Q3) [3] Use truth tables to establish whether the following statement forms a tautology or a contradiction or neither. ((q^r)^(~p^q)) ^ ~q p ~p q r q^r ~p^q (q^r)^(~p^q) ~q ((q^r)^(~p^q)) ^ ~q T F T T T F F F F T F T F F F F F F [1] T F F T F F F T F T F F F F F F T F F T T T T T T F F F T T F F T F F F F T F T F F F T F F T F T F F T T F [1] |_ All F means a contradiction[1] Q4) [3] If in question 3 I had left out the words or neither, what is the minimum number of lines of the truth table necessary to answer the question and why. I want some logic here! With no “or neither” the one line of the truth table will tell us that that it is not one [1]of tautology or contradiction[1] then by elimination [1]it must be the other. Q5) [3] Assume x is a particular real number. Determine whether statement (a) and (b) are logically equivalent a) x < 2 or it is not the case that 0 < x < 3. b) x 0 or either x < 2 or x ≥ 3. Do this question by letting p,q,r be the 3 statement variables for the 3 statements in a) and b). The write out a) and b) in symbols and now construct a truth table and a justifying sentence. Let p be “x < 2” and q be”0 < x” and r be x < 3. a) becomes p ~(q ^ r) b) becomes ~q (p ~r) [1] p T T T T F F F F ~q F F T T F F T T q T T F F T T F F r T F T F T F T F ~r F T F T F T F T q^r T F F F T F F F ~(q ^ r) F T T T F T T T p ~(q ^ r) p~r ~q(p~r) T T T T T T T T T T T T F F F T T T [1] T F T T F T |__________________| equal columns so a and b are logically equivalent [1] Q6) [3] Use the logical equivalences on Page 35 in Theorem 2.1.2 to prove the logical equivalence of the following. Show all steps. Give the law being used in each step. ~(p (q^ ~p)) ~p ^ ~q ~(p (q^ ~p)) ~p ^ ~(q^ ~p) ~p ^ (~q~~p) ~p ^ (~q p) (~p ^ ~q ) (~p ^ p) (~p ^ ~q) c ~p ^ ~q So ~(p (q^ ~p)) ~p ^ ~q [No laws -1.5] De Morgan’s Law [1/2] De Morgan’s Law [1/2] Double Negative Law[1/2] Distributive Law [1/2] Negation Law [1/2] Identity Law [1/2] Q7)[3] Construct the truth table for (pq) (q p) and pq. What can you conclude? p T T F F q T F T F pq T F T T qp T T F T (pq)(qp) pq T T F[1] F[1] F F T T |____________| columns the same proves (pq)(qp)pq[1] Q8)[3] Show that the following statement forms are all logically equivalent using truth tables. a) p q r b) p ^ ~q r p T T T T F F F F q T T F F T T F F r T F T F T F T F qr T T T F T T T F pq r -q p^ ~q p^~qr T F F T T F F T T T T T F [1] T T F [1] T F F T T F F T T T T T T T T T |________________________| Since the columns are equal, ( p q r) (p ^ ~q r) [1] Q9) [3]Write the contrapositive, converse and inverse of the statement “If P is a square, then P is a rectangle.” Are all the statements true? The contrapositive of “If P is a square, then P is a rectangle.” is “If P is not a rectangle then P is not a square.”[1] The inverse of “If P is a square, then P is a rectangle.” is “If P is not a square then P is not a rectangle.”[1] The converse of “If P is a square, then P is a rectangle.” is “If P is a rectangle then P is a squares.”[1] The statements are not all true [1]as the inverse and converse are false.[bonus 1] Q10) [1] Write the following statement, “It is sufficient for John to win this frame, to win the bowling trophy” in the usual “if p then q” style.3 If John wins this frame then he will win the bowling trophy. [1] Q11) [4] Write a logically equivalent statement form for “(qp) ^ (~p q)” without using “” or “”. Then find a logically equivalent statement to your answer that is as simple as possible. Back up your statements with authorities . qp ^ ~p q (qp ^ pq) ^ (~p q) {definition of } ((~qp) ^ (~pq))^ (~~pq) {logic equivalence of pq from notes} [1] ((~qp) ^ (~pq))^ (pq) {double negative law} (~qp) ^ ((~pq)^ (pq)) {associative law} (~qp) ^ ((~p^p) q) {distributive law} (~qp) ^ (c q) {negation law}[1/2] (~qp) ^ q {identity law} (~q^q) (p ^q) {distributive Law} c (p^q) {negation law} p^q {identity law}[1/2] Q12) [6] Use truth tables to determine which of the following arguments are valid or not. Check off the critical rows and give the reason for you answer. a) 1) p 2) q p ^ q b) 1) pq 2) qr pr a) p T T F F b) p q r pq qr pr T T T T T T T T F T F F T F T F T T T F F F T F F T T T T T F T F T F T F F T T T T F F F T T T [1] In the critical columns the conclusion is true so the arguments are valid.[2] q T F F F p^q T [1] F F [1] F [1] Q13)[4] Use symbols to write the logical form of the following argument. If the argument is valid, identify the rules inference that guarantees its validity. Otherwise, state whether the converse or inverse error was made. “If at least one of two numbers is divisible by 6 then the product of the two numbers is divisible by 6. Neither of the two numbers is divisible by 6. Therefore, the product of the two numbers is not divisible by 6.” Let p be “At least one of two numbers is divisible by 6”. Let q be “the product of the numbers is divisible by 6”. [1] Then the argument is 1) if p the q [1/2] 2) ~p [1/2] ~q [1] Invalid argument, Inverse Error [1] Q14) [6]You are visiting the island of knaves and knights where knaves always lie and knights never lie. You meet two natives of the island. A says “B is a knave.” B says “A is a knave.” How many knaves are there? Prove it. You can do it like the book or use more formal methods. Assume that A is a knight. Then A always tells the truth {definition of knight} A says B is a knave so B is a knave. {premise} In this case there is 1 knave. Assume that A is a knave. Then A never tells the truth {definition of knave} A native is either a knave or a knight. {premise} A says B is a knave so B is a not a knave. {premise} So B is a knight. {modus ponens} In this case there is 1 knave. In either case there is one knave so there is one knave in the pair of natives. {proof by cases} Q15) [6] Use the valid argument forms listed in Table 2.3.1 on page 61 to deduce the conclusion from the premises. a) ~r ~q b) p ^ s t c) ~r d) ~q u ^ s e) p q f) t 1) ~r~q ~r ~q {a} {c} {modus ponens}[1] 2) p q ~q p {e} {arg 1} {elimination}[1] 3) ~q ~qu^s u^s {arg 1} {d} {modus ponens}[1] 4) u^s s {arg 3} {specialization}[1] 5) p s p^s {arg2} {arg 4} {conjunction} [1] 6) p^s p^st t {arg 5} {b} {modus ponens} [1] [lose 2 with no authority]

Download
# assignment 1 Solutions