{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

# L06 - Induction and Recursion Odd Powers Are Odd Fact If m...

This preview shows pages 1–13. Sign up to view the full content.

Induction and Recursion

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Odd Powers Are Odd Fact: If m is odd and n is odd, then nm is odd. Proposition: for an odd number m, m k is odd for all non-negative integer k. Proof by induction Let P(i) be the proposition that m i is odd. P(1) is true by definition. P(2) is true by P(1) and the fact. P(3) is true by P(2) and the fact. P(i+1) is true by P(i) and the fact. So P(i) is true for all i.
The Induction Rule 0 and (from n to n +1 ), proves 0 , 1 , 2 , 3 ,…. R (0), R ( n ) R ( n +1) m  . R ( m ) Like domino effect… For any n>=0 Very easy to prove Much easier to prove with R(n) as an assumption.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
Statements in green form a template for inductive proofs. Proof: (by induction on n ) The induction hypothesis, P ( n ), is: Proof by Induction Let’s prove:
Proof by Induction Base Case ( n = 0): 1 1 1 r r 0 1 2 0 ? 1 1 1 1 r r r r r  Wait : divide by zero bug! This is only true for r 1 1 2 1. :: 1 ( 1 1 ) P n r r r r r r n n 1 2 1 1 1 n n r r r r r Theorem: 1. r

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document