Upload
shannon-pope
View
217
Download
0
Embed Size (px)
Citation preview
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(
9CMSC 250
A sequence example
Assume the following definition of a sequence:
Prove : 21)( naZn n
11 a
)12()2( 1 kaak kk
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
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):
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
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
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