Presentation is loading. Please wait.

Presentation is loading. Please wait.

Lecture 1.4: Rules of Inference, and Proof Techniques* CS 250, Discrete Structures, Fall 2011 Nitesh Saxena *Adopted from previous lectures by Cinda Heeren.

Similar presentations


Presentation on theme: "Lecture 1.4: Rules of Inference, and Proof Techniques* CS 250, Discrete Structures, Fall 2011 Nitesh Saxena *Adopted from previous lectures by Cinda Heeren."— Presentation transcript:

1 Lecture 1.4: Rules of Inference, and Proof Techniques* CS 250, Discrete Structures, Fall 2011 Nitesh Saxena *Adopted from previous lectures by Cinda Heeren

2 8/25/2011 Lecture 1.4 - Rules of Inference, and Proof Techniques2 Course Admin Slides from previous lectures all posted Expect HW1 to be coming in around coming Monday Thanks for taking the competency exam Your graded exams will be returned to you next week Your scores will not affect your grade in this course in any way

3 8/25/2011 Lecture 1.4 - Rules of Inference, and Proof Techniques3 Outline Rules of Inference (contd.) Other Proof techniques

4 8/25/2011 Lecture 1.4 - Rules of Inference, and Proof Techniques4 Complex Example: Rules of Inference Here’s what you know: Ellen is a math major or a CS major. If Ellen does not like discrete math, she is not a CS major. If Ellen likes discrete math, she is smart. Ellen is not a math major. Can you conclude Ellen is smart? M  C  D   C D  S MM

5 8/25/2011 Lecture 1.4 - Rules of Inference, and Proof Techniques5 Complex Example: Rules of Inference 1. M  CGiven 2.  D   CGiven 3. D  SGiven 4.  MGiven 5. CDS (1,4) 6. DMT (2,5) 7. SMP (3,6) Ellen is smart!

6 8/25/2011 Lecture 1.4 - Rules of Inference, and Proof Techniques6 Rules of Inference: Common Fallacies Rules of inference, appropriately applied give valid arguments. Mistakes in applying rules of inference are called fallacies.

7 8/25/2011 Lecture 1.4 - Rules of Inference, and Proof Techniques7 Rules of Inference: Common Fallacies If I am Bonnie Blair, then I skate fast I skate fast!  I am Bonnie Blair Nope If you don’t give me $10, I bite your ear. I bite your ear!  You didn’t give me $10. Nope ((p  q)  q)  p Not a tautology.

8 8/25/2011 Lecture 1.4 - Rules of Inference, and Proof Techniques8 Rules of Inference: Common Fallacies If it rains then it is cloudy. It does not rain.  It is not cloudy Nope If it is a car, then it has 4 wheels. It is not a car.  It doesn’t have 4 wheels. Nope ((p  q)   p)   q Not a tautology.

9 8/25/2011 Lecture 1.4 - Rules of Inference, and Proof Techniques9 Direct Proofs A totally different example: Prove that if n = 3 mod 4, then n 2 = 1 mod 4. HUH?7 = 3 mod 437 = 1 mod 494 = 2 mod 416 = 0 mod 47 = 111 mod 437 = 61 mod 494 = 6 mod 416 = 1024 mod 4

10 10 Proof: If n = 3 mod 4, then n = 4k + 3 for some int k. This means that: Coming back to our Theorem: If n = 3 mod 4, then n 2 = 1 mod 4. Direct Proofs = (4k + 3)(4k + 3)n2n2 = 16k 2 + 24k + 9 = 16k 2 + 24k + 8 + 1 = 4(4k 2 + 6k + 2) + 1 = 4j + 1 for some int j = 1 mod 4.

11 11 Proof: If n is odd, then n = 2k + 1 for some int k. This means that: Theorem: If n is an odd natural number, then n 2 is also an odd natural number. Direct Proofs: another example = (2k+1)(2k+1)n2n2 = 4k 2 + 4k + 1 = 2(2k 2 + 2k) + 1 = 2j + 1 for some int j  n 2 is odd

12 8/25/2011 Lecture 1.4 - Rules of Inference, and Proof Techniques12 Proofs by Contraposition Recall: Contrapositive: p  q and  q   p Ex. “If it is noon, then I am hungry.” “If I am not hungry, then it is not noon.” We also know that: p  q   q   p Therefore, if establishing a direct proof (p  q) is difficult for some reason, we can instead prove its contraposition (  q   p), which may be easier.

13 8/25/2011 Lecture 1.4 - Rules of Inference, and Proof Techniques13 Proof: If n is not odd, then n = 2k for some int k. This means that: Theorem: If 3n + 2 is an odd natural number, then n is also an odd natural number. Proofs by Contraposition: example = 3(2k) + 23n+2 = 2(3k) + 2 = 2j for some int j  3n+2 is not odd = 2(3k + 1)

14 8/25/2011 Lecture 1.4 - Rules of Inference, and Proof Techniques14 Proof: If a > sqrt(N) AND b > sqrt(N), then by multiplying the two inequalities, we get Theorem: If N = ab where a and b are natural numbers, then a <= sqrt(N) or b <= sqrt(N). Proofs by Contraposition: another example > N This negates the proposition N=ab ab

15 8/25/2011 Lecture 1.4 - Rules of Inference, and Proof Techniques15 Proofs by Contradiction Recall: Contradiction is a proposition that is always False To prove that a proposition p is True, we try to find a contradiction q such that  p  q is True. If  p  q is True and q is False, it must be the case that p is True. We suppose that p is False and use this to find a contradiction of the form r   r

16 16 Proof: A: n is prime B: n is odd We need to show that A  B is true We need to find a contradiction q such that:  (A  B)  q We know:  (A  B)   (  A  B)  A   B This means that we suppose (n is prime) AND (n is even) is True But, if n is even, it means n has 2 as its factor, and this means that n is not prime. This is a contradiction because (n is prime) AND (n is not prime) is True Theorem: Every prime number is an odd number Proofs by Contradiction: example

17 17 Proof: A: 3n + 2 is odd B: n is odd We need to show that A  B is true We need to find a contradiction q such that:  (A  B)  q We know:  (A  B)   (  A  B)  A   B This means that we suppose that (3n + 2 is odd) AND (n is even) is True. But, if n is even, it means n = 2k for some int k, and this means that 3n + 2 = 6K+2 = 2(3K+1)  even. This is a contradiction: (3n + 2 is odd) AND (3n +2 is even) Theorem: If 3n + 2 is an odd natural number, then n is also an odd natural number. Proofs by Contradiction: example

18 8/25/2011 Lecture 1.4 - Rules of Inference, and Proof Techniques18 Disproving something: counterexamples If we are asked to show that a proposition is False, then we just need to provide one counter-example for which the proposition is False In other words, to show that  x P(x) is False, we can just show  x P(x) =  x  P(x) to be True Example: “Every positive integer is the sum of the squares of two integers” is False. Proof: counter-examples: 3, 6,…

19 8/25/2011 Lecture 1.4 - Rules of Inference, and Proof Techniques19 Today’s Reading Rosen 1.7 Please start solving the exercises at the end of each chapter section. They are fun.


Download ppt "Lecture 1.4: Rules of Inference, and Proof Techniques* CS 250, Discrete Structures, Fall 2011 Nitesh Saxena *Adopted from previous lectures by Cinda Heeren."

Similar presentations


Ads by Google