Discrete Structures Lab 4 Proof Techniques: 1 Exercises
Discrete Structures Lab 4 Proof Techniques: 1 Exercises
DISCRETE STRUCTURES
Lab 4
Proof techniques
Trần Hồng Tài
Abstract
In this Laboratory, we will practice using python and proving state-
ments using the proof techniques introduced in Week5 6 Proof Techniques.pdf.
1 Exercises
1. Prove/Disprove the conclusion C using the given data:
(a) Given:
P ="Phong has Visa"
S1="If Phong can fly, Phong will go to America"
S2="If Phong has Visa, Phong will go to America"
S3="If Phong can speak English, Phong will go to America"
Conclusion : C ="Phong goes to America"
(b) Given:
P ="It’s hot yesterday"
S1="If it’s hot, it will rain the next day"
S2="If and only if it’s not rain, Nam goes outside"
S3="If it’s not hot, Nam will go outside"
Conclusion : C ="Nam goes outside"
(c) Given:
Q ="An wake up late"; R ="The traffic is flowing smooth"
S1="The traffic is always heavy on school day"
S2="If An wake up late, he will be late for school on school day"
S3="An only have to go to school on school day"
S4="If An don’t have to go to school, An can’t be late for school"
Conclusion : C ="An is late for school"
(d) Given:
P ="∃x, y ∈ R, (x + y)2 ≤ x2 + y 2 ";
Q ="∀x, y ∈ Z+ , x + y ≥ x + y"
√
R ="∀x, y ∈ Z+ , x + y + 2 xy ≥ x + y"
Elit.tdtu.edu.vn 1
TON DUC THANG UNIVERSITY
Faculty of Information Technology
√
T ="∀x, y ∈ Z+ , x + y ≥ 0"
S1 ="∀x, y ∈ Z+ , x2 ≥ y 2 → x ≥ y"
S2 ="∀x, y ∈ Z+ , x ≥ y → x2 ≥ y 2 "
S3 ="∀x, y ∈ R+ , x ≥ y → x2 ≥ y 2 "
S4 ="∀x, y ∈ R+ , x2 ≥ y 2 → x √
≥ y"
√ √
Conclusion : C ="∀x, y ∈ Z+ , x + y ≥ x + y"
Then print the proof that the statements are valid or invalid such as:
"the given statement is correct when x equal to ..."or
"the given statement is incorrect for all values x within the given domain."
Hint: Using Loop to test every possible cases in the given domains.
3. Print the negated statements from the following statement then prove/dis-
prove them:
(a) ∀x ∈ Z, 0 ≤ x ≤ 100, x3 >= x
(b) ∀x ∈ Z, 0 ≤ x ≤ 100, and x is even, x ∗ 3 + 1 is a prime number
(c) ∀x ∈ Z, 1 ≤ x, y ≤ 100, and x is even, x ∗ 5 + 3 is a prime number
(d) ∀c ∈ Z, 0 < c ≤ 100, c%4 = 0, ∃a, b ∈ Z+ , c2 = a2 + b2
(e) ∀c ∈ Z, 0 < c ≤ 100, c%5 = 0, ∃a, b ∈ Z+ , c2 = a2 + b2
(f) ∃c ∈ Z, 0 < c ≤ 100, c2 ≤ c
Note: the negated statements is logical in equivalent to the original state-
ments.
4. Prove/disprove that:
P10 P10 2
P10 P10 2
(a) x=0 y=0 (x + y) > x=0 y=0 (x + 2y)
P10
(b) 20! < x=0 x!
Elit.tdtu.edu.vn 2
TON DUC THANG UNIVERSITY
Faculty of Information Technology
P10
(c) x=0 3x2 >= 103
P10 3
(d) x=5 (4x + 6x2 + 2x) > 104 + 2 ∗ 103 + 102 − 54 − 2 ∗ 53 − 52
5. Prove/Disprove the following arguments manually without using truth
table.
(a) p → r (c) p → q
¬p → q ¬r ∨ s
q→s p∨r
∴ ¬r → s ∴ ¬q → s
(b) p → (q → r) (d) p
p∨s p→r
t→q p → (q ∨ ¬r)
¬s ¬q ∨ ¬s
∴ ¬r → ¬t ∴s
Example Prove:
p
¬r → ¬p
∴r
G1 = " p "
G2 = " ~r - >~ p "
G3 = " G2 - > ’p - > r ’, con trapos itive "
C = " G1 + G3 -> C = ’ r ’"
print ( " G1 = % s " % ( G1 ) )
print ( " G2 = % s " % ( G2 ) )
print ( " G3 = % s " % ( G3 ) )
print ( " % s " % ( C ) )
Elit.tdtu.edu.vn 3