Chapter 4, con't., Inductive Proofs CMSC 250 1 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 CMSC 250 2 Example n n( n 1) Prove this statement: n 1 i 2 i 1 1 n(n 1) 1(1 1) 2 1 2 2 2 i 1 Inductive hypothesis (assume the p p ( p 1) i 2 statement is true for n = p): i 1 Base case (n = 1): i 1 Inductive step (show the statement is true for n = p + 1), i.e, show: p 1 ( p 1)(( p 1) 1) i 2 i 1 CMSC 250 3 Variations 2 + 4 + 6 + 8 + … + 20 = ? If you can, use the fact just proved, that: n n(n 1) i i 1 CMSC 250 2 Can it be rearranged into a form that works? If not, it must be proved from scratch 4 Another example k n 1 n 0 2 2 1 k 0 n CMSC 250 5 Discrete Structures CMSC 250 Lecture 23 March 26, 2008 CMSC 250 6 Another example- geometric progression ar a k (r R )(a R)(n Z ) ar r 1 k 0 1 CMSC 250 0 n n1 7 Another example- a divisibility property 0 (n Z )[3 | ( n n)] CMSC 250 3 8 A sequence example Assume the following definition of a sequence: a1 1 (k 2)ak ak 1 (2k 1) Prove : CMSC 250 1 (n Z ) an n 2 9 Discrete Structures CMSC 250 Lecture 24 March 28, 2008 CMSC 250 10 An example with an inequality Prove this statement: Base case (n = 3): 3 (n Z ) 2n 1 2 n LHS : 2(3) 1 6 1 7 RHS : 23 8 Inductive hypothesis (n = p): assume Inductive step (n = p + 1): LHS RHS 2 p 1 2 p 2( p 1) 1 2 p 1 Show: CMSC 250 11 Another example with an inequality 2 (n Z )(x R ) 1 nx (1 x) CMSC 250 n 12 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): CMSC 250 13 Discrete Structures CMSC 250 Lecture 25 March 31, 2008 CMSC 250 14 Recurrence relation example Assume the following definition of a function: a1 1 a0 1 a2 3 (k Z )ak ak 1 ak 2 ak 3 3 Prove the following definition property: 0 (n Z ) an Z CMSC 250 odd 15 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)] CMSC 250 16 Now prove the recurrence relation property, using strong induction Here's the function definition again: a0 1 a2 3 a1 1 (k Z )ak ak 1 ak 2 ak 3 3 This is the property to be proven: 0 (n Z ) an Z CMSC 250 odd 17 Another recurrence relation example Assume the following definition of a function: a0 1 a1 2 (k Z 2 )ak ak 1 ak 2 Prove the following definition property, using strong induction: 0 ( n Z ) a n 2 CMSC 250 n 18 Discrete Structures CMSC 250 Lecture 26 April 2, 2008 CMSC 250 19 Another example- a divisibility property Assume the following definition of a recurrence relation: a0 0 a1 7 (i 2)ai 2ai 1 3ai 2 Prove using strong induction that all elements in this relation have this property: (n N )an 0 (mod 7) CMSC 250 20 Another example Assume the following definition of a recurrence relation: a1 0 a2 2 (i Z ) ai 3a i 2 2 3 Prove using strong induction that all elements in this relation have this property: 1 (n Z ) an Z CMSC 250 even 21 Discrete Structures CMSC 250 Lecture 27 April 4, 2008 CMSC 250 22 Another example Theorem: for all n ≥ 2 there exist primes p1, p2,…,pk, and exponents e1, e2,…ek, such that n p p2 pk e1 1 CMSC 250 e2 ek 23 Constructive induction a1 7 a0 2 (k Z )ak 12ak 1 3ak 2 2 Show: 0 (n Z ) an A B n (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 CMSC 250 24