Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
CSci/Math2112 Assignment 1 Due May 22, 2015 The solutions to Assignment 1 are below. I might be showing more steps than necessary, this is to aid your understanding. (2) 1. (BoP 1.1 #24) Write {−4, −3, −2, −1, 0, 1, 2} in set-builder notation. Solution: {n ∈ Z | −4 ≤ n ≤ 2} 2. (BoP 1.2 #2ae, 1.6 #2abefg) Write the following sets by listing their elements between braces. (2) (a) A × B and A × ∅, where A = {π, e, 0} and B = {0, 1}. Solution: A × B = {{π, 0}, {π, 1}, {e, 0}, {e, 1}, {0, 0}, {0, 1}} A×∅=∅ (5) (b) A, B, A − A, A ∪ B, and A ∩ B where A = {0, 2, 4, 6, 8} and B = {1, 3, 5, 7} have universal set U = {0, 1, 2, . . . , 8}. Solution: A = {1, 3, 5, 7}(= B) B = {0, 2, 4, 6, 8}(= A) A − A = {0, 2, 4, 6, 8} A∪B =∅ A∩B =∅ (2) 3. (BoP 1.7 #10) Draw a Venn diagram for (A − B) ∪ C. Solution: (2) (2) 4. (BoP 1.8 #4) For each n ∈ N, let An = {−2n, 0, 2n}. Find S (a) i∈N Ai S Solution: i∈N Ai = {2n | n ∈ Z} (b) T i∈N Ai Solution: (3) T i∈N Ai = {0} 5. (BoP 2.2 #8) Express “At least one of the numbers x and y equals 0.” in one of the forms P ∧ Q, P ∨ Q, or ∼ P . Be sure to also state exactly what statements P and Q stand for. Solution: P = The number x equals 0. Q = The number y equals 0. The original statement is then P ∨ Q. 6. (BoP 2.3 #2 and #4) Without changing their meanings, convert each of the following sentences into a sentence having the form “If P , then Q.” (1) (a) For a function to be continuous, it is sufficient that it is differentiable. Solution: If a function is differentiable, then it is continuous. (1) (b) A function is rational if it is a polynomial. Solution: If a function is a polynomial, then it is rational. (1) 7. (BoP 2.4 #4) Without changing the meaning, convert “If a ∈ Q then 5a ∈ Q, and if 5a ∈ Q then a ∈ Q.” into a sentence having the form “P if and only if Q.” Solution: We know that a ∈ Q if and only if 5a ∈ Q. (2) 8. Give an example of a tautology which is not of the form P ∨ ∼ P . 9. (BoP 2.6 #2 and #4) Use truth tables to show that the following statements are logically equivalent. (5) (a) P ∨ (Q ∧ R) = (P ∨ Q) ∧ (P ∨ R) Solution: P Q R Q ∧ R P ∨ Q P ∨ R P ∨ (Q ∧ R) (P ∨ Q) ∧ (P ∨ R) T T T T T T T T T T F F T T T T T F T F T T T T T F F F T T T T F T T T T T T T F T F F T F F F F F T F F T F F F F F F F F F F Since the last two columns have the same entries row-by-row, the two statements are logically equivalent. (5) (b) ∼ (P ∨ Q) =∼ P ∧ ∼ Q Solution: P Q ∼ P ∼ Q P ∨ Q ∼ (P ∨ Q) ∼ P ∧ ∼ Q T T F F T F F T F F T T F F F T T F T F F F F T T F T T Since the last two columns have the same entries row-by-row, the two statements are logically equivalent. (5) 10. (BoP 2.6 #12) Decide whether or not ∼ (P ⇒ Q) and P ∧ ∼ Q are logically equivalent. Solution: We know that P ⇒ Q =∼ P ∨ Q. Thus (by the algebraic rules) ∼ (P ⇒ Q) =∼ (∼ P ∨ Q) =∼ (∼ P )∧ ∼ Q = P ∧ ∼ Q. Using a truth table is also fine for this. (4) 11. Show that (∼ P ∨ Q) ∧ (P ∧ (P ∧ Q)) and P ∧ Q are logically equivalent using the rules from LDM BF-6 (i.e. do not use a truth table). Solution: (∼ P ∨ Q) ∧ (P ∧ (P ∧ Q)) = (∼ P ∨ Q) ∧ ((P ∧ P ) ∧ Q) = (∼ P ∨ Q) ∧ (P ∧ Q) = (∼ P ∧ (P ∧ Q)) ∨ (Q ∧ (P ∧ Q)) = ((∼ P ∧ P ) ∧ Q) ∨ ((Q ∧ Q) ∧ P ) = (F ∧ Q) ∨ (P ∧ Q) = F ∨ (P ∧ Q) = (P ∧ Q) (3) 12. What is the disjunctive normal form of the statement S (defined in the below truth table) in terms of P , Q, and 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 S T F F T F F F T Solution: S = (P ∧ Q ∧ R) ∨ (P ∧ ∼ Q∧ ∼ R) ∨ (∼ P ∧ ∼ Q∧ ∼ R) 13. (BoP 2.10 #2, #8, and #10) Negate the following sentences. √ (3) (a) If x is prime, then x is not a rational number. Solution: There exists an integer x such that x is prime and (3) √ x is a rational number. (b) If x is a rational number and x 6= 0, then tan(x) is not a rational number. Solution: There exists a rational number x such that x 6= 0 and tan(x) is a rational number. (3) (c) If f is a polynomial and its degree is greater than 2, then f 0 is not constant. Solution: There exists a polynomial f such that its degree is greater than 2 and f 0 is a constant.