Data Structures & Alogs HW_Part_3

Data Structures & Alogs HW_Part_3 - 9 p 2q 2 = 4(...

Info iconThis preview shows pages 1–2. 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 . Thus, the formula is correct for the base case. (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
Background image of page 1

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

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

Page1 / 4

Data Structures & Alogs HW_Part_3 - 9 p 2q 2 = 4(...

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

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