cse21.Wi08.PracticeFinal.Solution

# cse21.Wi08.PracticeFinal.Solution - Solutions to the Sample...

This preview shows pages 1–2. Sign up to view the full content.

Solutions to the Sample Final 1. Find general solutions to the following two recurrences: (a) g(n+2)=3g(n+1)+g(n), 0 n , where g(0) = 1, g(1)=1. Using the Theorem 9 in the book on page 135 to solve this problem: The two solutions to 2 310 xx −− = are 31 3 2 ± . So, the general form is 11 2 2 () nn g nK rK r =+ , and we solve the values to 12 , K K using the values g(0) = 1, g(1)=1. (0) 1 g KK == + , (1) 1 3/2*( ) 13/2*( ) g == + + . 13 1 13 1 , 21 3 3 −+ . 13 1 3 13 13 1 3 13 ( ) ( ) 22 3 3 gn +− (b) h(n+2)=8h(n+1)-16h(n), 0 n , where h(0) = 1, h(1)=1. The only solutions to 2 81 60 −+= is 4. So, the general form is 2 1 hn Kr Knr , and we solve the values of , K K using the values h(0) = 1, h(1)=1. 1 (0) 1 hK , 2 (1) 1 4 4 ==+ . 1, 3 / 4 . 3 () 4 ( 4 ) 4 n =− 2. We could have k = 0, 1, 2, 3 possible defective bulbs to be chosen. For each k (k defective bulbs), the possibilities that k bulbs are chosen can calculated as follows: stage 1: choose k defective bulbs. Number of choices: 5 k ⎛⎞ ⎜⎟ ⎝⎠ stage 2: choose 3 k more bulbs from good bulbs. Number of choices: 7 3 k Total number of possible choices: 12 3 The expected number of defective bulbs are 1..3 57 3 5 12 4 3 k kk k =

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

View Full Document
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### Page1 / 4

cse21.Wi08.PracticeFinal.Solution - Solutions to the Sample...

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

View Full Document
Ask a homework question - tutors are online