SEC 1104 / SWE 1104 (Mathematics For Computing 1) TUTORIAL 1 1. Write the statement below in symbolic form using the symbols ~, ∨ and ∧ and the indicated letters to represent component statements. a) Juan is a math major but not a computer science major. (m=“Juan is a math major”, c=“Juan is a computer science major”) m∧ ∼ C b) Let h=“John is healthy”, w=“John is wealthy”, and s=“John is wise”. i. John is healthy and wealthy but not wise.(h ∧ w)∧ ∼ s ii. John is not wealthy but he is healthy and wise.∼ w ∧ (h ∧ s) iii. John is neither healthy, wealthy, nor wise.∼ w∧ ∼ h∧ ∼ s) iv. John is neither wealthy nor wise, but he is healthy.(∼ w∧ ∼ s) ∧ h v. John is wealthy, but he is not both healthy and wise.w∧ ∼ (h ∧ s) or w ∧ (∼ h∨ ∼ s) c) Either this polynomial has degree 2 or it has degree 3 but not both. (n=“This polynomial has degree 2”, k=“This polynomial has degree 3”)(n∨k)∧ ∼ (n∧k) 2. Write truth tables for statements below: a) ∼ p ∧ q b) p ∧ (q ∧ r) 1 c) ∼ (p ∧ q) ∨ (p ∨ q) d) p ∧ (∼ q ∨ r) 3. Determine whether the statements forms below are logically equivalent. In each case, construct a truth table and include a sentence justifying your answer. a) p ∨ (p ∧ q) and p b) p ∨ t and t c) (p ∧ q) ∧ r and p ∧ (q ∧ r) 2 4. Use De Morgan’s laws to write negations for the statements below: a) Hal is a math major and Hal’s sister is a computer science major. Hal is not a math major or Hal’s sister is not a computer science major. b) The train is late or my watch is fast. The train is not late and my watch is not fast c) The connector is loose or the machine is unplugged. The connector is not loose and the machine is not unplugged. d) This computer program has a logical error in the first ten lines or it is being run with an incomplete data set. This computer programme does not have a logical error in the first ten lines and it is not being run with an imcomplete data set. e) Sam is an orange belt and Kate is a red belt. Sam is not an orange belt or Kate is not a red belt. 5. Use Logical Equivalence Theorem to verify the logical equivalences below. a) (p∧ ∼ q) ∨ p ≡ p b) ∼ (p∨ ∼ q) ∨ (∼ p∧ ∼ q) ≡∼ p 6. Write negations for each of the following statements. (Assume that all variables represent fixed quantities or entities, as appropriate.) a) If P is a square, the P is a rectangle. P is a square and P is not a rectangle. b) If today is New Year’s Eve, then tomorrow is January. Today is New Year’s Eve and tomorrow is not January. c) if the decimal expansion of r is terminating, then r is rational. The decimal expansion of r is terminating and r is not rational. d) If n is prime, then n is odd or n is 2. n is prime and both n is not odd and n is not 2/ n is prime and n is neither odd nor 2. 7. Rewrite the statements below in if-then form. 3 a) Catching the 8:05 bus is a sufficient condition for my being on time for work. If I cat the 8:05 bus, then I am on time for work. b) Having two 45◦ angle is sufficient condition for this triangle to be a right triangle. If this triangle has two 45deg angle, then it is a right triangle. 8. Use the contrapositive to rewrite the the statements below in the if-then form in two ways. a) Being divisible by 3 is necessary condition for this number to be divisible by 9. If this number is not divisible by 3, then it is not divisible by 9. If this number is divisible by 9, then it is divisible by 3. b) Doing homework regularly is a necessary condition for Jim to pass the course. If Jim does not do his homework regularly, then Jim will nto pass the course. If Jim passes the course, then he will have done his homework regularly. 9. Use the logical equivalences p → q ≡∼ p ∨ q to rewrite the given statement froms without using the symbol →and, use the logical equivalence p ∨ q ≡∼ (∼ p∧ ∼ q) to rewrite each statement for using only ∧and ∼. a) p∧ ∼ q → r p∧ ∼ q →≡∼ (p∧ ∼ q) ∨ r b) p∨ ∼ q → r ∨ q 10. Use truth table to determine whether the argument forms below are valid. Indicate which columns represent the premises and which represent the conclusion. a) p → q q→p ∴ p∨q 4 b) p ∨ q p →∼ q p→r ∴ r 5 11. A set of premises and a conclusion are given below. Use the valid arguments forms to deduce the conclusion from the premises, giving a reason for each step. Assume all variables are statement variables. a) p ∨ q q→r p∧s→t ∼r ∼q →u∧s ∴ t 6 b) ∼ p ∨ q → r s∨ ∼ q ∼t p→t ∼ p ∧ r →∼ s ∴∼ q 7