Recursion: Ln=Ln−1+n where L0=1.
We guess that solution is Ln=n(n+1)2+1.
Base case: L0=0(0+1)2+1=1 is true.
Inductive step: Assume Ln=n(n+1)2+1 is true for some n. We will show that Ln+1=(n+1)(n+2)2+1 given that Ln=Ln−1+n is true.
Ln+1=(n+1)(n+2)2+1=Ln+(n+1)
Ln=(n+1)(n+2)2+1−(n+1)
Ln=(n+1)(n+2)2+22−2n+22=n2+3n+2+2−2n−22
Ln=n2+n+22=n2+n2+1=n(n+1)2+1
This completes the proof.
Is everything in place for a correct induction proof? Is anything wrong? Backwards? Unclear? Awkward?
Answer
Base case: L0=0(0+1)2+1=1 is true.
Inductive step: Assume Ln=n(n+1)2+1 is true for some n. We will show that Ln+1=(n+1)(n+2)2+1 given that Ln=Ln−1+n is true.
Fine.
Ln+1=(n+1)(n+2)2+1=Ln+(n+1)
Don't start with Ln+1=(n+1)(n+2)2+1 which is what you have to prove.
Ln+1=Ln+n+1=n(n+1)2+1+n+1=n(n+1)2+2(n+1)2+1=n+12(n+2)+1=(n+1)(n+2)2+1
No comments:
Post a Comment