Islamic University of Gaza Faculty of Engineering Department of Computer Engineering Fall 2011 ECOM 2311: Discrete Mathematics Eng. Ahmed Abumarasa Discrete Mathematics Sec 1.6 The Foundations: Logic and Proof, Sets, and Functions Introduction to proofs Chapter 1: The Foundations: Logic and Proof, Sets, and Functions 1.4: Introduction to proofs Methods of Proving Theorems: Direct Prove: A direct proof of a conditional statement q is constructed when the first step is the assumption that p is true; subsequent steps are constructed using rules of inference, with the final step showing that q must also be true. Proof by Contraposition: Proofs by contraposition make use of the fact that the conditional statement p q is equivalent to its contrapositive, . Proofs by Contradiction: Because the statement is a contradiction whenever r is a proposition, we can prove that p is true if we can show that VACUOUS PROOFS: is true when we know that p is false. TRIVIAL PROOFS: is true when we know that q is true. PROOFS OF EQUIVALENCE: Exercise: 1.16.10 Use a direct proof to show that the product of two rational numbers is rational. Solution: First number x = a/b, b ≠0 Second number y =c/d, d≠0 X*y = a*c/b*d sense b ≠0 and d≠0 then b*d≠0. Let a*c = l and b*d = m so x = l/m so x is rational number. 1.16.11 Prove or disprove that the product of two irrational numbers is irrational. Solution: To disprove it we need only one case doesn`t match the law. Now let X = √2, irrational number. X*X = 2 is rational number. (Product of two irrational numbers is not an irrational number). 1.6.16 Prove that if m and n are integers and m n is even, then m is even or n is even. Solution: Let p: m*n is event. H: m is event. L: n is event. (m ᴠ n) Using prove by Contraposition, not(m ᴠ not p So: m is odd and n is odd m= 2k +1 n= 2l +1 m*n = (2k +1)*(2l+1) = 4kl + 2k + 2l + 1 = 2(2kl +k + l) +1, let (2kl +k + l) = v so m*n = 2v +1 so m*n is odd by Contraposition if m*n is even, then m is even or n is even. 1.6.27 Prove that if n is a positive integer, then n is odd if and only if 5n + 6 is odd. We must prove two implications. First, we assume that n is odd and show that 5n + 6 is odd. By assumption, n = 2k + 1 so 2n +6 = 5(2k +1) =6 = 10k + 11 = 10k +10 +1 = 2(5k +5) +1 = 5V +1 where v = (5k +5), so 5n +6 is odd. Second, we have to show that if 5n + 6 is odd then n is odd. Using indirect proves: Let n is event so n = 2k 5n +6 = 10k +6 = 2(5k +3) so it is event so by contraposition if 5n + 6 is odd then n is odd. From the two cases we found that n is odd if and only if 5n + 6 is odd. External question: Prove that if x and y are real numbers, then max(x, y) + min(x, y) = x + y. Solution: Like this question we cane analysis it to its cases. Max(x, y) has two cases if x is the max or y is max Min(x, y) has two cases if y is the min or x is min Case 1: Let x is the max so y is the min so max(x, y) + min(x, y) = x +y. Case 2: Let y is the max so x is the min so max(x, y) + min(x, y) = y +x = x +y. So in all cases max(x, y) + min(x, y) = x +y.