Data Str & Algorithm HW Solutions 9

Data Str & Algorithm HW Solutions 9 - (b) Induction...

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

View Full Document Right Arrow Icon
9 2 q 2 =4 ( p 2 ) 2 q 2 =2 ( p 2 ) 2 This implies that q 2 is also even. Thus, p and q are both even, which contra- dicts the requirement that p and q have no common factors. Thus, 2 must be irrational. 2.17 The leftmost summation sums the integers from 1 to n. The second summa- tion merely reverses this order, summing the numbers from n 1+1= n down to n n +1=1 . The third summation has a variable substitution of i 1 for i , with a corresponding substitution in the summation bounds. Thus, it is also the summation of n 0= n to n ( n 1)=1 . 2.18 Proof : (a) Base case. For n =1 , 1 2 = [2(1) 3 + 3(1) 2 +1] / 6=1
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: (b) Induction Hypothesis. n 1 X i =1 i 2 = 2( n 1) 3 + 3( n 1) 2 + ( n 1) 6 . (c) Induction Step. n X i =1 i 2 = n 1 X i =1 i 2 + n 2 = 2( n 1) 3 + 3( n 1) 2 + ( n 1) 6 + n 2 = 2 n 3 6 n 2 + 6 n 2 + 3 n 2 6 n + 3 + n 1 6 + n 2 = 2 n 3 + 3 n 2 + n 6 . Thus, the theorem is proved by mathematical induction. 2.19 Proof : (a) Base case. For n = 1 , 1 / 2 = 1 1 / 2 = 1 / 2 . Thus, the formula is correct for the base case. (b) Induction Hypothesis. n 1 X i =1 1 2 i = 1 1 2 n 1 ....
View Full Document

Ask a homework question - tutors are online