12.07.2015 Views

CMSC 203 - Homework Assignment 3 - Due April 24, 2008

CMSC 203 - Homework Assignment 3 - Due April 24, 2008

CMSC 203 - Homework Assignment 3 - Due April 24, 2008

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Name ___Solution Key_____<strong>CMSC</strong> <strong>203</strong> - <strong>Homework</strong> <strong>Assignment</strong> 3 - <strong>Due</strong> <strong>April</strong> <strong>24</strong>, <strong>2008</strong>1. Find the terms a 3 , a 4 , a 5 , and a 6 for the recursively defined sequence given by:a 0 = 1, a 1 = 1, a 2 = 1, a 3 = 1 and a n = (a n−1 )(a n−3 ) − (a n−2 )(a n−4 ) for n > 3.a 3 = 1a 4 = (a 3 )(a 1 ) − (a 2 )(a 0 ) = (1)(1) − (1)(1) = 1 − 1 = 0a 5 = (a 4 )(a 2 ) − (a 3 )(a 1 ) = (0)(1) − (1)(1) = 0 − 1 = −1a 6 = (a 5 )(a 3 ) − (a 4 )(a 2 ) = (−1)(1) − (0)(1) = −1 − 0 = −1.


Name ___Solution Key_____<strong>CMSC</strong> <strong>203</strong> - <strong>Homework</strong> <strong>Assignment</strong> 3 - <strong>Due</strong> <strong>April</strong> <strong>24</strong>, <strong>2008</strong>3. Using Mathematical Induction, prove for all integers n > 1,n + 1∑ i ⋅ 2 i = n ⋅ 2 n + 2 + 2i = 1Proof: (Induction)Basis: Since the statement specifies n > 1, we see that at n = 1, the LHS = 1(2 1 ) + 2(2 2 ) = 2 + 8 = 10, and theRHS = 1(2 1+2 ) + 2 = 2 3 + 2 = 8 + 2 = 10, so LHS = RHS.However, if we consider the smallest allowable value for n here, we see that n = 0 is also a viable basis value.In this case, the LHS = 1(2 1 ) = 2 and the RHS = 0(2 0+2 ) + 2 = 2, so again LHS = RHS, and the Basis is valid.Inductive: Assume the statement is true for n = k, that is,( k + 1) + 1Nowk + 1∑ i ⋅ 2 i = ( k + 1) ⋅ 2 ( k + 1)+ 2 + 2 = ( k + 1) ⋅ 2 k + 3 + 2 .i = 1k + 2∑i = 1i 2 i ⋅k + 1= (2k + 2)2 k+2 + 2 = (k + 1)(2)(2 k+2 ) + 2 = (k + 1)2 k+3 + 2. QED∑ i ⋅ 2 i = k ⋅ 2 k + 2 + 2 . We want to show thati = 1= i ⋅ 2 i + i ⋅ 2 i = k ⋅ 2 k + 2 + 2 + ( k + 2) ⋅ 2 k + 2 = ( k + ( k + 2)) ⋅ 2 k 2 +∑i = 1k + 2∑i = k+2+ 2


Name ___Solution Key_____<strong>CMSC</strong> <strong>203</strong> - <strong>Homework</strong> <strong>Assignment</strong> 3 - <strong>Due</strong> <strong>April</strong> <strong>24</strong>, <strong>2008</strong>4. Using the Strong Form of Mathematical Induction to prove the following:If a 0 , a 1 , a 2 ,... is a sequence defined as follows:a 0 = 0, a 1 = 3, a 2 = 9, a k = a k−1 + a k−2 + a k−3 , for all k > 3,then a n < 3 n , for all integers n > 4.Proof: (Strong Induction)Basis: (Sorry for the confusion here - either n = 3 or n = 4 is acceptable for the basis value)For n = 3: a 3 = a 2 + a 1 + a 0 = 9 + 3 + 0 = 12 < 27 = 3 3 , so the Basis is valid.For n = 4: a 4 = a 3 + a 2 + a 1 = 12 + 9 + 3 = <strong>24</strong> < 81 = 3 4 , so the Basis is valid.Inductive: Assume a i < 3 i for all i = 3, 4, 5, ..., m. Show that a m+1 < 3 m+1 .Now,a m+1 = a m + a m−1 + a m−2< 3 m + 3 m−1 + 3 m−2= 3 m−2 (3 2 + 3 + 1)= 3 m−2 (13)< 3 m−2 (27)= 3 m−2 (3 3 )= 3 m−2+3= 3 m+1 . QED


Name ___Solution Key_____<strong>CMSC</strong> <strong>203</strong> - <strong>Homework</strong> <strong>Assignment</strong> 3 - <strong>Due</strong> <strong>April</strong> <strong>24</strong>, <strong>2008</strong>5. Suppose I have 100 different CDs, with 30 of them jazz, 45 of them rock, and the rest classical.(a) How many ways can I line these CDs on shelf that is only large enough to hold 25?P(100,25) = 100! / (100 - 25)! = 100! / 75!(b) How many ways can I line them up ordering 10 of each type, so that all the CDs of the same type aregrouped together?(order types)(order rock cds)(order jazz cds)(order classical cds)= P(3,3)P(30,10)P(45,10)P(25,10)= [3! / (3 - 3)!][30! / (30 - 10)!][45! / (45 - 10)!][25! / (25 - 10)!]= 3!(30! / 20!)(45! / 35!)(25!/15!) = ((3!30!45!25!) / (20!35!15!)(c) How many ways can I choose 10 CDs if I do not want more than 3 classical CDs in any collection?(0 c)(10 r or j) + (1 c)(9 r or j) + (2 c)(8 r or j) + (3 c)(7 r or j)= C(25,0)C(75,10) + C(25,1)C(75,9) + C(25,2)C(75,8) + C(25,3)C(75,7)= (75! / 10!65!) + (25!/<strong>24</strong>!)(75!/9!66!) + (25!/2!23!)(75!8!67!) + (25!/3!22!)(75!/7!68!)(d) How many ways can I choose 15 CDs if I don’t want a certain pair of CDs together in the collection?All - (collections with the pair together) = C(100,15) - C(98,13) = (100!/15!85!) - (98!/13!85!).Also: (Neither) + (Those w/ cd1) + (Those w/ cd2) = C(98,15) + C(98,14) + C(98,14).


Name ___Solution Key_____<strong>CMSC</strong> <strong>203</strong> - <strong>Homework</strong> <strong>Assignment</strong> 3 - <strong>Due</strong> <strong>April</strong> <strong>24</strong>, <strong>2008</strong>6. The Mars Candy Company sells bags of M&Ms with 64 pieces candy colored from 8 different colors.(a) How many different bags can they produce?Slots = 64, Types = 8, Restrictions = 0Total bags = C(Slots + Types - 1 - Restrictions,Slots - Restrictions) = C(64 + 8 - 1 - 0,64 - 0)= C(71,64) = 71! / (64! 7!)(b) How many different bags can they produce if each bag must contain at least 5 of each color?Slots = 64, Types = 8, Restrictions = 8(5) = 40Total bags = C(Slots + Types - 1 - Restrictions,Slots - Restrictions) = C(64 + 8 - 1 - 40,64 - 40)= C(31,<strong>24</strong>) = 31! / (<strong>24</strong>! 7!)

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!