Professional Documents
Culture Documents
Ds 3 Proof
Ds 3 Proof
Proving methods
Discrete Structures for Computing on September 6, 2021
Contents
Proving Methods
Exercise
Proving Methods
Exercise
2 Exercise
3.2
Proving methods
Course outcomes
Huynh Tuong Nguyen,
Tran Tuan Anh, Nguyen
An Khuong, Le Hong
Trang
Course learning outcomes
Contents
L.O.2 Represent and model practical problems with discrete structures
L.O.2.1 – Logically describe some problems arising in Computing Proving Methods
3.3
Proving methods
Introduction
Huynh Tuong Nguyen,
Tran Tuan Anh, Nguyen
An Khuong, Le Hong
Trang
Definition Contents
3.4
Proving methods
Terminology
Huynh Tuong Nguyen,
Tran Tuan Anh, Nguyen
An Khuong, Le Hong
Trang
Contents
Proving Methods
Exercise
3.5
Proving methods
Contents
Proving Methods
3.6
Proving methods
Proving a Theorem
Huynh Tuong Nguyen,
Tran Tuan Anh, Nguyen
An Khuong, Le Hong
Trang
• Show that P (c) → Q(c) is true with arbitrary c of the domain Exercise
3.7
Proving methods
Methods of Proof
Huynh Tuong Nguyen,
Tran Tuan Anh, Nguyen
An Khuong, Le Hong
Trang
Exercise
• Proof by contradiction (chứng minh phản chứng )
• Mathematical induction (quy nạp toán học)
3.8
Proving methods
Direct Proofs
Huynh Tuong Nguyen,
Tran Tuan Anh, Nguyen
An Khuong, Le Hong
Trang
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
3.9
Proving methods
Proof by Contraposition
Huynh Tuong Nguyen,
Tran Tuan Anh, Nguyen
An Khuong, Le Hong
Trang
Definition
p → q can be proved by showing (directly) that its contrapositive,
¬q → ¬p, is true.
Contents
Proving Methods
Example Exercise
3.10
Proving methods
Proofs by Contradiction
Huynh Tuong Nguyen,
Tran Tuan Anh, Nguyen
An Khuong, Le Hong
Trang
Definition
p is true if if can show that ¬p → (r ∧ ¬r) is true for some
proposition r.
Contents
Example
Proving Methods
√
Ex.: Prove that 2 is irrational. Exercise
√
Pr.: Let p is the proposition
√ “ 2 is irrational”. Suppose
√ ¬p is true,
which means 2 is rational. If so, ∃a, b ∈ Z, 2 = a/b, a, b
have no common factors. Squared, 2 = a2 /b2 , 2b2 = a2 , so
a2 is even, and a is even, too. Because of that a = 2c, c ∈ Z.
Thus, 2b2 = 4c2 , or b2 = 2c2 , which means b2 is even and so
is b. That means 2 divides both a and b, contradict with the
assumption.
3.11
Proving methods
Problem
Huynh Tuong Nguyen,
Tran Tuan Anh, Nguyen
An Khuong, Le Hong
Trang
Contents
Proving Methods
Exercise
3.12
Proving methods
Mathematical Induction
Huynh Tuong Nguyen,
Tran Tuan Anh, Nguyen
An Khuong, Le Hong
Trang
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
Exercise
• Inductive Step: Show that the conditional statement
P (k) → P (k + 1) is true for all positive integers k
Logic form:
[P (1) ∧ ∀kP (k) → P (k + 1))] → ∀nP (n)
3.13
Proving methods
Example on Induction
Huynh Tuong Nguyen,
Example Tran Tuan Anh, Nguyen
An Khuong, Le Hong
Trang
Show that if n is a positive integer, then
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
Example
Prove that n < 2n for all positive integers n.
Solution
Contents
Let P (n) be the proposition that n < 2n . 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 .
Add 1 to both side of k < 2k , note that 1 ≤ 2k .
k + 1 < 2k + 1 ≤ 2k + 2k = 2 · 2k = 2k+1 .
3.15
Proving methods
Exercise
Huynh Tuong Nguyen,
Tran Tuan Anh, Nguyen
An Khuong, Le Hong
Trang
3.16
Proving methods
Exercise
Huynh Tuong Nguyen,
Tran Tuan Anh, Nguyen
An Khuong, Le Hong
Trang
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
Proving methods
Exercise
Huynh Tuong Nguyen,
Tran Tuan Anh, Nguyen
An Khuong, Le Hong
Trang
Assume m and n are odd numbers. Then we can express: m = 2k + 1 Proving Methods
A) Directed proof.
B) Contradiction proof or contra-positive proof
C) inductive proof
D) All the above answers are incorrect.
3.18
Proving methods
Exercise
Huynh Tuong Nguyen,
Tran Tuan Anh, Nguyen
An Khuong, Le Hong
Trang
Assume m and n are odd numbers. Then we can express: m = 2k + 1 Proving Methods
A) Directed proof.
B) Contradiction proof or contra-positive proof correct answer!
C) inductive proof
D) All the above answers are incorrect.
3.18
Proving methods
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.
(7) Meaning P (n + 1) and the statement is proved by induction.
3.19
Proving methods
Do Proving Methods
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
a) Prove that ∀n ∈ N +
(n + 1)2 − (n + 2)2 − (n + 3)2 + (n + 4)2 = 4.
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
Exercise
12 , 22 , . . ., n2 , 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
• m = 0: 0 = 1 + 2 − 3 + 4 − 5 − 6 + 7
2 2 2 2 2 2 2 Exercise
• 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
• m = 0: 0 = 1 + 2 − 3 + 4 − 5 − 6 + 7
2 2 2 2 2 2 2 Exercise
• 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
• m = 0: 0 = 1 + 2 − 3 + 4 − 5 − 6 + 7
2 2 2 2 2 2 2 Exercise
• 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
3.22
Proving methods
Solution
Huynh Tuong Nguyen,
Tran Tuan Anh, Nguyen
An Khuong, Le Hong
Trang
In fact, n = k + 1, meaning
1.2 + 2.5 + 3.8 + . . . + k.(3k − 1) + (k + 1)(3k + 2) =
[1.2 + 2.5 + 3.8 + . . . + k.(3k − 1)] + (k + 1)(3k + 2) =
k 2 (k + 1) + (k + 1)(3k + 2) = (k + 1)(k 2 + 3k + 2) =
(k + 1)(k + 1)(k + 2) = (k + 1)2 (k + 2).
The expression is correct with n = k + 1.Thus, QED.
3.23
Proving methods
Solution
Huynh Tuong Nguyen,
Tran Tuan Anh, Nguyen
An Khuong, Le Hong
Trang
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 2k
1 + 1+2 + 1+2+3 + . . . + 1+2+3+...+k = k+1 Contents
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
Proving methods
Solution
Huynh Tuong Nguyen,
Tran Tuan Anh, Nguyen
An Khuong, Le Hong
Trang
Pn
(3) i=1 2i−1 = 2n − 1 (3)
P1
- With i = 1 we have S(1): i=1 2i−1 = 21−1 = 21 − 1 →
(3) correct.
- Assume (3) is correct with n = k, Then we have S(k):
Pk i−1
i=1 2 = 2k − 1 Contents
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 6= 0, GCD(a,b) = 1
a √
Then, 5 b = b 5a = 2 ⇔ 5a = 2b . Because 5a is always odd
and 2b is always even. So, this is a contradiction. Thus, QED.
3.25
Proving methods
Exercise
Huynh Tuong Nguyen,
Tran Tuan Anh, Nguyen
An Khuong, Le Hong
Trang
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.
5 For every integer n ≥ 1, 4n + 15n − 1 is divisible by 9.
3.26
Proving methods
Solution
Huynh Tuong Nguyen,
Tran Tuan Anh, Nguyen
An Khuong, Le Hong
Trang
3.27
Proving methods
Solution
Huynh Tuong Nguyen,
Tran Tuan Anh, Nguyen
An Khuong, Le Hong
Trang
6n − 1 = 5m.
We need to prove 6n+1 − 1 is divisible by 5.
On the other hand, we have:
6n+1 −1 = 6.6n −6+5 = 6(6n −1)+5 = 30m+5 = 5(6m+1).
Therefore, 6n+1 − 1 is a multiple of 5. The above statement
is proved by induction.
3.28
Proving methods
Solution
Huynh Tuong Nguyen,
Tran Tuan Anh, Nguyen
An Khuong, Le Hong
Trang
3.29
Proving methods
Solution
Huynh Tuong Nguyen,
Tran Tuan Anh, Nguyen
An Khuong, Le Hong
Trang
Proving Methods
7.
In other word, there exists an integer m so that 8n − 1 = 7m. Exercise
3.30
Proving methods
Solution
Huynh Tuong Nguyen,
Tran Tuan Anh, Nguyen
An Khuong, Le Hong
Trang
Proving Methods
Assume there is an integer n ≥ 1 so that 4n + 15n − 1 is Exercise
divisible by 9
In other word, There is an integer m so that
4n + 15n − 1 = 9m
We need to prove that 4n+1 + 15(n + 1) − 1 is also divisible
by 9.
3.31
Proving methods
Solution
Huynh Tuong Nguyen,
Tran Tuan Anh, Nguyen
An Khuong, Le Hong
Trang
. Proving Methods
.
Let B(k) = 4k + 5. With k = 1, 41 + 5 = 9..3 → correct with k = 1
.
Assume it is also true with k = i → B(i) = (41 + 5)..3. We prove
that it is also correct with k = i + 1 → B(i+1) =
4i+1 + 5 = 4i .4 + 5 = 3.4i + 4i + 5 = (4i + 5) + 3.4i . We have:
.
(4i + 5)..3 based on the assumption
. .
And: 3.4i ..3. Therefore, (4n + 5)..3. thus, QED.
3.32
Proving methods
3.33
Proving methods
Solution
Huynh Tuong Nguyen,
Tran Tuan Anh, Nguyen
An Khuong, Le Hong
Trang
3.34
Proving methods
Solution
Huynh Tuong Nguyen,
Tran Tuan Anh, Nguyen
An Khuong, Le Hong
Trang
3.35
Proving methods
Exercise
Huynh Tuong Nguyen,
Tran Tuan Anh, Nguyen
An Khuong, Le Hong
Trang
Find the following values f (1), f (2) and f (3) knowing that f (n)
is defined in the a recursive way with f (0) = 1 and Contents
f (n + 1) = f (n)2 + f (n) + 1, n = 0, 1, 2, . . . Proving Methods
Exercise
A) 1, 3, 13
B) 1, 3, 10
C) 3, 10, 111
D) 3, 13, 173
E) None of the above
3.36
Proving methods
Exercise
Huynh Tuong Nguyen,
Tran Tuan Anh, Nguyen
An Khuong, Le Hong
Trang
Find the following values f (1), f (2) and f (3) knowing that f (n)
is defined in the a recursive way with f (0) = 1 and Contents
f (n + 1) = f (n)2 + f (n) + 1, n = 0, 1, 2, . . . Proving Methods
Exercise
A) 1, 3, 13
B) 1, 3, 10
C) 3, 10, 111
D) 3, 13, 173
E) None of the above correct answer!
3.36
Proving methods
Exercise
Huynh Tuong Nguyen,
Tran Tuan Anh, Nguyen
An Khuong, Le Hong
Trang
Knowing that t(1) = 1, t(2) = 3. The Explicit formula for the Contents
Proving Methods
sequence is:
Exercise
3 1
A) t(n) = · 2n + · (−3)n
5 15
3 7
B) t(n) = · 2n + · (−3)n
5 15
7
C) t(n) = 3 · (−2)n + · 3n
3
5
D) t(n) = −3 · 2 + · (−3)n
n
3
E) None of the above
3.37
Proving methods
Exercise
Huynh Tuong Nguyen,
Tran Tuan Anh, Nguyen
An Khuong, Le Hong
Trang
Knowing that t(1) = 1, t(2) = 3. The Explicit formula for the Contents
Proving Methods
sequence is:
Exercise
3 1
A) t(n) = · 2n + · (−3)n correct answer!
5 15
3 7
B) t(n) = · 2n + · (−3)n
5 15
7
C) t(n) = 3 · (−2)n + · 3n
3
5
D) t(n) = −3 · 2 + · (−3)n
n
3
E) None of the above
3.37
Proving methods
Exercise
Huynh Tuong Nguyen,
Tran Tuan Anh, Nguyen
An Khuong, Le Hong
Trang
Find the first six numbers of the sequence defined by the following
recursive formula.
Contents
Exercise
3.38
Proving methods
Exercise
Huynh Tuong Nguyen,
Tran Tuan Anh, Nguyen
An Khuong, Le Hong
Trang
Find the first six numbers of the sequence defined by the following
recursive formula.
Contents
Exercise
3.38
Proving methods
Exercise
Huynh Tuong Nguyen,
Tran Tuan Anh, Nguyen
An Khuong, Le Hong
Trang
1, 0, 2, 2, 0, 0, 4, 4, 4, 0, 0, 0, . . . Proving Methods
Exercise
A) Not exist
B) 8,8,8,8
C) 6,6,6,6
D) Either 8,8,8,8 or 0,8,8,8
E) None of the above.
3.39
Proving methods
Exercise
Huynh Tuong Nguyen,
Tran Tuan Anh, Nguyen
An Khuong, Le Hong
Trang
1, 0, 2, 2, 0, 0, 4, 4, 4, 0, 0, 0, . . . Proving Methods
Exercise
A) Not exist
B) 8,8,8,8
C) 6,6,6,6
D) Either 8,8,8,8 or 0,8,8,8 correct answer!
E) None of the above.
3.39
Proving methods
Exercise
Huynh Tuong Nguyen,
Tran Tuan Anh, Nguyen
An Khuong, Le Hong
Trang
3.40
Proving methods
Exercise
Huynh Tuong Nguyen,
Tran Tuan Anh, Nguyen
An Khuong, Le Hong
Trang
3.40
Proving methods
Exercise
Huynh Tuong Nguyen,
Tran Tuan Anh, Nguyen
An Khuong, Le Hong
Trang
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
E) None of the above
3.41
Proving methods
Exercise
Huynh Tuong Nguyen,
Tran Tuan Anh, Nguyen
An Khuong, Le Hong
Trang
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 correct answer!
C) 6:30 AM
D) 7:00 AM
E) None of the above
3.41
Proving methods
Exercise
Huynh Tuong Nguyen,
Tran Tuan Anh, Nguyen
An Khuong, Le Hong
Trang
A) 1
B) 2
C) 218922995834555169026
D) None of the above
3.42
Proving methods
Exercise
Huynh Tuong Nguyen,
Tran Tuan Anh, Nguyen
An Khuong, Le Hong
Trang
A) 1 correct answer!
B) 2
C) 218922995834555169026
D) None of the above
3.42
Proving methods
Exercise
Huynh Tuong Nguyen,
Tran Tuan Anh, Nguyen
An Khuong, Le Hong
Trang
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
B) The question should be “goods with the price above 25g”
C) Should be “goods with the price above 35g”
D) Should change the question to “goods with any price”
E) Yes
F) None of the above
3.43
Proving methods
Exercise
Huynh Tuong Nguyen,
Tran Tuan Anh, Nguyen
An Khuong, Le Hong
Trang
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
B) The question should be “goods with the price above 25g”
C) Should be “goods with the price above 35g”
D) Should change the question to “goods with any price”
E) Yes correct answer!
F) None of the above
3.43