You are on page 1of 33

Chapter 2 : Proofs, Induction and Number Theory

Tannaz R.Damavandi
Cal Poly Pomona

Credit for some of the slides in this lecture goes to : © 2014 by W.H. Freeman and Company & Dr.Fang Tang @ Cal Poly Pomona
Outline
2

• 2.1 - Proof Techniques


• 2.2 - Induction
• 2.3 - More on Proof of Correctness (Not covered in this class)
• 2.4 - Number Theory (Not covered in this class)
3

Section 2.1 – Proof Techniques


Some Terminologies
4
• Definitions: precise and unambiguous descriptions of the meaning of
a mathematical term that are used to create new concepts in terms of
existing ones.
• Axioms/Postulate: Statements that are always true without proof.
Axioms are used in proving theorems.
Example: Given two distinct points, there is exactly one line that
contains them.
• Theorem: A proposition that has been proved to be true.
 Example: Pythagorean Theorem- the square of
the hypotenuse (the side opposite the right angle) is equal to the
sum of the squares of the other two sides)
Informal Proof Methods
Inductive reasoning
5

 Deductive reasoning
 Proof by exhaustion
 Direct proof
 Proof by contraposition
 Serendipity
Inductive Reasoning vs. Deductive Reasoning
6
• Suppose you are doing some research in some subject that you don’t know if it
is true or not.
• Inductive reasoning: draw a conclusion based on experience.
 You observe a number of cases in which whenever P is true, Q is also true.
On the basis of these experiences, you may formulate a conjecture: P  Q.
 The more cases you find where Q follows from P, the more confident your
are in your conjecture. (Draw a conclusion based on experience)
 But no matter how reasonable the conjecture sounds, you will not be
satisfied.
For more info:
https://www.math.toronto.edu/mathnet/questionCorner/deductive.html
Inductive Reasoning vs. Deductive Reasoning
7
Deductive reasoning: verify the truth or falsity of a conjecture
• Either produce a proof for P  Q
• Or find a counterexample that disproves the conjecture, where P is true
and Q is false.
• In counterexample you need to prove (x)P(x) is NOT true, thus
[(x)P(x)]’ is true by showing (x)[P(x)]’

It may be difficult to decide which approach is better.


Although a single counterexample to a conjecture is sufficient to disprove it, it
is not trivial for all cases, so we have to use other proof methods.
Example
8 For a positive integer n, n factorial is defined as n(n-1)(n-2)… 1. and is denoted
by n!.
Prove or disprove the conjecture, ”For every positive integer n, n!≤ n2 “.
Let’s begin by testing some cases:

n n! n2 n!≤ n2
1 1 1 Yes
2 2 4 Yes
3 6 9 Yes
4 24 16 No

n=4 is a counterexample.
Practice
9
Provide counterexample to the following conjectures.

• All animals living in the ocean are fish.


• A whale or a crab …

• Every integer less than 10 is bigger than 5.


• 4 is less than 10 but NOT bigger than 5.

• All input to a computer is provided by the keyboard.


• Mouse provides input to computer and it is not a keyboard.
Proof Techniques
10
If a counterexample is not forthcoming, perhaps the
conjecture is true and we should try to prove it.
• Exhaustive Proof
• Direct Proof
• Proof by Contraposition
• Contradiction
• Serendipity
Exhaustive Proof
11
• If dealing with a finite 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 finite domain.

• Final result of this exercise: you prove or disprove the


theorem but you could be definitely exhausted!
Exhaustive Proof -Example
12
If an integer between 1 and 20 is divisible by 6, then it is also
divisible by 3.
Practice
Prove the conjecture "For any positive integer less than or equal
13

to 5, the square of the integer is less than or equal to the sum of


10 plus 5 times the integer.”
Direct Proof
14 Prove P directly, using generalized methods of deduction.

• Example: 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
(definition 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
Direct Proof Example (cont’d)
9. (k)(k is an integer Λ y = 2k) 4,8,mp
15
10. n is an integer and y = 2n 9, ei
11. x = 2m 7,sim
12. y = 2n 10, sim
13. xy = (2m)(2n) 11, 12, substitution of equals
14. xy = 2(2mn) 13, multiplication fact
15. m is an integer 7,sim
16. n is an integer 10, sim
17. 2mn is an integer 15, 16, number fact
18. xy = 2(2mn) Λ 2mn is an integer 14, 17, con
19. (k)(k is an integer Λ xy = 2k) 18,eg
20. (x)((k)(k is an integer Λ x = 2k)  x is even integer) number fact
(definition of even integer)
21. (k)(k an integer Λ xy = 2k)  xy is even integer 20, ui
22. xy is an even integer 19, 21, mp
Direct Proof Example (cont’d)
16

• However, a much more informal proof would be acceptable in


most circumstances.

• Informal direct proof for previous example:


• Let x=2m and y = 2n, where m and n are integers. Then
xy=(2n)(2m) = 2(2nm), where 2nm is an integer. Thus xy
has the form 2k, where k is an integer therefore xy is even.
Proof by Contraposition
17 • Use the variants of P  Q to prove the conjecture.
• Q’  P’ is equivalent to (P  Q).
• 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.
Proof by Contradiction (Indirect proof)
18

Derived from the definition 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
19

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).
Serendipity

20 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.
Summarizing Proof techniques
21

Proof Technique Approach to prove P  Q Remarks

Exhaustive Proof Demonstrate P  Q May only be used for finite


for all cases 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 hypothesis
Contraposition seems to give more
ammunition then P would

Proof by Contradiction Assume P Λ Q , deduce a Use this when Q says


contradiction something is not true
Serendipity Not really a proof technique Fun to know
22

Section 2.2 – Induction


A Motivating Example
23
 Climbing a ladder
 We assume the following two assertions:
 You can reach the first rung
 Once you get to a rung, you can always climb to the next rung
(This is an implication)
 If we can prove the above two assertions are true, then we can
conclude that:
 You can reach as high as you want

 Induction: a very useful proof technique in computer science.


Mathematical Induction
24
• Inductive reasoning starts with a conclusion and deductive
reasoning starts with a premise.
• Inductive reasoning moves from specific instances into a
generalized conclusion, while deductive reasoning moves
from generalized principles that are known to be true to a true
and specific conclusion.
• All proof techniques we talked about so far are deductive
reasoning.
• Mathematical Induction is deductive reasoning.

Source :study.com/academy/lesson/inductive-and-deductive-reasoning.html
First principle of Induction
25

 First Principle:
P(1) is true
P(n) is true for all positive integers n
(k)P(k) true  P(k+1) true

Inductive proof:
 P(1) is the basis step.

 P(k)  P(k+1) is the inductive step.

 We assume P(k) is true to prove the inductive step, P(k) is called the
inductive assumption or inductive hypothesis.
 To prove something true for all n≥ some value, think induction.
Steps To Prove By First Principle of Induction
26

• Step 1: Prove the basis step


• Step 2: Assume P(k) is true
• Step 3: Prove P(k+1) is true
Example
27 Prove the equation
1 + 3 + 5 + … + (2n-1) = n2
is true for any positive integer n.
P(1): 1= 12 Certainly true.
P(k): 1 + 3 + 5 + … + (2k-1) = k2 inductive hypothesis
Show P(k+1): 1 + 3 + 5 + … + [2(k+1)-1] = (k+1)2
= 1 + 3 + 5 + … +(2k-1) + (2k+2-1)
= k2 + 2k+1
= (k+1)2

Therefore, 1 + 3 + 5 + … + [2(k+1)-1] = (k+1)2


and verifies P(k+1) and completes the proof.
More Example
28
Prove that 1+2+22…+2n = 2n+1-1 for any n  1.
P(1) : 1+2 = 21+1-1 or 3 = 22-1, which is true.
P(k) :1+2+22…+2k = 2k+1-1 inductive hypothesis
Show P(k+1): 1+2+22…+2k+1 = 2k+1+1-1
1+2+22…+2k+1 = 1+2+22…+ 2k + 2k+1
= 2k+1-1 + 2k+1
= 2(2k+1)-1
= 2k+1+1-1
Therefore,
1+2+22…+2k+1 = 2k+1+1-1
and verifies P(k+1) and completes the proof.
Practice #1
29 Prove that for any positive integer n, the number 22n-1 is divisible by 3.
P(1): 22(1)-1 = 4-1 = 3 is divisible by 3. Clearly this is true.
P(k): 22k-1 is divisible by 3,which means that
22k-1 = 3m for some integer m, or 22k = 3m+1.
P(k+1): show that 22(k+1) -1 is divisible by 3.
22(k+1) -1 = 22k+2 -1
= 22•22k-1
= 22(3m+1) -1 (by the inductive hypothesis)
= 12m+4 -1
= 12m+3
= 3(4m+1) where 4m+1 is an integer
Thus 22(k+1) -1 is divisible by 3.
Second Principal of Induction
30 Second Principle:

P(1) is true
P(n) is true for all positive integers n
P(r) true for all r, 1rk  P(k+1) true

• More powerful than the first principle of induction.


• Use the second principle when assuming P(k) is not enough to prove P(k+1).
• Assuming P(r) for any r where 1 r  k gives more ammunition to prove the relation.
• Use second principle when the case k+1 depends on results further back than k.
Example
• Prove that the amount of postage greater than or equal to 8 cents can be built using only 3-cent and
31 5-cent stamps.
• Proof using the second principle of Induction
• Hence, we have to prove that P(n) is true for n  8 where P(n) is the sum of 3 and 5 cent stamps
used to make the n cents worth of postage.

 Base case: P(8) = 3 + 5 = 8 which is true.


 In this case we will have to establish additional cases to prove this. Hence, establish two cases
P(9) and P(10)
 P(9) = 3 + 3 + 3 = 9 and P(10) = 5 + 5
 Assume P(r) is true for any r, 8  r  k and consider P(k+1)
 We have proved P(r) is true for r = 8,9,10
 So, lets assume k+1  11
 If k+1  11 then (k+1)-3= k-2  8, hence, by inductive hypothesis, P(k-2) is true.
 Hence, k-2 can be written as a sum of 3s and 5s. Adding an additional 3 results in k+1 as a sum
of 3s and 5s.
 This verifies P(k+1) is true and hence verifies the proof.
Practice #2
In previous example:
32

Why are the additional cases p(9) and p(10) proved separately?
To verify P(k+1) we subtract 3 from k+1. For the inductive hypothesis to hold it must (k+1)-3 ≥ 8 , so
k+1 ≥11. Therefore implication cannot be used to verify P(9) or P(10).

Why can’t the first principle of induction be used in the proof?


The truth of P(k+1) cannot be verified from the truth of P(k). For example, to express 11 as
a sum of 3s and 5s, knowing that 10=5+5 is no help. However knowing 8=3+5 is helpful
because adding one more 3 gives 11= 2*3+5.
Conclusion
33
As a general rule:
Use the first principal of induction when information about “one position back”
is enough.
 The truth of P(k) is enough to prove P(K+1).

Use the second principal when information about “one position back” is not good
enough.
 The truth of P(k) is not good enough to prove P(K+1).
 The truth of P(r) for one or more values of r is/are enough to prove
P(K+1).
 r : values “farther back” than k.

You might also like