Data Str & Algorithm HW Solutions 89

Data Str & Algorithm HW Solutions 89 - 1 X i =0 ( i...

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

View Full Document Right Arrow Icon
89 14.3 From Equation 2.2 we know that n X i =1 i 2 = 2 n 3 +3 n 2 + n 6 . Thus, when summing the range a i b ,weget b X i = a i 2 = 2 b 3 +3 b 2 + b 6 2 a 3 +3 a 2 + a 6 = 2( b 3 a 3 )+3( b 2 a 2 )+( b a ) 6 . 14.4 We need to do some rearranging of the summation to get something to work with. Start with n X i =1 i 2 = n X i =1 ( i +1 1) 2 . Substituting i for i 1 ,weget n X i =1 i 2 = n 1 X i =0 ( i +1) 2 = n
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: 1 X i =0 ( i 2 + 2 i + 1) . The i 2 terms mostly cancel, leaving n 2 = n 1 X i =0 (2 i + 1) = 2 n 1 X i =0 i + n. n 2 n 2 = n 1 X i =0 i Substituting back i 1 for i , we get n X i =1 = n 2 + n 2 ....
View Full Document

This note was uploaded on 12/27/2011 for the course MAP 2302 taught by Professor Bell,d during the Fall '08 term at UNF.

Ask a homework question - tutors are online