Ds 3 Proof
Ds 3 Proof
Nguyen An Khuong,
Tran Tuan Anh, Mai
Chapter 3
Xuan Toan, Tran Hong
Tai
Proving methods
Discrete Structures for Computing on June 16, 2024
Contents
Proving Methods
Exercise
Nguyen An Khuong, Tran Tuan Anh, Mai Xuan Toan, Tran Hong
Tai
Faculty of Computer Science and Engineering
University of Technology - VNUHCM
[email protected]
3.1
Contents Proving methods
Nguyen An Khuong,
Tran Tuan Anh, Mai
Xuan Toan, Tran Hong
Tai
2 Exercise
3.2
Course outcomes Proving methods
Nguyen An Khuong,
Tran Tuan Anh, Mai
Xuan Toan, Tran Hong
Tai
3.3
Introduction Proving methods
Nguyen An Khuong,
Tran Tuan Anh, Mai
Xuan Toan, Tran Hong
Tai
Definition Contents
3.4
Terminology Proving methods
Nguyen An Khuong,
Tran Tuan Anh, Mai
Xuan Toan, Tran Hong
Tai
Contents
Proving Methods
Exercise
3.5
Proving methods
Nguyen An Khuong,
Tran Tuan Anh, Mai
Xuan Toan, Tran Hong
Tai
Contents
Proving Methods
3.6
Proving a Theorem Proving methods
Nguyen An Khuong,
Tran Tuan Anh, Mai
Xuan Toan, Tran Hong
Tai
• Exercise
Show that P (c) → Q(c) is true with arbitrary c of the domain
3.7
Methods of Proof Proving methods
Nguyen An Khuong,
Tran Tuan Anh, Mai
Xuan Toan, Tran Hong
Tai
3.8
Direct Proofs Proving methods
Nguyen An Khuong,
Tran Tuan Anh, Mai
Xuan Toan, Tran Hong
Tai
Definition
A direct proof shows that p→q is true by showing that if p is
true, then q must also be true. Contents
Proving Methods
Exercise
Example
Ex.: If n is an odd integer, then n2 is odd.
3.9
Proof by Contraposition Proving methods
Nguyen An Khuong,
Tran Tuan Anh, Mai
Xuan Toan, Tran Hong
Tai
Definition
p → q can be proved by showing (directly) that its contrapositive,
¬q → ¬p, is true. Contents
Proving Methods
Example Exercise
n = 2k , k ∈ Z. Substituting
Pr.: Assume that n is even, so
3n + 2 = 3(2k) + 2 = 6k + 2 = 2(3k + 1) is even. Because
the negation of the conclusion of the conditional statement
implies that the hypothesis is false, Q.E.D.
3.10
Proofs by Contradiction Proving methods
Nguyen An Khuong,
Tran Tuan Anh, Mai
Xuan Toan, Tran Hong
Tai
Definition
p is true if if can show that ¬p → (r ∧ ¬r) is true for some
proposition r.
Contents
Example Proving Methods
√ Exercise
Ex.: Prove that 2 is irrational.
√
Pr.: Let p is the proposition
√ 2 ¬p is true,
is irrational. Suppose
√
which means 2 ∃a, b ∈ Z, 2 = a/b, a, b
is rational. If so,
2 2 2 2
have no common factors. Squared, 2 = a /b , 2b = a , so
2
a is even, and a is even, too. Because of that a = 2c, c ∈ Z.
2 2 2 2 2
Thus, 2b = 4c , or b = 2c , which means b is even and so
is b. That means 2 divides both a and b, contradict with the
assumption.
3.11
Problem Proving methods
Nguyen An Khuong,
Tran Tuan Anh, Mai
Xuan Toan, Tran Hong
Tai
Contents
Proving Methods
Exercise
3.12
Mathematical Induction Proving methods
Nguyen An Khuong,
Tran Tuan Anh, Mai
Xuan Toan, Tran Hong
Tai
Definition (Induction)
To prove that P (n) is true for all positive integers n, where P (n)
is a propositional function, we complete two steps: Contents
3.13
Example on Induction Proving methods
Nguyen An Khuong,
n(n + 1)
1 + 2 + ... + n = .
2
Contents
Solution Proving Methods
Let P (n) be the proposition that sum of first n is n(n + 1)/2 Exercise
1(1+1)
• Basis Step: P (1) is true, because 1= 2
• Inductive Step:
k(k+1)
Assume that 1 + 2 + ... + k = 2 .
Then:
k(k + 1)
1 + 2 + . . . + k + (k + 1) = + (k + 1)
2
k(k + 1) + 2(k + 1)
=
2
(k + 1)(k + 2)
=
2 3.14
Example on Induction Proving methods
Nguyen An Khuong,
Tran Tuan Anh, Mai
Xuan Toan, Tran Hong
Tai
Example
Prove that n < 2n for all positive integers n.
Solution
n Contents
Let P (n) be the proposition that n < 2 .
Proving Methods
• Basis Step: P (1) is true, because 1 < 21 = 2 Exercise
• Inductive Step:
Assume that P (k) is true for the positive k , that is, k < 2k .
k k
Add 1 to both side of k < 2 , note that 1 ≤ 2 .
k + 1 < 2k + 1 ≤ 2k + 2k = 2 · 2k = 2k+1 .
3.15
Exercise Proving methods
Nguyen An Khuong,
Tran Tuan Anh, Mai
Xuan Toan, Tran Hong
Tai
3 Contradiction.
3.16
Exercise Proving methods
Nguyen An Khuong,
Tran Tuan Anh, Mai
Xuan Toan, Tran Hong
Tai
Directed proof
Assume: 7n + 9 is the even number. Then, 7n + 9 = 2k, (k ∈ Z)
So: n = 2k − 6n − 9 = 2k − 6n − 10 + 1 = 2(k − 3n − 5) + 1
That means n is an odd number.
Contradiction proof
Suppose 7n + 9 is an even number and n is not an odd number or n is an even number.
Because n is an even number, then n = 2k, (k ∈ Z)
We infer: 7n + 9 = 7(2k) + 9 = 14k + 9 = 2(7k + 4) + 1
Its means: 7n + 9 is the odd number. We can show that, if n is an even number, then
7n + 9 is an odd number. This contradicts with the hypothesis 7n + 9 is an even number.
3.17
Exercise Proving methods
Nguyen An Khuong,
Tran Tuan Anh, Mai
Xuan Toan, Tran Hong
Tai
A) Directed proof.
C) inductive proof
3.18
Exercise Proving methods
Nguyen An Khuong,
Tran Tuan Anh, Mai
Xuan Toan, Tran Hong
Tai
A) Directed proof.
C) inductive proof
3.18
Proving methods
Nguyen An Khuong,
Tran Tuan Anh, Mai
What is wrong in the following induction to prove that all flowers Xuan Toan, Tran Hong
Tai
(1) Let P (n) be all flowers in a set of n flowers have the same
color.
(3) Assume that P (n) is correct. Which means that all flowers in Contents
the set of n flowers have the same color . Proving Methods
Exercise
(4) Consider a set of n+1 flowers; numbering as
1, 2, 3, . . . , n, (n + 1).
(5) Based on the assumption, Sequence of first n flowers has the
same color, and sequence of n later flowers also has the same
color.
(6) Because the 2 set has same n−1 flowers, all n+1 flowers
should have a same color.
3.19
Proving methods
Nguyen An Khuong,
Tran Tuan Anh, Mai
Xuan Toan, Tran Hong
Tai
(i) (n, 0) ∈ D.
(ii) If (n, m) ∈ D, (n, n + m) ∈ D. Contents
Proving Methods
Do
Exercise
1) Calculate some elements from D.
2) prove by induction on k that 'if m = k.n, '(n, m) ∈ D'.
3) prove that if (n, m) ∈ D, we will get m = kn k ∈ N .
3.20
Proving methods
Nguyen An Khuong,
Tran Tuan Anh, Mai
Xuan Toan, Tran Hong
Tai
∀n ∈ N +
a) Prove that
(n + 1) − (n + 2)2 − (n + 3)2 + (n + 4)2 = 4.
2
Contents
b) The infer that for every natural number m, there exists
Proving Methods
natural number n that can represent m as a sum of squares
2 2 2 + + Exercise
1 , 2 , . . ., n , which mean: ∀m ∈ N , ∃n ∈ N ,
∃ε1 , . . . , εn ∈ {−1, 1}, m = ε1 12 + ε2 22 + . . . + εn n2 .
(Hint: Try to display the values of m ∈ {1, 2, 3, 4, 5, 6})
3.21
Proving methods
Nguyen An Khuong,
Tran Tuan Anh, Mai
+
a) Prove that ∀n ∈ N Xuan Toan, Tran Hong
Tai
• m = 1: 1 = 12
• m = 2: 2 = −12 − 22 − 32 + 42
• m = 3: 3 = −12 + 22
• m = 4: 4 = 12 − 22 − 32 + 42
3.21
Proving methods
Nguyen An Khuong,
Tran Tuan Anh, Mai
+
a) Prove that ∀n ∈ N Xuan Toan, Tran Hong
Tai
• m = 1: 1 = 12
• m = 2: 2 = −12 − 22 − 32 + 42
• m = 3: 3 = −12 + 22
• m = 4: 4 = 12 − 22 − 32 + 42
• m = 5: 5 = 12 + (22 − 32 − 42 + 52 )
3.21
Proving methods
Nguyen An Khuong,
Tran Tuan Anh, Mai
+
a) Prove that ∀n ∈ N Xuan Toan, Tran Hong
Tai
• m = 1: 1 = 12
• m = 2: 2 = −12 − 22 − 32 + 42
• m = 3: 3 = −12 + 22
• m = 4: 4 = 12 − 22 − 32 + 42
• m = 5: 5 = 12 + (22 − 32 − 42 + 52 )
• m = 6: 6 = −12 − 22 − 32 + 42 + (52 − 62 − 72 + 82 )
3.21
Proving methods
Nguyen An Khuong,
Tran Tuan Anh, Mai
Xuan Toan, Tran Hong
Tai
3.22
Solution Proving methods
Nguyen An Khuong,
Tran Tuan Anh, Mai
Xuan Toan, Tran Hong
Tai
3.23
Solution Proving methods
Nguyen An Khuong,
Tran Tuan Anh, Mai
Xuan Toan, Tran Hong
Tai
1 1 1 2n
(2) 1+ 1+2 + 1+2+3 + . . . + 1+2+3+...+n = n+1 , n ≥ 1 (2)
2
- With n = 1 we have P(1): 1 =
1+1 → (2) correct.
- Assume (2) is correct with n = k , Then we have P(k):
1+ 1
+ 1
+ . . . + 1 2k Contents
1+2 1+2+3 1+2+3+...+k = k+1
Proving Methods
- We will prove (2) is correct with n = k + 1, meaning
Exercise
P(k+1):
1 1 1 1
1+ 1+2 + 1+2+3 + . . . + 1+2+3+...+k + 1+2+...+k+(k+1) =
2k 1 2k 2 2k(k+2)+2
k+1 + 1+2+...+k+(k+1) = k+1 + (k+1)(k+2) = (k+1)(k+2) =
2 2
2(k +2k+1) 2(k+1) 2(k+1)
(k+1)(k+2) = (k+1)(k+2) = k+2 [ Noted that:
1 + 2 + . . . + k + (k + 1) = (k+1)(k+2)
2 ]
The expression is correct with n = k + 1.Thus, QED.
3.24
Solution Proving methods
Nguyen An Khuong,
Tran Tuan Anh, Mai
Xuan Toan, Tran Hong
Tai
Pn i−1 n
(3) i=1 2 = 2 − 1 (3)
P1 i−1
- With i = 1 we have S(1): i=1 2 = 21−1 = 21 − 1 →
(3) correct.
- Assume (3) is correct with n = k, Then we have S(k):
Contents
Pk i−1
i=1 2 = 2k − 1
Proving Methods
- We will prove (3) is correct with n = k + 1, meaning
Exercise
S(k+1):
Pk+1 i−1
Pk
i=1 2 = i=1 2i−1 + 2k = 2k − 1 + 2k = 2k+1 − 1
The expression is correct with n = k + 1.
(4) Prove that log5 (2) is an irrational number.
Assume the opposite log5 (2) is a rational number. Therefore,
log5 (2) = ab , where a, b ∈ Z, b ̸= 0, GCD(a,b) = 1
a √
Then, 5 b =
b
5a = 2 ⇔ 5a = 2b . Because 5a is always odd
b
and 2 is always even. So, this is a contradiction. Thus, QED.
3.25
Exercise Proving methods
Nguyen An Khuong,
Tran Tuan Anh, Mai
Xuan Toan, Tran Hong
Tai
n Proving Methods
2 For every integer n ≥ 1, 6 − 1 is divisible by 5. Exercise
3 For every integer n ≥ 1, 52n−1 + 1 is divisible by 6.
4 For every integer n ≥ 1, 8n − 1 is divisible by 7.
n
5 For every integer n ≥ 1, 4 + 15n − 1 is divisible by 9.
3.26
Solution Proving methods
Nguyen An Khuong,
Tran Tuan Anh, Mai
Xuan Toan, Tran Hong
Tai
3.27
Solution Proving methods
Nguyen An Khuong,
Tran Tuan Anh, Mai
Xuan Toan, Tran Hong
Tai
3.28
Solution Proving methods
Nguyen An Khuong,
Tran Tuan Anh, Mai
Xuan Toan, Tran Hong
Tai
3.29
Solution Proving methods
Nguyen An Khuong,
Tran Tuan Anh, Mai
Xuan Toan, Tran Hong
Tai
3.30
Solution Proving methods
Nguyen An Khuong,
Tran Tuan Anh, Mai
Xuan Toan, Tran Hong
Tai
3.31
Solution Proving methods
Nguyen An Khuong,
Tran Tuan Anh, Mai
Xuan Toan, Tran Hong
Tai
3.32
Proving methods
Nguyen An Khuong,
Tran Tuan Anh, Mai
Xuan Toan, Tran Hong
Tai
3.33
Solution Proving methods
Nguyen An Khuong,
Tran Tuan Anh, Mai
Xuan Toan, Tran Hong
Tai
n 2
(1) Prove that for every integer n ≥ 1, 3 > n .
with n = 1, 31 = 3 v 12 = 1. Therefore, the
we have
statement is correct for n = 1.
2 2
With n = 2, we have 3 = 9 and 2 = 4. Therefore, the
statement is also correct with n = 2. Contents
n 2
Assume there is an integer n ≥ 2 that 3 > n . Proving Methods
We need to prove 3
n+1 2
is greater than (n + 1) . Exercise
3.34
Solution Proving methods
Nguyen An Khuong,
Tran Tuan Anh, Mai
Xuan Toan, Tran Hong
Tai
3.35
Exercise Proving methods
Nguyen An Khuong,
Tran Tuan Anh, Mai
Xuan Toan, Tran Hong
Tai
B) 1, 3, 10
C) 3, 10, 111
D) 3, 13, 173
3.36
Exercise Proving methods
Nguyen An Khuong,
Tran Tuan Anh, Mai
Xuan Toan, Tran Hong
Tai
B) 1, 3, 10
C) 3, 10, 111
D) 3, 13, 173
3.36
Exercise Proving methods
Nguyen An Khuong,
Tran Tuan Anh, Mai
Xuan Toan, Tran Hong
Tai
3.37
Exercise Proving methods
Nguyen An Khuong,
Tran Tuan Anh, Mai
Xuan Toan, Tran Hong
Tai
3.37
Exercise Proving methods
Nguyen An Khuong,
Tran Tuan Anh, Mai
Xuan Toan, Tran Hong
Tai
Find the first six numbers of the sequence defined by the following
recursive formula.
Contents
a0 = −1, an = −2an−1 Proving Methods
Exercise
B) 1, 2, 4, 8, 16, 32
3.38
Exercise Proving methods
Nguyen An Khuong,
Tran Tuan Anh, Mai
Xuan Toan, Tran Hong
Tai
Find the first six numbers of the sequence defined by the following
recursive formula.
Contents
a0 = −1, an = −2an−1 Proving Methods
Exercise
B) 1, 2, 4, 8, 16, 32
3.38
Exercise Proving methods
Nguyen An Khuong,
Tran Tuan Anh, Mai
Xuan Toan, Tran Hong
Tai
A) Not exist
B) 8,8,8,8
C) 6,6,6,6
3.39
Exercise Proving methods
Nguyen An Khuong,
Tran Tuan Anh, Mai
Xuan Toan, Tran Hong
Tai
A) Not exist
B) 8,8,8,8
C) 6,6,6,6
3.39
Exercise Proving methods
Nguyen An Khuong,
Tran Tuan Anh, Mai
Xuan Toan, Tran Hong
Tai
Contents
A) A number is rational if and only if its square is a rational Proving Methods
number. Exercise
2
B) integer n is odd if and only if n + 2n is odd.
3.40
Exercise Proving methods
Nguyen An Khuong,
Tran Tuan Anh, Mai
Xuan Toan, Tran Hong
Tai
Contents
A) A number is rational if and only if its square is a rational Proving Methods
number. Exercise
2
B) integer n is odd if and only if n + 2n is odd. correct answer!
3.40
Exercise Proving methods
Nguyen An Khuong,
Tran Tuan Anh, Mai
Xuan Toan, Tran Hong
Tai
When the sun rises, two models X and Y start walk along the
seashore. X walk from A to B, and the other from B to A. At
12PM, the two meet the other, and continue walking with the
Contents
same velocities. The first person arrives at B at 4M, and the other Proving Methods
arrives at A at 9PM. Exercise
When did the sun rise?
A) 5:30 AM
B) 6:00 AM
C) 6:30 AM
D) 7:00 AM
3.41
Exercise Proving methods
Nguyen An Khuong,
Tran Tuan Anh, Mai
Xuan Toan, Tran Hong
Tai
When the sun rises, two models X and Y start walk along the
seashore. X walk from A to B, and the other from B to A. At
12PM, the two meet the other, and continue walking with the
Contents
same velocities. The first person arrives at B at 4M, and the other Proving Methods
arrives at A at 9PM. Exercise
When did the sun rise?
A) 5:30 AM
C) 6:30 AM
D) 7:00 AM
3.41
Exercise Proving methods
Nguyen An Khuong,
Tran Tuan Anh, Mai
Xuan Toan, Tran Hong
Tai
A) 1
B) 2
C) 218922995834555169026
3.42
Exercise Proving methods
Nguyen An Khuong,
Tran Tuan Anh, Mai
Xuan Toan, Tran Hong
Tai
A) 1 correct answer!
B) 2
C) 218922995834555169026
3.42
Exercise Proving methods
Nguyen An Khuong,
Tran Tuan Anh, Mai
Xuan Toan, Tran Hong
Tai
In the Far Far Away kingdom, money is rarely used. People are
often trading with their goods or with coins of value 5g or 7g. Is
every good that has the price of 29g and above tradable using the
Contents
above coins?
Proving Methods
Choose the most correct answer for the above question.
Exercise
A) No
E) Yes
3.43
Exercise Proving methods
Nguyen An Khuong,
Tran Tuan Anh, Mai
Xuan Toan, Tran Hong
Tai
In the Far Far Away kingdom, money is rarely used. People are
often trading with their goods or with coins of value 5g or 7g. Is
every good that has the price of 29g and above tradable using the
Contents
above coins?
Proving Methods
Choose the most correct answer for the above question.
Exercise
A) No
3.43