Professional Documents
Culture Documents
CS100: DISCRETE
STRUCTURES
Computer Sciences
Department
Lecture 6: Proof techniques
Lecture Contents
2
Some terminology.
Proof Methods.
Direct proof.
Examples of Proof Methods.
Disproving by Counterexample.
Proof by Contradiction.
Proofs of Equivalence.
Assume p is true,
Assume p is true,
and prove q. and find a contradiction
(p ^ p are both true)
Proving
pq
EXAMPLE 2
Show that the statement “Every positive integer is the sum of the squares of
two integers” is false.
Solution:
3 cannot be written as the sum of the squares of two integers.
p2: n -1 is odd
EXAMPLE
p3: n2 is even
P1 P2
P2 P3
P3 P1
1. P1 P2
• p1: n is even
• p2: n -1 is odd
SOLUTION Assume p1 is true (n is even => n=2k) ,
prove p2 is true ( n-1 is odd => n-1=2k+1) .
(2k) – 1
2k -2+1 => -2+1=-1
2(k-1)+1
2m+1
.∙. n-1 is odd
.∙. P2 is true
.∙. P1 P2 is true
4-Apr-22 Computer Sciences Department
Proofs of Equivalence (cont.):
23
P1 P2
P2 P3
P3 P1
2. P2 P3
• p2: n -1 is odd
• p3: n2 is even
SOLUTION Assume p2 is true ( n-1 is odd => n-1=2k+1) ,
prove p3 is true (n2 is even => n2 =2k) .
𝒏 − 𝟏 = 𝟐𝒌 + 𝟏
𝒏 = 𝟐𝒌 + 𝟐
𝒏𝟐 = (𝟐𝒌 + 𝟐)𝟐
𝒏𝟐 = 𝟒𝒌𝟐 + 𝟖𝒌 + 𝟒
𝒏𝟐 = 𝟐(𝟐𝒌𝟐 + 𝟒𝒌 + 𝟐)
𝒏𝟐 = 𝟐𝒎
.∙. 𝑛2 is even
P1 P2
P2 P3
P3 P1
3. P3 P1
• p3: n2 is even
• p1: n is even
SOLUTION Assume p3 is true (n2 is even => n2 =2k) ,
prove p1 is true (n is even => n =2k) .
𝑛2 = 2𝑘
𝑛 = 2𝑘
(dead end) => we will use the indirect proof
¬P1 ¬ P3
P1 P2
P2 P3
P3 P1
3. P3 P1
Indirect Proof
Let p3 be “n2 is even” and p1 be “n is even”
SOLUTION To construct a proof by contradiction assume both p3 and ( p1) are true.
The is “n2 is even” and “n is odd”
Then n = 2k+1 for some integer k.
Then n2 = (2𝑘 + 1)2 = 4𝑘 2 + 4𝑘 + 1= 2(2𝑘 2 +2𝑘) + 1.
Thus, n2 is odd, because it equals 2j +1 for integer j = 2𝑘 2 +2𝑘.
So n2 is not even p3.
Because p3 and p3 are true we have a contradiction.