280wk3_x4 - How to Guess What to Prove Sometimes...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon

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

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: How to Guess What to Prove Sometimes formulating P ( n ) is straightforward; some- times its not. This is what to do: Compute the result in some specific cases Conjecture a generalization based on these cases Prove the correctness of your conjecture (by induc- tion) 1 Example Suppose a 1 = 1 and a n = a d n/ 2 e + a b n/ 2 c for n > 1. Find an explicit formula for a n . Try to see the pattern: a 1 = 1 a 2 = a 1 + a 1 = 1 + 1 = 2 a 3 = a 2 + a 1 = 2 + 1 = 3 a 4 = a 2 + a 2 = 2 + 2 = 4 Suppose we modify the example. Now a 1 = 3 and a n = a d n/ 2 e + a b n/ 2 c for n > 1. Whats the pattern? a 1 = 3 a 2 = a 1 + a 1 = 3 + 3 = 6 a 3 = a 2 + a 1 = 6 + 3 = 9 a 4 = a 2 + a 2 = 6 + 6 = 12 a n = 3 n ! 2 Theorem: If a 1 = k and a n = a d n/ 2 e + a b n/ 2 c for n > 1, then a n = kn for n 1. Proof: By strong induction. Let P ( n ) be the statement that a n = kn . Basis: P (1) says that a 1 = k , which is true by hypothe- sis. Inductive step: Assume P (1) , . . . , P ( n ); prove P ( n +1). a n +1 = a d ( n +1) / 2 e + a b ( n +1) / 2 c = k d ( n + 1) / 2 e + k b ( n + 1) / 2 c [Induction hypothesis] = k ( d ( n + 1) / 2 e + b ( n + 1) / 2 c ) = k ( n + 1) We used the fact that d n/ 2 e + b n/ 2 c = n for all n (in particular, for n + 1). To see this, consider two cases: n is odd and n is even. if n is even, d n/ 2 e + b n/ 2 c = n/ 2 + n/ 2 = n if n is odd, suppose n = 2 k + 1 d n/ 2 e + b n/ 2 c = ( k + 1) + k = 2 k + 1 = n This proof has a (small) gap: We should check that d ( n + 1) / 2 e n 3 In general, there is no rule for guessing the right inductive hypothesis. However, if you have a sequence of numbers r 1 , r 2 , r 3 , . . . and want to guess a general expression, here are some guidelines for trying to find the type of the expression (exponential, polynomial): Compute lim n r n +1 /r n if it looks like lim n r n +1 /r n = b / { , 1 } , then r n probably has the form Ab n + . You can compute A by computing lim n r n /b n Try to compute the form of by considering the sequence r n- Ab n ; that is, r 1- Ab, r 2- Ab 2 , r 3- Ab 3 , . . . lim n r n +1 /r n = 1, then r n is most likely a polyno- mial. lim n r n +1 /r n = 0, then r n may have the form A/b f ( n ) , where f ( n ) /n f ( n ) could be n log n or n 2 , for example Once you have guessed the form of r n , prove that your guess is right by induction. 4 More examples Come up with a simple formula for the sequence 1 , 5 , 13 , 41 , 121 , 365 , 1093 , 3281 , 9841 , 29525 Compute limit of r n +1 /r n : 5 / 1 = 5 , 13 / 5 2 . 6 , 41 / 13 3 . 2 , 121 / 41 2 . 95 , . . . , 29525 / 9841 3 . 000 Guess: limit is 3 ( r n = A 3 n + ) Compute limit of r n / 3 n : 1 / 3 . 33 , 5 / 9 . 56 , 13 / 27 . 5 , 41 / 81 . 5 , . . . , 29525 / 3 10 . 5000 Guess: limit is 1 / 2 ( r n = 1 2 3 n + )+ Compute r n...
View Full Document

This note was uploaded on 05/21/2009 for the course CS 2800 taught by Professor Selman during the Spring '07 term at Cornell University (Engineering School).

Page1 / 6

280wk3_x4 - How to Guess What to Prove Sometimes...

This preview shows document pages 1 - 3. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online