Lecture 2: Proof Techniques: BBM 205 Discrete Mathematics Hacettepe University
Lecture 2: Proof Techniques: BBM 205 Discrete Mathematics Hacettepe University
Hacettepe University
http://web.cs.hacettepe.edu.tr/∼bbm205
Resources:
Kenneth Rosen, Discrete Mathematics and App.
cs.colostate.edu/ cs122/.Spring15/home_resources.php
http://www.cs.nthu.edu.tw/ wkhon/math16.html
Proof Terminology
• Direct Proof:
– First step is a premise
– Subsequent steps use rules of inference or
other premises
– Last step proves the conclusion
Methods of Proving
• A direct proof of a conditional statement
pq
first assumes that p is true, and uses axioms,
definitions, previously proved theorems, with
rules of inference, to show that q is also true
• The above targets to show that the case where
p is true and q is false never occurs
– Thus, p q is always true
5
Direct Proof (Example 1)
• Show that
if n is an odd integer, then n2 is odd.
• Proof :
Assume that n is an odd integer. This implies
that there is some integer k such that
n = 2k + 1.
Then n2 = (2k+1)2 = 4k2 + 4k + 1 = 2(2k2 + 2k) + 1.
Thus, n2 is odd.
6
Direct Proof (Example 2)
• Show that
if m and n are both square numbers,
then m n is also a square number.
• Proof :
Assume that m and n are both squares. This
implies that there are integers u and v such that
m = u2 and n = v2.
Then m n = u2 v2 = (uv)2. Thus, m n is a square.
7
Class Exercise
– n2 = (2k)2 = 4k2
Step Reason
1. n is even Premise
2. kZ n = 2k Def of even integer in (1)
3. n2 = (2k)2 Squaring (2)
4. = 4k2 Algebra on (3)
5. = 2(2k2) Algebra on (4)
6. n2 is even Def even int, from (5)
Technique #2:
Proof by Contrapositive
• A direct proof, but starting with the contrapositive
equivalence:
• p q q p
• If you are asked to prove p q
• you instead prove q p
• Why? Sometimes, it may be easier to directly prove
q p than p q
Methods of Proving
• The proof by contraposition method makes use
of the equivalence
pq qp
8
Proof by Contraposition (Example 1)
• Show that
if 3n + 2 is an odd integer, then n is odd.
• Proof :
Assume that n is even. This implies that
n = 2k for some integer k.
Then, 3n + 2 = 3(2k) + 2 = 6k + 2 = 2(3k + 1),
so that 3n + 2 is even. Since the negation of
conclusion implies the negation of hypothesis,
the original conditional statement is true
9
Proof by Contraposition (Example 2)
• Show that
if n = a b, where a and b are positive,
then a n or b n .
• Proof :
Assume that both a and b are larger than n .
Thus, a b n so that n a b. Since the
negation of conclusion implies the negation of
hypothesis, the original conditional statement
is true
10
Proof by contrapositive
Prove: If n2 is an even integer, then n is even.
(n2 even) → (n even)
By the contrapositive: This is the same as showing that
•¬(n even) → ¬(n2 even)
•If n is odd, then n2 is odd.
•We already proved this on slides 4 and 5.
Since we have proved the contrapositive:
¬(n even) → ¬(n2 even)
We have also proved the original hypothesis:
(n2 even) → (n even)
Technique #3:
Proof by contradiction
Prove: If p then q.
Proof strategy:
• Assume the negation of q.
• In other words, assume that p q is true.
• Then arrive at a contradiction p p (or something
that contradicts a known fact).
• Since this cannot happen, our assumption must be
wrong.
• Thus, q is false. q is true.
Proof by contradiction example
Prove: If (3n+2) is odd, then n is odd.
Proof:
•Given: (3n+2) is odd.
•Assume that n is not odd, that is n is even.
•If n is even, there is some integer k such that n=2k.
•(3n+2) = (3(2k)+2)=6k+2 = 2(3k+1), which is 2 times a number.
•Thus 3n+2 turned out to be even, but we know it’s odd.
•This is a contradiction. Our assumption was wrong.
•Thus, n must be odd.
Proof by Contradiction Example
Prove that the 2 is irrational.
Assume that “ 2 is irrational” is false, that is, 2 is rational.
a
Hence, 2 = and a and b have no common factors. The fraction
b
is in its lowest terms.
So a2 = 2b, 2 which means a must be even,
Hence, a = 2c
Therefore, b = 2c then b must be even, which means a and b
2 2
18
Proofs of Equivalence (Example)
• Show that the following statements about the
integer n are equivalent :
p := “n is even”
q := “n – 1 is odd”
r := “n2 is even”
20
Existence Proof (Examples)
• Show that there is a positive integer that can be
written as the sum of cubes of positive integers
in two different ways.
• Proof: 1729 = 13 + 123 = 93 + 103
21
Common Mistakes in Proofs
• Show that 1 = 2.
• Proof : Let a be a positive integer, and b = a.
Step Reason
1. a = b Given
2. a2 = a b Multiply by a in (1)
3. a2 – b2 = a b – b2 Subtract by b2 in (2)
4. (a – b)(a + b) = b(a – b) Factor in (3)
5. a + b = b Divide by (a – b) in (4)
6. 2b = b By (1) and (5)
7. 2 = 1 Divide by b in (6)
22
Common Mistakes in Proofs
• Show that
if n2 is an even integer, then n is even.
• Proof :
Suppose that n2 is even.
Then n2 = 2k for some integer k.
Let n = 2m for some integer m.
Thus, n is even.
23
Common Mistakes in Proofs
• Show that
if x is real number, then x2 is positive.
• Proof : There are two cases.
Case 1: x is positive
Case 2: x is negative
In Case 1, x2 is positive.
In Case 2, x2 is also positive
Thus, we obtain the same conclusion in all
cases, so that the original statement is true.
24
Proof Strategies
• Adapting Existing Proof
• Show that
3 is irrational.
26
Backward Reasoning (Example)
• Show that for distinct positive real numbers x and y,
0.5 ( x + y ) ( x y )0.5
• Proof: By backward reasoning strategy, we find that
1. 0.25 ( x + y )2 x y 0.5 ( x + y ) ( x y )0.5
2. ( x + y )2 4 x y 0.25 ( x + y )2 x y
3. x 2 + 2 x y + y2 4 x y ( x + y ) 2 4 x y
4. x 2 – 2 x y + y2 0 x2 + 2 x y + y 2 4 x y
5. ( x – y )2 0 x2 – 2 x y + y2 0
6. ( x – y )2 0 is true, since x and y are distinct.
Thus, the original statement is true.
27
Interesting Examples
28
Interesting Examples
29
Interesting Examples
30