Top Banner
1 CMSC 250 Chapter 4, con't., Inductive Proofs
24

1 CMSC 250 Chapter 4, con't., Inductive Proofs. 2 CMSC 250 Description l Inductive proofs must have: –Base case: where you prove that what it is you are.

Jan 01, 2016

Download

Documents

Shannon Pope
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: 1 CMSC 250 Chapter 4, con't., Inductive Proofs. 2 CMSC 250 Description l Inductive proofs must have: –Base case: where you prove that what it is you are.

1CMSC 250

Chapter 4, con't., Inductive Proofs

Page 2: 1 CMSC 250 Chapter 4, con't., Inductive Proofs. 2 CMSC 250 Description l Inductive proofs must have: –Base case: where you prove that what it is you are.

2CMSC 250

Description

Inductive proofs must have:– Base case:

• where you prove that what it is you are trying to prove is true about the base case

– Inductive hypothesis:• where you state what will be assumed in the proof

– Inductive step:• show:

– where you state what will be proven below• proof:

– where you prove what is stated in the show portion– this proof must use the inductive hypothesis somewhere

Page 3: 1 CMSC 250 Chapter 4, con't., Inductive Proofs. 2 CMSC 250 Description l Inductive proofs must have: –Base case: where you prove that what it is you are.

3CMSC 250

Example

Prove this statement:

Base case (n = 1):

Inductive hypothesis (assume thestatement is true for n = p):

Inductive step (show the statement is true for n = p + 1), i.e, show:

n

i

nnin

1 2

)1(1

1

11

ii 1

2

2

2

)11(1

2

)1( nn

p

i

ppi1 2

)1(

1

1 2

)1)1)((1(p

i

ppi

Page 4: 1 CMSC 250 Chapter 4, con't., Inductive Proofs. 2 CMSC 250 Description l Inductive proofs must have: –Base case: where you prove that what it is you are.

4CMSC 250

Variations

2 + 4 + 6 + 8 + … + 20 = ? If you can, use the fact just proved, that:

Can it be rearranged into a form that works? If not, it must be proved from scratch

n

i

nni1 2

)1(

Page 5: 1 CMSC 250 Chapter 4, con't., Inductive Proofs. 2 CMSC 250 Description l Inductive proofs must have: –Base case: where you prove that what it is you are.

5CMSC 250

Another example

1220 1

0

nn

k

kn

Page 6: 1 CMSC 250 Chapter 4, con't., Inductive Proofs. 2 CMSC 250 Description l Inductive proofs must have: –Base case: where you prove that what it is you are.

6CMSC 250

Discrete StructuresCMSC 250Lecture 23

March 26, 2008

Page 7: 1 CMSC 250 Chapter 4, con't., Inductive Proofs. 2 CMSC 250 Description l Inductive proofs must have: –Base case: where you prove that what it is you are.

7CMSC 250

Another example- geometric progression

1))()((

1

0

01

r

aararZnRaRr

nn

k

k

Page 8: 1 CMSC 250 Chapter 4, con't., Inductive Proofs. 2 CMSC 250 Description l Inductive proofs must have: –Base case: where you prove that what it is you are.

8CMSC 250

Another example- a divisibility property

)](|3)[( 30 nnZn

Page 9: 1 CMSC 250 Chapter 4, con't., Inductive Proofs. 2 CMSC 250 Description l Inductive proofs must have: –Base case: where you prove that what it is you are.

9CMSC 250

A sequence example

Assume the following definition of a sequence:

Prove : 21)( naZn n

11 a

)12()2( 1 kaak kk

Page 10: 1 CMSC 250 Chapter 4, con't., Inductive Proofs. 2 CMSC 250 Description l Inductive proofs must have: –Base case: where you prove that what it is you are.

10CMSC 250

Discrete StructuresCMSC 250Lecture 24

March 28, 2008

Page 11: 1 CMSC 250 Chapter 4, con't., Inductive Proofs. 2 CMSC 250 Description l Inductive proofs must have: –Base case: where you prove that what it is you are.

11CMSC 250

An example with an inequality

Prove this statement:

Base case (n = 3):

Inductive hypothesis (n = p): assume

Inductive step (n = p + 1):

Show:

7161)3(2: LHS

82: 3 RHS

pp 212 121)1(2 pp

RHSLHS

nnZn 212)( 3

Page 12: 1 CMSC 250 Chapter 4, con't., Inductive Proofs. 2 CMSC 250 Description l Inductive proofs must have: –Base case: where you prove that what it is you are.

12CMSC 250

Another example with an inequality

nxnxRxZn )1(1))(( 2

Page 13: 1 CMSC 250 Chapter 4, con't., Inductive Proofs. 2 CMSC 250 Description l Inductive proofs must have: –Base case: where you prove that what it is you are.

13CMSC 250

A less-mathematical example

If all we had was 2-cent coins and 5-cent coins, we could form any value greater than 3 cents.– Base case (n = 4):– Inductive hypothesis (n = p):– Inductive step (n = p + 1):

Page 14: 1 CMSC 250 Chapter 4, con't., Inductive Proofs. 2 CMSC 250 Description l Inductive proofs must have: –Base case: where you prove that what it is you are.

14CMSC 250

Discrete StructuresCMSC 250Lecture 25

March 31, 2008

Page 15: 1 CMSC 250 Chapter 4, con't., Inductive Proofs. 2 CMSC 250 Description l Inductive proofs must have: –Base case: where you prove that what it is you are.

15CMSC 250

Recurrence relation example

Assume the following definition of a function:

Prove the following definition property:

11 a 32 a

3213)(

kkkk aaaaZk

oddn ZaZn )( 0

10 a

Page 16: 1 CMSC 250 Chapter 4, con't., Inductive Proofs. 2 CMSC 250 Description l Inductive proofs must have: –Base case: where you prove that what it is you are.

16CMSC 250

Strong induction Regular induction:

P(n) P(n+1)

With strong induction, the implication changes slightly:– if the statement to be proven is true for all preceding elements,

then it's true for the current element (n)[(i, a i n)[P(i)] P(n+1)]

The strong induction principle:P(0) … P(p)(n)[P(0) P(1) P(2) … P(n) P(n + 1)] (n ≥ 0)[P(n)]

Page 17: 1 CMSC 250 Chapter 4, con't., Inductive Proofs. 2 CMSC 250 Description l Inductive proofs must have: –Base case: where you prove that what it is you are.

17CMSC 250

Now prove the recurrence relation property, using strong induction

Here's the function definition again:

This is the property to be proven:

11 a 32 a

3213)(

kkkk aaaaZk

oddn ZaZn )( 0

10 a

Page 18: 1 CMSC 250 Chapter 4, con't., Inductive Proofs. 2 CMSC 250 Description l Inductive proofs must have: –Base case: where you prove that what it is you are.

18CMSC 250

Another recurrence relation example

Assume the following definition of a function:

Prove the following definition property, using strong induction:

21 a

212 )(

kkk aaaZk

nnaZn 2)( 0

10 a

Page 19: 1 CMSC 250 Chapter 4, con't., Inductive Proofs. 2 CMSC 250 Description l Inductive proofs must have: –Base case: where you prove that what it is you are.

19CMSC 250

Discrete StructuresCMSC 250Lecture 26

April 2, 2008

Page 20: 1 CMSC 250 Chapter 4, con't., Inductive Proofs. 2 CMSC 250 Description l Inductive proofs must have: –Base case: where you prove that what it is you are.

20CMSC 250

Another example- a divisibility property

)7(mod0)( naNn

Assume the following definition of a recurrence relation:

Prove using strong induction that all elements in this relation have this property:

21 32)2( iii aaai

00 a

71 a

Page 21: 1 CMSC 250 Chapter 4, con't., Inductive Proofs. 2 CMSC 250 Description l Inductive proofs must have: –Base case: where you prove that what it is you are.

21CMSC 250

Another example

evenn ZaZn )( 1

Assume the following definition of a recurrence relation:

Prove using strong induction that all elements in this relation have this property:

23)(2

3ii aaZi

01 a

22 a

Page 22: 1 CMSC 250 Chapter 4, con't., Inductive Proofs. 2 CMSC 250 Description l Inductive proofs must have: –Base case: where you prove that what it is you are.

22CMSC 250

Discrete StructuresCMSC 250Lecture 27

April 4, 2008

Page 23: 1 CMSC 250 Chapter 4, con't., Inductive Proofs. 2 CMSC 250 Description l Inductive proofs must have: –Base case: where you prove that what it is you are.

23CMSC 250

Another example

Theorem: for all n ≥ 2 there exist primes p1, p2,…,pk, and exponents e1, e2,…ek, such that

kek

ee pppn 21

21

Page 24: 1 CMSC 250 Chapter 4, con't., Inductive Proofs. 2 CMSC 250 Description l Inductive proofs must have: –Base case: where you prove that what it is you are.

24CMSC 250

Constructive induction

Show:

(i.e., find integers A and B for which this is true)

In particular, we want to find the smallest A and B which will work

71 a

212 312)(

kkk aaaZk

nn BAaZn )( 0

20 a