Discrete Mathematics (7) (8) Method of Proof
Discrete Mathematics (7) (8) Method of Proof
Discrete Mathematics (7) (8) Method of Proof
Method of Proof
Session 7-8
Acknowledgement
Chapter 1
2
Learning Objectives
LO1:
Evaluate the logic of compound,
quantified statements and method of
proof related to discrete problems
Sub Topics
• Direct Proofs
1
• Indirect Proofs
2
• Counterexamples
3
• Mathematical Induction
4
4
Introduction
5
Methods of Proving Theorems
6
Direct Proofs
Definition :
The integer n is even if there exists an integer k such that n = 2k, and n is odd if there
exists an integer k such that n = 2k+1. (Note that every integer is either even or odd,
and no integer is both even and odd.) Two integers have the same parity when both
are even or both are odd; they have opposite parity when one is even and the other
is odd.
7
Direct Proofs
Example :
Give a direct proof of the theorem “If n is an odd integer, then 𝑛2 is odd.”
Solution:
Note that this theorem states ∀n(P(n) → Q(n)), where
P(n) is “n is an odd integer” and Q(n) is “𝑛2 is odd.”
To begin a direct proof of this theorem, we assume that the hypothesis of this
conditional statement is true, namely, we assume that n is odd. By the
definition of an odd integer, it follows that n = 2k+1, where k is some integer,
we find that
𝒏𝟐 = (𝟐𝒌 + 𝟏)𝟐 = 4 𝒌𝟐 +4k +1 = 2(2 𝒌𝟐 +2k) + 1
By the definition of an odd integer, we can conclude that 𝑛2 is an odd integer
(it is one more than twice an integer). Consequently, we have proved that if n
is an odd integer, then 𝑛2 is an odd integer.
8
Direct Proofs
Definition :
The real number r is rational if there exist integers p and q with q ≠ 0 such
that r = p∕q. A real number that is not rational is called irrational.
Example :
Prove that the sum of two rational numbers is rational.
(Note that if we include the implicit quantifiers here, the theorem we want to
prove is “For every real number r and every real number s, if r and s are
rational numbers, then r + s is rational.)
9
Direct Proofs
Solution:
Suppose that r and s are rational numbers.
there are integers p and q, with q ≠ 0, such that r=p∕q, and integers t and u,
with u ≠ 0, such that s=t∕u.
We find that
Not direct proofs, that is, that do not start with the premises and end with the
conclusion.
1. Proofs by contraposition
Proofs by contraposition make use of the fact that the conditional statement
p → q is equivalent to its contrapositive, ¬ q → ¬ p. In a proof by
contraposition of p → q, we take ¬ q as a premise, and using axioms,
definitions, and previously proven theorems, together with rules of
inference, we show that ¬ p must follow.
Example :
a. Prove that if n is an integer and 3n + 2 is odd, then n is odd.
b. Prove that if n = ab, where a and b are positive integers, then a ≤√n or
b ≤√n.
c. Prove that if n is an integer and 𝑛2 is odd, then n is odd.
11
Proofs by contraposition
Solution:
a. Assume that the conclusion of the conditional statement “If 3n + 2 is odd,
then n is odd” is false;
assume that n is even.
n = 2k , for some integer k.
3n +2 = 3(2k) + 2 = 6k + 2 = 2(3k + 1).
So that 3n + 2 is even (because it is a multiple of 2), and therefore not
odd.
Proof by contraposition succeeded; we have proved the theorem
“If 3n + 2 is odd, then n is odd.”
12
Proofs by contraposition
Solution:
b. Assume that the conclusion of the conditional statement “If n = ab, where
a and b are positive integers, then a ≤√n or b ≤√n” is false.
That is,we assume that the statement (a ≤√n) ∨ (b ≤√n) is false.
This implies that a >√n and b >√n.
We can multiply these inequalities together (using the fact that if 0 < s < t
and 0 < u < v, then su < tv) to obtain ab >√n ⋅√n = n.
This shows that ab ≠ n, which contradicts the statement n = ab.
Because the negation of the conclusion of the conditional statement
implies that the hypothesis is false, the original conditional statement is
true.
We have proved that if n = ab, where a and b are positive integers, then a
≤√n or b ≤√n.
13
Proofs by contraposition
Solution :
c. Prove that if n is an integer and 𝑛2 is odd, then n is odd.
Take hypothesis the statement that n is not odd, this means that n is even,
there exists an integer k such that n = 2k.
we obtain
𝑛2 = 4𝑘 2 = 2(2𝑘 2 ) = 2t
which implies that 𝑛2 is also even, where t = 2𝑘 2 .
We have proved that if n is an integer and 𝑛2 is odd, then n is odd.
14
Indirect Proofs.
2. Proofs by Contradiction
Suppose we want to prove that a statement p is true. Furthermore, suppose
that we can find a contradiction q such that ¬ p → q is true. Because q is
false, but ¬ p → q is true, we can conclude that ¬ p is false, which means
that p is true.
Example :
a. Give a proof by contradiction of the theorem “If 3n + 2 is odd, then n is
odd.”
b. Prove the theorem “If n is an integer, then n is odd if and only if 𝑛2 is
odd.”
15
Proofs by Contradiction
Solution:
a. Let p be “3n + 2 is odd” and q be “n is odd.”
To construct a proof by contradiction, assume that both p and ¬ q are true.
That is, assume that 3n + 2 is odd and that n is not odd.
Because n is even, there is an integer k such that n = 2k.
This implies that
3n + 2 = 3(2k) + 2 = 6k + 2 = 2(3k + 1)=2t
where t = 3k + 1, 3n + 2 is even.
The statement “3n + 2 is even” is equivalent to the statement ¬ p.
Because both p and ¬ p are true, we have a contradiction. This completes
the proof by contradiction, proving that if 3n + 2 is odd, then n is odd.
16
Proofs by Contradiction
Solution:
b. Prove the theorem “If n is an integer, then n is odd if and only if 𝑛2 is odd.”
This theorem has the form “p if and only if q,”
where p is “n is odd” and q is “𝑛2 is odd.”
we need to show that p → q and q → p are true.
Because we have shown that both p → q and q → p are true in previous
example, we have shown that the theorem is true.
17
Counterexamples
18
Counterexample
19
Mathematical Induction
20
Introduction
21
Mathematical Induction
22
Mathematical Induction
Example 01:
Show that if n is a positive integer, then
Solution :
Let P(n) be the proposition that the sum of the first n positive integers,
1 + 2 +⋯n =
23
Mathematical Induction
Under this assumption, it must be shown that P(k + 1) is true, namely, that
is also true.
When we add k + 1 to both sides of the equation in P(k), we obtain
This last equation shows that P(k + 1) is true under the assumption that
P(k) is true
24
Mathematical Induction
Example 02 :
Use mathematical induction to prove that 𝑛3 − n is divisible by 3 whenever n
is a positive integer.
Solution :
BASIS STEP :
The statement P(1) is true because 13 − 1 = 0 is divisible by 3.
INDUCTIVE STEP :
For the inductive hypothesis we assume that P(k) is true; that is, we assume
that 𝑘 3 − k is divisible by 3 for an arbitrary positive integer k.
We must show that when P(k + 1), the statement that (𝑘 + 1)3 − (k + 1) is
divisible by 3, is also true.
25
Mathematical Induction
Note that :
26
Reference
27
Thank You