0% found this document useful (0 votes)
33 views21 pages

Method of Proofs

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1/ 21

Method of Proofs

Support slides
Proof Techniques - direct proofs
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  C)  (DM
 C)  (D  S)  (M))  S
?
Cs173 - Spring 2004
Proof Techniques - direct proofs
In general, to prove p  q, assume p
and show that q follows.

((M  C)  (D  C)  (D  S) 


(M))  S
?
Proof Techniques - direct proofs
1. M  C Given
2. D  C Given
3. D  S Given
4. M Given
5. C DS (1,4)
6. D MT (2,5)
7. S MP (3,6)

Ellen is smart!
Proof Techniques - vacuous proofs
In general, to prove p  q, assume p and show that q
follows.

But p  q is also TRUE if p is FALSE.

Suggests proving p  q by proving p.

Ex. p: There is good Chinese food in KUET.


q: I’ll give you each $10.

Since p is FALSE, p  q is TRUE


(but we don’t know a thing about q)
Proof Techniques - trivial proofs
In general, to prove p  q, assume p and show that q
follows.

But p  q is also TRUE if q is TRUE.

Suggests proving p  q by proving q.

Ex. p: there is good Chinese food in KUET


q: I’m drinking coffee

Since q is TRUE, p  q is TRUE


(the truth or falsity of p is irrelevant)
Proof Techniques - indirect proofs
Recall that p  q  q  p (the contrapositive)

So, we can prove the implication p  q by first assuming


q, and showing that p follows.

Example: Prove that if a and b are integers, and a + b ≥ 15,


then a ≥ 8 or b ≥ 8.

(a + b ≥ 15)  (a ≥ 8) v (b ≥ 8)

(Assume q) Suppose (a < 8)  (b < 8).


(Show p) Then (a ≤ 7)  (b ≤ 7),
and (a + b) ≤ 14,
and (a + b) < 15.
Proof Techniques - proof by contradiction
To prove a proposition p, assume not p and show a
contradiction.

Suppose the proposition is of the form p  q, and


recall that p  q  q v p  (q  p). So
assuming the opposite is to assume q  p.
Proof Techniques - proof by contradiction
Example:

Rainy days make gardens grow.


Gardens don’t grow if it is not hot.
When it is cold outside, it rains.

Prove that it’s hot.

Given: R  G
H  G
H  R
Show: H
((R  G)  (H  G)  (H  R)) 
Cs173 - Spring 2004
H
?
Proof Techniques - proof by contradiction
Given: R  G
H  G
H  R
Show: H
1. R  G Given
2. H  G Given
3. H  R Given
4. H assume to the contrary
5. R MP (3,4)
6. G MP (1,5)
7. G MP (2,4)
8. G  G contradiction
H
Proof Techniques - proof by contradiction
Classic proof that 2 is irrational.

Suppose 2 is rational. Then 2 = a/b for some


integers a and b (relatively prime).
2 = a/b implies
2 = a2/b2
2b2 = a2
a2 is even, and so a is even (a = 2k for some k)
But if a and b are
2b = (2k) = 4k
2 2 2
both even, then they
b2 = 2k2 are not relatively
prime!
b is even, and so b is even (b = 2k for some k)
2
Proof Techniques - proof by contradiction
You’re going to let me get away with that?

a2 is even, and so a is even (a = 2k for some k)??


Suppose to the contrary that a is not even.
Then a = 2k + 1 for some integer k
Then a2 = (2k + 1)(2k + 1) = 4k2 + 4k + 1
and a2 is odd. contradiction
So a really is even.
Proof Techniques - proof by cases
Suppose we want to prove a theorem of the form:
p1 v p 2 v … v pn  q

We can prove it in pieces corresponding to the


cases, but which must be true?

A: (p1  q) v (p2  q) v … v (pn  q)

B: (p1  q)  (p2  q)  …  (pn  q)


Proof Techniques - proof by cases
(p1  q)  (p2  q)  …  (pn  q)

Proof for n=2:

(p1 v p2)  q  (p1 v p2) v q Defn of 


 (p1  p2) v q DeMorgan’s
 (p1 v q)  (p2 v q)
Distributivity
 (p1  q)  (p2  q) Defn of 
Proofs - something for everyone…
“if x is a perfect square, and x is even, then x is
divisible by 4.”
Formally: (p  q)  r
Contrapositive: r  (p  q)  r  (p v q)
Suppose x is not divisible by 4.
Then x = 4k + 1, or x = 4k + 2, or x = 4k + 3.
Now structure looks like (u1 v u2 v u3)  (p v q)
Case 1 (&3): x = 4k + 1, odd, corresponds to q
Case 2: x = 4k + 2, even, so must not be a
perfect square.
Proofs - something for everyone…
“if x is a perfect square, and x is even, then x is
divisible by 4.”
Subgoal, prove Case 2:
Case 2: x = 4k + 2, even (so we have to show not square).
But x = 4k + 2 = 2(2k + 1)
x is the product of 2 and an odd number.

So, x is not a perfect square.


Proofs - something for everyone…
If Boris becomes a pastry chef, then if he gives
in to his desire for chocolate mousse, then his
waistline will suffer. If his waistline suffers,
then his dancing will suffer. Boris gives in to
his desire for chocolate mousse. However, his
dancing will not suffer. Prove that Boris does
not become a pastry chef.

a) I could have done this on my own.


b) I worked it out with my partner, but I
couldn’t have done it alone.
c) My partner and I couldn’t do it.
Proof Techniques-Quantifiers: Existence Proofs
Two ways of proving x P(x).

Either build one, or show one can be built.

Constructive Non-constructive

Two examples, both involving n!

For the examples, think of n! as a


list of factors.
CONSTRUCTIVE
Proof Techniques-Quantifiers: Existence Proofs
Example: Prove that for all integers n, there exist
n consecutive composite integers. Composite =
not prime
n (integer), x so that x, x+1, x+2, … , x+n-1 are
all composite.
Proof: Let n be an arbitrary integer.

(n + 1)! + 2 is divisible by 2,  composite.


(n + 1)! + 3 is divisible by 3,  composite.

(n + 1)! + (n + 1) is divisible by n + 1,  composite.


x = (n + 1)! + 2
Proof Techniques-Quantifiers: Existence Proofs
Example: Prove that for all integers n, there
exists a prime p so that p > n. Infinitely many
primes!
n (integer), p so that p is prime, and p > n.
Proof: Let n be an arbitrary integer, and consider
n! + 1. If (n! + 1) is prime, we are done since (n!
+ 1) > n. But what if (n! + 1) is composite?

If (n! + 1) is composite then it has a


prime factorization, p1p2…pn = (n! + 1)
Consider the smallest pi, how small can it
be?
NON-CONSTRUCTIVE
Proof Techniques-Quantifiers: Existence Proofs
n (integers), p so that p is prime, and p > n.
Proof: Let n be an arbitrary integer, and consider
n! + 1. If (n! + 1) is prime, we are done since (n!
+ 1) > n. But what if (n! + 1) is composite?

If (n! + 1) is composite then it has a


prime factorization, p1p2…pn = (n! + 1)
Consider the smallest pi, and call it p. Can it be 2?
How small can it be?
Can it be 3?
So, p > n, and we are done. BUT WE Can it be 4?
DON’T KNOW WHAT p IS!!! Can it be n?

You might also like