lecture 1.5: proof techniques
DESCRIPTION
Lecture 1.5: Proof Techniques. CS 250, Discrete Structures, Fall 2013 Nitesh Saxena Adopted from previous lectures by Cinda Heeren. Course Admin. Slides from previous lectures all posted HW1 posted Due at 11am on Sep 19 Please follow all instructions Questions? - PowerPoint PPT PresentationTRANSCRIPT
![Page 1: Lecture 1.5: Proof Techniques](https://reader035.vdocuments.us/reader035/viewer/2022080902/56812be0550346895d9051d1/html5/thumbnails/1.jpg)
Lecture 1.5: Proof Techniques
CS 250, Discrete Structures, Fall 2013
Nitesh Saxena
Adopted from previous lectures by Cinda Heeren
1
![Page 2: Lecture 1.5: Proof Techniques](https://reader035.vdocuments.us/reader035/viewer/2022080902/56812be0550346895d9051d1/html5/thumbnails/2.jpg)
04/19/23Lecture 1.5 - Proof
Techniques 2
Course Admin Slides from previous lectures all posted HW1 posted
Due at 11am on Sep 19 Please follow all instructions Questions?
Competency exams have been graded Will return this Thursday
![Page 3: Lecture 1.5: Proof Techniques](https://reader035.vdocuments.us/reader035/viewer/2022080902/56812be0550346895d9051d1/html5/thumbnails/3.jpg)
04/19/23Lecture 1.5 - Proof
Techniques 3
Outline
Proof Techniques
![Page 4: Lecture 1.5: Proof Techniques](https://reader035.vdocuments.us/reader035/viewer/2022080902/56812be0550346895d9051d1/html5/thumbnails/4.jpg)
Main techniques Direct proofs Proofs using contraposition Proofs using contradiction
04/19/23Lecture 1.5 - Proof
Techniques 4
![Page 5: Lecture 1.5: Proof Techniques](https://reader035.vdocuments.us/reader035/viewer/2022080902/56812be0550346895d9051d1/html5/thumbnails/5.jpg)
04/19/23Lecture 1.5 - Proof
Techniques 5
Direct Proofs
An example:
Prove that if n = 3 mod 4, then n2 = 1 mod 4.
HUH?
7 = 3 mod 4
37 = 1 mod 4
94 = 2 mod 4
16 = 0 mod 4
7 = 111 mod 4
37 = 61 mod 4
94 = 6 mod 4
16 = 1024 mod 4
![Page 6: Lecture 1.5: Proof Techniques](https://reader035.vdocuments.us/reader035/viewer/2022080902/56812be0550346895d9051d1/html5/thumbnails/6.jpg)
6
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 n2 = 1 mod 4.
Direct Proofs
= (4k + 3)(4k + 3)
n2
= 16k2 + 24k + 9= 16k2 + 24k + 8 + 1
= 4(4k2 + 6k + 2) + 1
= 4j + 1 for some int j
= 1 mod 4. 04/19/23
Lecture 1.5 - Proof Techniques
![Page 7: Lecture 1.5: Proof Techniques](https://reader035.vdocuments.us/reader035/viewer/2022080902/56812be0550346895d9051d1/html5/thumbnails/7.jpg)
7
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 n2 is also an odd natural number.
Direct Proofs: another example
= (2k+1)(2k+1)n2
= 4k2 + 4k + 1
= 2(2k2 + 2k) + 1
= 2j + 1 for some int j
n2 is odd04/19/23
Lecture 1.5 - Proof Techniques
![Page 8: Lecture 1.5: Proof Techniques](https://reader035.vdocuments.us/reader035/viewer/2022080902/56812be0550346895d9051d1/html5/thumbnails/8.jpg)
04/19/23Lecture 1.5 - Proof
Techniques 8
Proofs by ContrapositionRecall: 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.
![Page 9: Lecture 1.5: Proof Techniques](https://reader035.vdocuments.us/reader035/viewer/2022080902/56812be0550346895d9051d1/html5/thumbnails/9.jpg)
04/19/23Lecture 1.5 - Proof
Techniques 9
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)
![Page 10: Lecture 1.5: Proof Techniques](https://reader035.vdocuments.us/reader035/viewer/2022080902/56812be0550346895d9051d1/html5/thumbnails/10.jpg)
04/19/23Lecture 1.5 - Proof
Techniques 10
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
![Page 11: Lecture 1.5: Proof Techniques](https://reader035.vdocuments.us/reader035/viewer/2022080902/56812be0550346895d9051d1/html5/thumbnails/11.jpg)
04/19/23Lecture 1.5 - Proof
Techniques 11
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
![Page 12: Lecture 1.5: Proof Techniques](https://reader035.vdocuments.us/reader035/viewer/2022080902/56812be0550346895d9051d1/html5/thumbnails/12.jpg)
12
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
04/19/23Lecture 1.5 - Proof
Techniques
![Page 13: Lecture 1.5: Proof Techniques](https://reader035.vdocuments.us/reader035/viewer/2022080902/56812be0550346895d9051d1/html5/thumbnails/13.jpg)
13
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
![Page 14: Lecture 1.5: Proof Techniques](https://reader035.vdocuments.us/reader035/viewer/2022080902/56812be0550346895d9051d1/html5/thumbnails/14.jpg)
04/19/23Lecture 1.5 - Proof
Techniques 14
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,…
![Page 15: Lecture 1.5: Proof Techniques](https://reader035.vdocuments.us/reader035/viewer/2022080902/56812be0550346895d9051d1/html5/thumbnails/15.jpg)
04/19/23Lecture 1.5 - Proof
Techniques 15
Today’s Reading Rosen 1.7 Please start solving the exercises at the
end of each chapter section. They are fun.