Slideshare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our User Agreement and Privacy Policy.

Slideshare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our Privacy Policy and User Agreement for details.

CPSC 125 Ch 2 Sec 1

2.
Proof Techniques
● Informal proof methods :
■ Inductive reasoning
■ Deductive reasoning
■ Proof by exhaustion
■ Direct proof
■ Proof by contraposition
■ Serendipity
● A few terms to remember:
■ Axioms: Statements that are assumed true.
• Example: Given two distinct points, there is exactly one line that
contains them.
■ Deﬁnitions: Used to create new concepts in terms of existing ones.
■ Theorem: A proposition that has been proved to be true.
• Two special kinds of theorems: Lemma and Corollary.
• Lemma: A theorem that is usually not too interesting in its own right
but is useful in proving another theorem.
• Corollary: A theorem that follows quickly from another theorem.
Section 2.1 Proof Techniques 1

3.
Deductive Reasoning: Counter Example
● Inductive Reasoning: Drawing a conclusion from a hypothesis
based on experience. Hence the more cases you ﬁnd where P
follows from Q, the more conﬁdent you are about the conjecture
P → Q.
● Usually, deductive reasoning is also applied to the same
conjecture to ensure that it is indeed valid.
● Deductive reasoning either looks for a counterexample that
disproves the conjecture (i.e. a case when P is true but Q is
false) or a to construct a proof (theorem).
● Example: Prove that “For every positive integer n, n! ≤ n2.”
■ Start testing some cases say, n = 1, 2, 3 etc.
■ It might seem like it is true for some cases but how far do you test,
say n = 4.
■ We get n! = 24 and n2 = 16 which is a counter example for this
theorem. Hence,even ﬁnding a single case that doesn’t satisfy the
condition is enough to disprove the theorem.
Section 2.1 Proof Techniques 2

4.
Counterexample
● More examples of counterexample:
■ All animals living in the ocean are ﬁsh.
■ Every integer less than 10 is bigger than 5.
● Counter example is not trivial for all cases, so we have
to use other proof methods.
Section 2.1 Proof Techniques 3

5.
Exhaustive Proof
● If dealing with a ﬁnite domain in which the proof is to be shown to be
valid, then using the exhaustive proof technique, one can go over all
the possible cases for each member of the ﬁnite domain.
● Final result of this exercise: you prove or disprove the theorem but you
could be deﬁnitely exhausted.
● Example: For any positive integer less than or equal to 5, the square of
the integer is less than or equal to the sum of 10 plus 5 times the
integer.
n
n2
10+5n
n2 < 10+5n
0
0
10
yes
1
1
15
yes
2
4
20
yes
3
9
25
yes
4
16
30
yes
5
25
35
yes
Section 2.1 Proof Techniques 4

6.
Example: Exhaustive Proof
● Example 1: If an integer between 1 and 20 is divisible by 6, then
it is also divisible by 3.
Section 2.1 Proof Techniques 5

7.
Direct Proof
● Direct Proof:
● Used when exhaustive proof doesn’t work. Using the rules of
propositional and predicate logic, prove P → Q.
● Hence, assume the hypothesis P and prove Q. Hence, a formal proof
would consist of a proof sequence to go from P to Q.
● Consider the conjecture
x is an even integer Λ y is an even integer → the product xy is an even integer.
● A complete formal proof sequence might look like the following:
1. x is an even integer Λ y is an even integer
hyp
2. (∀x)[x is even integer →(∃k)(k is an integer Λ x = 2k)]
number fact
(deﬁnition of even integer)
3. x is even integer →(∃k)(k is an integer Λ x = 2k)
2,ui
4. y is even integer →(∃k)(k is an integer Λ y = 2k)
2,ui
5. x is an even integer
1,sim
6. (∃k)(k is an integer Λ x = 2k)
3,5,mp
7. m is an integer Λ x = 2m
6, ei
8. y is an even integer
1,sim
Section 2.1 Proof Techniques 6

9.
Indirect Proof: Proof by Contradiction
● Derived from the deﬁnition of contradiction which says
P Λ Qʹ′ → 0
● Hence, (P Λ Qʹ′ → 0) → (P → Q) is a tautology.
● In a proof of contradiction, one assumes that the hypothesis and
the negation of the conclusion are true and then to deduce some
contradiction from these assumptions.
● Example 1: Prove that “If a number added to itself gives itself,
then the number is 0.”
■ The hypothesis (P) is x + x = x and the conclusion (Q) is x = 0.
Hence, the hypotheses for the proof by contradiction are:
■ x + x = x and x ≠0 (the negation of the conclusion)
■ Then 2x = x and x ≠0, hence dividing both sides by x, the result is 2
= 1, which is a contradiction. Hence, (x + x = x) → (x = 0).
Section 2.1 Proof Techniques 8

11.
Proof by Contraposition
● Use the variants of P → Q to prove the conjecture. From the
inference rules of propositional logic, we know a rule called
contraposition (termed “cont” in short).
● It states that (Qʹ′ → Pʹ′) → (P → Q) (a Tautology).
● Qʹ′ → Pʹ′ is the contrapositive of P → Q.
● Hence, proving the contrapositive implies proving the
conjecture.
● Example: Prove that if the square of an integer is odd, then the
integer must be odd
■ Hence, prove n2 odd → n odd
■ To do a proof by contraposition prove n even → n2 even
■ If n is even, then it can be written as 2m where m is an integer, i.e.
even/odd.
■ Then, n2 = 4m2 which is always even no matter what m2 is because
of the factor 4.
Section 2.1 Proof Techniques 10

12.
Serendipity
● Serendipity: Fortuitous happening or something by chance or
good luck.
● Not a formal proof technique.
● Interesting proofs provided by this method although other
methods can be used as well.
● Example: 342 players in a tennis tournament. One winner in the
end. Each match is between two players with exactly one winner
and the loser gets eliminated. Prove the total number of matches
played in the tournament are 341.
■ Solution: Only one champion at the end of the tournament, hence
341 losers at the end, hence 341 matches should have been played
to have 341 losers.
Section 2.1 Proof Techniques 11

13.
Summarizing Proof techniques
Proof Technique
Approach to prove P → Q
Remarks
Exhaustive Proof
Demonstrate P → Q
May only be used for
for all cases
ﬁnite number of cases
Direct Proof
Assume P, deduce Q
The standard approach-
usually the thing to try
Proof by Assume Qʹ′, derive Pʹ′
Use this Qʹ′ if as a
Contraposition
hypothesis seems to
give more ammunition
then P would
Proof by Assume P Λ Qʹ′ , deduce a Use this when Q says
Contradiction
contradiction
something is not true
Serendipity
Not really a proof Fun to know
technique
Section 2.1 Proof Techniques 12