You are on page 1of 25

Mathematical Concepts For Computing

AQ010-3-1 (Version E)

PROOF TECHNIQUES
TOPIC LEARNING OUTCOMES

At the end of this topic, You should be able to

• construct simple mathematical proofs.


• write and evaluate a proof and give examples of each proof technique
described.

AQ010-3-1-MCFC Proof Techniques SLIDE 2


Contents & Structure
• Direct Proof
Proof by construction
• Indirect Proof
 Proof by contrapositive
 Proof by contradiction

AQ010-3-1-MCFC Proof Techniques SLIDE 3


Introduction to Proofs
• A proof is a logical argument that establishes the truth of a mathematical statement.
• A good proof must be correct, but it also needs to be clear enough for others to
understand.
Difference between theorem and proof
• Theorem: A theorem is a statement that can be shown to be true.
• Proof: The explanation of why a statement is true.
• Less important theorems sometimes are called propositions.
• Theorems can also be referred to as facts or results.
• A proof is a valid argument (sequence of statements) that establishes the truth of a
theorem.

AQ010-3-1-MCFC Proof Techniques SLIDE 4


Introduction to Proofs (Cont.…)
Proven
Axioms Hypothesis theorems
The statements to be used in proofs include:
• Axioms or postulates (statement assumed to be
true without proof).
• Hypothesis (premises) of the theorem
• Previously proven theorems. Rules of inference
• Rules of inference used to draw conclusions and to
move from one step to another.

New Theorems

AQ010-3-1-MCFC Proof Techniques SLIDE 5


Introduction to Proofs (Cont.…)
 Methods of proving theorems
 Direct proofs
•Proof by construction
 Indirect proofs
• Proof by contraposition
• Proof by contradiction

AQ010-3-1-MCFC Proof Techniques SLIDE 6


Applications of Proofs

Consequently, understanding the techniques used in proofs is essential in both


mathematics and in computer science.
• Verifying the computer programs are correct.
• Establishing that operating systems are secure.
• Making inference /implications in artificial intelligence.
• Showing that system specifications are consistent and so on.

AQ010-3-1-MCFC Proof Techniques SLIDE 7


Some Basic Definitions
Even numbers
• An even number is any number that can be divided by 2.
• For example, 12 can be divided by 2, so 12 is even.
• We saw in divisibility rules that a number is divisible by 2 if its last digit is
0,2,4,6,or 8.
Formal definition of an even number:
• A number n is even if there exist a number k, such that
n = 2k where k is an integer.
• This is formal way of saying that if n is divided by 2, we always get a quotient
k with no remainder .
• Having no remainder means that n can in fact be divided by 2

AQ010-3-1-MCFC Proof Techniques SLIDE 8


Some Basic Definitions
Odd numbers
• An odd number is any number that cannot be divided by 2.
• For example, 25 cannot be divided by 2, so 25 is odd.
• Therefore, any number whose last digit is not 0, 2, 4, 6, or 8 is an odd number.
Formal definition of an odd number:
• A number n is odd if there exist a number k, such that
n = 2k + 1 where k is an integer.
• This is formal way of saying that if n is divided by 2, we always get a quotient k
with a remainder of 1.

AQ010-3-1-MCFC Proof Techniques SLIDE 9


Direct Proofs
• A direct proof shows that a conditional statement is true by showing that if is true
then must also be true.
• In a direct proof, we assume that is true and use axioms, definitions, and previously
proven theorems, together with rules of inference, to show that must also be true.

To show that a statement is true, follow these steps:


1. Either find a result that states , or prove that
is true.
2. Show or verify that is true.
3. Conclude that must be true.

AQ010-3-1-MCFC Proof Techniques SLIDE 11


Direct Proof (Cont..…)
Example 1: Prove that “If n is an odd integer, then n2 is odd.”
Proof:
We assume that is odd. (hypothesis)
, where k is some integer. (definition of odd number)
We can square on both sides of the equation to obtain a new equation that expresses 2
(By squaring)

Let .Then r is an integer (Axiom) therefore is odd.


So, we have proved the theorem “If n is an odd integer, then n2 is odd.”

AQ010-3-1-MCFC Proof Techniques SLIDE 12


Direct Proof (Cont.….)
Example 2: Prove that “ for every two integers a and b , if a and b are odd, then is
odd”.
Proof:
Let i and j are integers.
Assuming that and , we have

Therefore, if we let then .


So, we have proved the theorem “ for every two integers a and b , if a and b are odd, then
is odd”.

AQ010-3-1-MCFC Proof Techniques SLIDE 13


Direct Proof (Cont.….)

Example 3: Give a direct proof if n is an even integer, then is also an even integer.
Proof:
We assume that n is an even integer (hypothesis)
Let n= 2k (definition of an even integer where k is some integer)

where
is an even integer.
Therefore, we have proved the theorem if n is an even integeris also an even integer.

AQ010-3-1-MCFC Proof Techniques SLIDE 14


Direct Proof (Cont.….)
Example 4: Give a direct proof if n is an even integer, then is also an even integer.
Proof:
We assume that n is an even integer (hypothesis)
Let n= 2k (definition of an even integer where k is some integer)

where
is an even integer.
Therefore, we have proved the theorem if n is an even integeris also an even integer.

AQ010-3-1-MCFC Proof Techniques SLIDE 15


Indirect Proofs
Instead of proving directly, it is sometimes easier to prove it indirectly. There are two
kinds of indirect proofs: Proof by contrapositive and proof by contradiction.

Proof by contrapositive:
• The proof by contrapositive is based on the fact that an implication is equivalent to
its contrapositive.
• Therefore, instead of proving , we may prove its contrapositive . Since it is an
implication, we could use a direct proof.

AQ010-3-1-MCFC Proof Techniques SLIDE 16


Proof by Contrapositive
Example of proof by contrapositive in English sentences:

Theorem: If Bob is a gardener, then he likes flowers


p: Bob is a gardener
q: Bob likes flowers
We want to prove p -> q.

Using -q -> -p, we have


"If Bob does NOT like flowers, then he is NOT a gardener", which is true.

Hence, if -q -> -p is true, then p -> q is true

AQ010-3-1-MCFC Proof Techniques SLIDE 17


Proof by Contrapositive
Example 5: Prove that “if n is an integer and 3n + 2 is odd, then n is odd”.

Proof:
We assume is even.
Then , where is some integer. (definition of even number)
Therefore,

is even.
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 the theorem “if n is an integer and 3n + 2 is odd, then n is odd”.

AQ010-3-1-MCFC Proof Techniques SLIDE 18


Proof by Contrapositive (Cont.…)
Example 6: If x is a real number and then using proof by contrapositive.
Proof: We assume that the conclusion of the statement If x is a real number and then is
false.
Assume then,

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 the theorem “If x is a real number and then “

AQ010-3-1-MCFC Proof Techniques SLIDE 19


Proof by Contradiction

Another indirect proof is the proof by contradiction. To prove a conditional statement


by contradiction we prove that:

is true ) which is equivalent to

Note:
Assuming that the logic used in every step in the argument is correct, yet we still end
up with a contradiction, then the only possible flaw must come from the supposition
(assumption) that is false. Consequently, must be true.

AQ010-3-1-MCFC Proof Techniques SLIDE 20


Proof by Contradiction

Example 7: Give a proof by contradiction of the theorem : “If is odd, then


is odd.”
Proof:

Suppose that is odd and is even


Then, ( for some integer r).
Hence, (multiply both sides by 3)
(add 2 on both sides)

(Let
Thus is even, which is false ( a contradiction !)
We have proved the theorem “If is odd, then is odd.”

AQ010-3-1-MCFC Proof Techniques SLIDE 21


Slide ‹#› of 28
Proof by Contradiction

Example 8: Give a proof by contradiction of the theorem : “If then .

Proof:

If , then we need to show that .


Suppose, on the contrary, we have .
Then either or 5.
If then .
If , we again have .
In either case, we have a contradiction. Hence 5.
We have proved the theorem “If then ”.

AQ010-3-1-MCFC Proof Techniques SLIDE 22


Slide ‹#› of 28
Mistakes in Proofs
Example 9: What is wrong with this famous supposed “proof” that 1 = 2 ?

The error is that a − b equals


Proof: Suppose a and b are two equal positive integers. zero; division of both sides
of an equation by the same
Steps : Reason quantity is valid as long as
this quantity is not zero.
1. a=b ( Given)
2. a2 = ab (Multiply both sides of (1) by a)
3. a2 - b2 = ab - b2 (Subtract b2 from both sides of (2))
4. (a − b)(a + b) = b(a − b) (Factor both sides of (3))
5. a+b=b (Divide both sides of (4) by a − b )
6. 2b = b (Replace a by b in (5) because a = b & simplify)
7. 2= 1 (Divide both sides of (6) by b)

Can you find the error 


Every step is valid except for one, step 5 where we divided both sides by a − b

AQ010-3-1-MCFC Proof Techniques SLIDE 24


Slide ‹#› of 28
Suggestions

• Start with a draft.


• Use symbols and notations appropriately.
• Display long and important equations separately.
• Write in complete sentences, with proper usage of grammar and punctuation.

AQ010-3-1-MCFC Proof Techniques SLIDE 25


Resources
• https://www.cpp.edu/~ftang/courses/CS130/notes/Proof.pdf
• https://www.cse.wustl.edu/~cytron/547Pages/f14/IntroToProofs_Final.pdf
• A Spiral Workbook for Discrete Mathematics, Harris Kwong, ISBN:
1942341180, 9781942341185
• A Course in Discrete Structures, Rafael Pass Wei-Lung Dustin Tseng.
• Discrete Mathematics and its Applications With Combinatorics and Graph
theory, Kenneth Rosen, 7th Edition.

AQ010-3-1-MCFC Proof Techniques SLIDE 26


Summary / Recap of Main Points
• Direct Proof

• Proof by Contrapositive

• Proof by Contradiction

AQ010-3-1-MCFC Proof Techniques SLIDE 27

You might also like