{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Data Str &amp; Algorithm HW Solutions 11

# Data Str &amp; Algorithm HW Solutions 11 - Base case...

This preview shows page 1. Sign up to view the full content.

11 2.22 Theorem 2.1 n i =1 (2 i ) = n 2 + n . (a) Proof : We know from Example 2.3 that the sum of the fi rst n odd numbers is n 2 . The i th even number is simply one greater than the i th odd number. Since we are adding n such numbers, the sum must be n greater, or n 2 + n . (b) Proof : Base case : n = 1 yields 2 = 1 2 + 1 , which is true. Induction Hypothesis : n 1 i =1 2 i = ( n 1) 2 + ( n 1) . Induction Step : The sum of the fi rst n even numbers is simply the sum of the fi rst n 1 even numbers plus the n th even number. n i =1 2 i = ( n 1 i =1 2 i ) + 2 n = ( n 1) 2 + ( n 1) + 2 n = ( n 2 2 n + 1) + ( n 1) + 2 n = n 2 n + 2 n = n 2 + n. Thus, by mathematical induction, n i =1 2 i = n 2 + n . 2.23 Proof
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: : Base case. For n = 1 , Fib (1) = 1 < 5 3 . For n = 2 , Fib (2) = 1 < ( 5 3 ) 2 . Thus, the formula is correct for the base case. Induction Hypothesis. For all positive integers i < n , Fib ( i ) < ( 5 3 ) i . Induction Step. Fib ( n ) = Fib ( n − 1) + Fib ( n − 2) and, by the Induction Hypothesis, Fib ( n − 1) < ( 5 3 ) n − 1 and Fib ( n − 2) < ( 5 3 ) n − 2 . So, Fib ( n ) < ( 5 3 ) n − 1 + ( 5 3 ) n − 2 < 5 3 ( 5 3 ) n − 2 + ( 5 3 ) n − 2...
View Full Document

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern