Data Str & Algorithm HW Solutions 90

Data Str & Algorithm HW Solutions 90 - 90 Chap. 14...

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

View Full Document Right Arrow Icon
90 Chap. 14 Analysis Techniques 14.5 F ( n ) = 2+4+ ··· +2 n 2 F ( n ) = 4+8+ ··· +2 n +1 When we subtract, we get 2 F ( n ) F ( n )= F ( n )=2 n +1 2 . Thus, n X i =1 2 i =2 n +1 2 . 14.6 Call our summation G ( n ) , then G ( n )= n X i =1 i 2 n i =2 n 1 +2 2 n 2 +3 2 n 3 + ··· + n 2 0 . 2 G ( n )=2 n X i =1 i 2 n i =2 n +2 2 n 1 +3 2 n 2 + ··· + n 2 1 . Subtracting, we get 2 G ( n ) G ( n )= G ( n )=2 n +2 n 1 +2 n 2 + ··· +2 1 n 2 0 . This is simply 2 n +1 2 n . 14.7 TOH has recurrence relation F ( n )=2 F ( n 1)+1 ,F ( 1 )=1 .S i n c e the problem gives us the closed form solution, we can easily prove it by induction. 14.8 The closed form solution is F ( n )= nc , which can easily be proved using induction. 14.9 Pick the constants c
Background image of page 1
This is the end of the preview. Sign up to access the rest of the 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