Mid1_sol

Mid1_sol - n = 0 and 1, for example. Assume it is true for...

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

View Full Document Right Arrow Icon
CSE 21 Midterm #1 October 20, 2011 1. (a) How many rearrangements using all the letters of the word SCHWARZENEGGER are there? Answer : 14! 3!2!2! = 3632428800 1.(b) How many rearrangements using only 13 of the letters of the word SCHWARZENEGGER are there? Answer : Same as (a) , since there is a 1 - 1 correspondence between 13 letter words and 14 letter words (just remove the first letter, for example). 2.(a) In how many ways can 4 iPods and 3 iPads be distributed to 5 students if there are no restrictions? Answer : ( 8 4 )( 7 4 ) = 2450. 2.(b) Suppose in part (a) that no student can get more than one of the same item (i.e, no one gets 2 iPods or 2 iPads). Now how many ways are there? Answer : ( 5 4 )( 5 3 ) = 50. 3. Find explicit solutions to the following two recurrences: (a) x ( n + 2) = 4 x ( n + 1) - 3 x ( n ) , x (0) = 0 ,x (1) = 1; Answer : x ( n ) = (1 / 2)(3 n - 1). (b) y ( n + 2) = 3 y ( n + 1) - 4 y ( n ) , y (0) = 0 ,y (1) = 1; Answer : y ( n ) = 1 - 7 ± ( 3+ - 7 2 ² n - ± ( 3 - - 7 2 ² n 4. Let F n be our old friends, the Fibonacci numbers, defined by: F 0 = 0 ,F 1 = 1 and F n +2 = F n +1 + F n for n 0. Show that n k =0 F 3 k = 1 2 ( F 3 n +2 - 1) for n 0. 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
Proof by induction : Statement is true for
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: n = 0 and 1, for example. Assume it is true for some value n . Then n +1 X k =1 F 3 k = (1 / 2)( F 3 n +2-1) + F 3 n +3 by the induction hypothesis = (1 / 2)( F 3 n +2 + 2 F 3 n +3-1) = (1 / 2)( F 3 n +3 + F 3 n +4-1) by properties of Fibonacci numbers = (1 / 2)( F 3 n +5-1) , which completes the induction step. Could also prove this directly by using the explicit formula for F n , which would then involve summing a geometric series. 5. How many 5-card hands from an ordinary deck of 52 cards have at least 4 cards of the same suit? Answer : 4 ( 13 5 ) + 4 ( 13 4 ) 39 = 116688. 6. A password is to be made up of 5 symbols taken from the set of 26 letters { a,b,. ..,z } and 10 numbers { , 1 ,..., 9 } . However, each password must contain at least one letter and at least one number . How many possible passwords are there? Answer : 36 5-26 5-10 5 . 2...
View Full Document

Page1 / 2

Mid1_sol - n = 0 and 1, for example. Assume it is true for...

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