Mid_2.1.sol

Mid_2.1.sol - Name: Student ID: CSE 21 Midterm #2 Solutions...

Info iconThis preview shows pages 1–3. Sign up to view the full content.

View Full Document Right Arrow Icon
Name: Student ID: CSE 21 Midterm #2 Solutions November 17, 2009 Each problem is worth 20 points. Show your work, especially on decision trees. Also, make sure you write legibly so that I have a chance of being able to read your solutions! Additional scratch paper is available at the front of the room. This is a CLOSED BOOK test. However, you may use one 8 1 / 2 by 11 inch sheet of paper with hand-written notes (on both sides). You can use a calculator if you wish but it shouldn’t be necessary since answers can be left in unexpanded form, i.e., using ! and ( x y ) . Remember, you are at least as smart as your neighbor so it won’t help you to see what he or she thinks! Good luck! Prob. Score 1 2 3 4 5 Total 1
Background image of page 1

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

View Full DocumentRight Arrow Icon
1. Give explicit closed form solutions to the following recurrences: (a) a n +2 = 3 a n +1 + 4 a n , with a 0 = 0 ,a 1 = 1; (b) b n +2 = 4 b n +1 - 4 b n , with b 0 = 0 ,b 1 = 1 . (a) The characteristic polynomial of the recurrence relation is a 2 - 3 a - 4, which has roots {- 1 , 4 } , yielding template solution a n = α ( - 1) n + β 4 n . To satisfy the base cases, form the system of linear equalities α + β = 0 - α + 4 β = 1 , which has (ncessarily unique) solution α = - 1 / 5 = 1
Background image of page 2
Image of page 3
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 02/02/2012 for the course CSE 21 taught by Professor Graham during the Fall '07 term at UCSD.

Page1 / 7

Mid_2.1.sol - Name: Student ID: CSE 21 Midterm #2 Solutions...

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

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