Discrete Mathematics (7) (8) Method of Proof

Download as pdf or txt
Download as pdf or txt
You are on page 1of 28

Course : MATH6025 – Discrete Mathematics

Effective Period : September 2020

Method of Proof
Session 7-8
Acknowledgement

These slides have been adapted from :

Kenneth H. Rosen, “ Discrete


Mathematics and its Applications”,
8th edition,2019, McGraw-Hill
Education, New York, ISBN 978-1-
259-67651-2

Chapter 1

2
Learning Objectives

On successful completion of this course, students will be able


to:

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

 A proof is a valid argument that establishes the truth of a mathematical


statement.
 A proof can use the hypotheses of the theorem, if any, axioms assumed to
be true, and previously proven theorems. Using these ingredients and rules
of inference, the final step of the proof establishes the truth of the
statement being proved.
 Informal proofs can often explain to humans why theorems are true, while
computers are perfectly happy producing formal proofs using automated
reasoning systems.
 The methods of proof are important not only because they are used to
prove mathematical theorems, but also for their many applications to
computer science. These applications include verifying that computer
programs are correct, establishing that operating systems are secure,
making inferences in artificial intelligence, showing that system
specifications are consistent, and so on.

5
Methods of Proving Theorems

6
Direct Proofs

 A direct proof of a conditional statement p → q is constructed when the


first step is the assumption that p is true; subsequent steps are
constructed using rules of inference, with the final step showing that q
must also be true.
 In a direct proof, we assume that p is true and use axioms, definitions,
and previously proven theorems, together with rules of inference, to show
that q must also be true.

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

Because q ≠ 0 and u ≠ 0, it follows that qu ≠ 0.


Consequently, we have expressed
r + s = v/w, where v = pu + qt and w = qu, and w ≠ 0.
This means that r + s is rational. We have proved that the sum of two rational
numbers is rational.
10
Indirect Proofs.

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

Statement of the form ∀xP(x) is false, we need only find a counterexample,


that is, an example x for which P(x) is false.
Example :
Show that the statement “Every positive integer is the sum of the squares of
two integers” is false.
Solution:
To show that this statement is false, we look for a counterexample, which is a
particular integer that is not the sum of the squares of two integers.
Because 3 cannot be written as the sum of the squares of two integers.
To show this is the case, note that the only perfect squares not exceeding 3
are 02 = 0 and 12 = 1.
Furthermore, there is no way to get 3 as the sum of two terms each of which is
0 or 1. Consequently, we have shown that “Every positive integer is the sum of
the squares of two integers” is false.

19
Mathematical Induction

20
Introduction

Suppose that we have an infinite


ladder. we want to know whether we can
reach every step on this ladder. We know two
things:
1. We can reach the first rung of the ladder.
2. If we can reach a particular rung of the
ladder, then we can reach the next rung.
By (1), we know that we can reach the first rung of the
ladder. Moreover, because we can reach the first rung,
by (2), we can also reach the second rung; it is the next
rung after the first rung. Applying (2) again, after 100
rung, uses of (2), we know that we can reach the 101st
rung

21
Mathematical Induction

A proof by mathematical induction has two parts, a basis step, where we


show that P(1) is true, and an inductive step, where we show that for all
positive integers k, if P(k) is true, then P(k + 1) is true.

Principle of mathematical induction :


To prove that P(n) is true for all positive integers n, where P(n) is a
propositional function, we complete two steps:
1. BASIS STEP : We verify that P(1) is true.
2. INDUCTIVE STEP : We show that the conditional statement P(k) → P(k +
1) is true for all positive integers k.

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 =

BASIS STEP : P(1) is true, because

INDUCTIVE STEP : For the inductive hypothesis we assume that P(k)


holds for an arbitrary positive integer k. That is, we assume that

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 :

Using the inductive hypothesis, we conclude that the first term 𝑘 3 − k is


divisible by 3. The second term is divisible by 3 because it is 3 times an
integer, we know that (𝑘 + 1)3 − (k + 1) is also divisible by 3.

26
Reference

Kenneth H. Rosen, “ Discrete Mathematics and its


Applications”, 8th edition,2019, McGraw-Hill Education,
New York, ISBN 978-1-259-67651-2

27
Thank You

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy