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

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

Embed Size (px)

Citation preview

1CMSC 250

Chapter 4, con't., Inductive Proofs

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

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

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(

5CMSC 250

Another example

1220 1

0

nn

k

kn

6CMSC 250

Discrete StructuresCMSC 250Lecture 23

March 26, 2008

7CMSC 250

Another example- geometric progression

1))()((

1

0

01

r

aararZnRaRr

nn

k

k

8CMSC 250

Another example- a divisibility property

)](|3)[( 30 nnZn

9CMSC 250

A sequence example

Assume the following definition of a sequence:

Prove : 21)( naZn n

11 a

)12()2( 1 kaak kk

10CMSC 250

Discrete StructuresCMSC 250Lecture 24

March 28, 2008

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

12CMSC 250

Another example with an inequality

nxnxRxZn )1(1))(( 2

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):

14CMSC 250

Discrete StructuresCMSC 250Lecture 25

March 31, 2008

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

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)]

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

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

19CMSC 250

Discrete StructuresCMSC 250Lecture 26

April 2, 2008

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

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

22CMSC 250

Discrete StructuresCMSC 250Lecture 27

April 4, 2008

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

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