8 6 3 4 2 2 2 1 1 2n n! n

Section 2.1 Proof Techniques
o
Contradiction:
(indirect proof)
to prove P→Q is true,
Assume both the hypothesis and the
negation of the conclusion are true,
then try to deduce some contradiction
from this assumption.
o
Counterexample:
to disprove something
o
Induction:
to prove that P(n) is true, ∀n
Use the principle of mathematical
induction:
Introduce proof techniques:
o
Exhaustive Proof: to prove all possible cases,
Only if it is about a finite
collection
o
Direct Proof:
to prove P→Q is true,
Assume P is true, and deduce Q.
(like what we have done in Chap1)
o
Contraposition:
to prove P→ Q is true
By proving Q′→ P′
CS130 Young
P(1) is true
∀k[ P(k) true → P(k+1) true]
1
CS130 Young
eg:
•
Proof by Exhaustion:
eg: “For any positive integer n less than or equal to 3, n! < 2n”
n
1
2
3
n!
1
2
6
2n
2
4
8
CS130 Young
3
“If an integer between 5and 15 is divisible by 6, then it
is also divisible by 3”
Number
Divisible by 6
Divisible by 3
5
No
No
6
Yes: 6 = 1X6
Yes: 6 = 2X3
7
No
No
8
No
No
9
No
Yes
10
No
No
11
No
No
12
Yes: 12 = 2X6
Yes: 12 = 4X3
13
No
No
14
No
No
15
No
Yes
CS130 Young
•
4
Direct Proof:
eg: “for all x [x is divisible by 6 → x is divisible by 3]”
“Every integer less than 10 is bigger than 5”
X is divisible by 6
To prove the statement is not true,
→ x = k*6, for some integer k
find a counterexample,
(hypothesis)
→ x = k*2*3
integer = 4 < 10, but not > 5.
eg:
2
(Note: If the above problem is about all integers, then we cannot
use exhaustive proof)
Proof by Counterexample:
eg:
P(n) true,∀n
→ x = (k*2)*3
disprove that “the sum of any three consecutive
integers is even.”
(k*2) is some integer
x is divisible by 3
counterexample : 2+3+4=9
CS130 Young
5
CS130 Young
6
1
eg:
“the product of two even integers is even”
•
Contraposition:
Let x = 2m, y = 2n for some integer m, n
(hypothesis)
eg:
“If the square of an integer is odd, then the integer
must be odd.”
→ xy = (2m)(2n) = 2(2mn), which is even.
eg:
“n2 odd → n odd”
“the sum of two odd integers is even”
n even → n2 even (P → Q ⇔ Q′ → P′)
Prove:
Let x = 2m+1, y = 2n+1 for some integer m,n
(hypothesis)
Let n = 2m for some integer m (hypothesis)
→ n2 = n * n = 2m*2m = 2(2m2)
→ x + y = 2m + 2n+ 2 = 2(m+n+1),
→ n2 is even.
where m+n+1 is an integer
∴x+y is even.
CS130 Young
•
eg:
7
“xy is odd iff both x and y are odd.”
CS130 Young
•
(⇐) by direct proof:
Proof by Contradiction:
Let x = 2m+1, y=2n+1 for some m, n ∈ integers
Since (P ∧ Q′→ F) → (P → Q) is a tautology,
→ xy = (2m+1)(2n+1) = 4mn + 2m + 2n +1
It is sufficient to prove P ∧ Q′→ F, then P → Q is true.
= 2(2mn+m+n) +1
eg:
→ since 2mn + m + n is an integer, xy is odd.
(⇒) by contraposition:
“If a number added to itself gives itself, then the
number is 0.”
to prove that : x even or y even, then xy even
i.e.
case1
Assume x + x = x and x ≠ 0
x even, y odd:
Let x = 2m, y = 2n+1
xy = 2(2mn + m), which is even
“x + x = x, then x = 0”:
case2
x odd, y even:
similar to case1.
→ 2x = x and x ≠ 0
case3
x even, y even:
Let x = 2m, y = 2n
→ 2 = 1, which is a contradiction
xy = 2(2mn), which is even
CS130 Young
•eg:
8
9
CS130 Young
∴the assumption must be wrong
10
“if x2 + 2x – 3 = 0, then x ≠ 2”
Let x2 + 2x – 3 = 0 and assume x = 2,
→ 4 + 4 – 3 = 0 or 5 = 0, which is a
contradiction.
( by direct proof:
if x2 + 2x – 3 = 0
→ (x + 3)(x –1)= 0
→ x = -3 or x = 1
→x≠2
(by contraposition:
CS130 Young
)
if x = 2
→ x2 + 2x – 3 = 5 ≠ 0
)
11
2