DS - L2 (Proof Methods)
DS - L2 (Proof Methods)
DS - L2 (Proof Methods)
for
Computer Science
• Direct proof
• Indirect proof
• Proof by contradiction
• Proof by cases
Example p q pq
If p=“I will have salad for lunch.” and F F F
q=“I will have steak for dinner.”, then
F T F
pq=“I will have salad for lunch and
I will have steak for dinner.” T F F
T T T
• The above targets to show that the case where p is true and q
is false never occurs
– Thus, p q is always true
• Example:
• Prove that if n is an integer with 10 ≤ n ≤ 15 which is a perfect
square, then n is also a perfect cube.
• Example:
• Proof :
• Assume on the contrary that it is rational. Then it can be
expressed as a / b, for some positive integers a and b with b
0.
• Further, we may restrict a and b to have no common factor.
Example: Show that there is a positive integer that can be written as the sum
of cubes of positive integers in two different ways.