Solutions to Quiz 2 in CSE 21: Combinatorics, Quizzes of Computer Science

The solutions to quiz 2 in a combinatorics course (cse 21). It includes the calculation of the number of ways to deal five cards from a standard deck such that there are two pairs, and the probability of selecting a group of 15 pastries from a bakery with exactly four eclairs, using the stars and bars method.

Typology: Quizzes

Pre 2010

Uploaded on 03/28/2010

koofers-user-a63
koofers-user-a63 ๐Ÿ‡บ๐Ÿ‡ธ

10 documents

1 / 1

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CSE 21: Quiz 2 Solutions
August 14, 2007
1. How many ways to deal 5 out of 52 cards such that you have two pairs? Note
that a full house (3 of one rank, 2 of another) doesnโ€™t count as two pair.
Answer: We first choose the two denominations for our 2 pair ๎˜€13
2๎˜, and
then the 2 suits for each of our pairs ๎˜€4
2๎˜2, and finally we must choose 1
of the 44 remaining cards that are not of our 2 denominations as the 5th
card in our hand ๎˜€44
1๎˜. Putting it all together gives ๎˜€13
2๎˜๎˜€4
2๎˜2๎˜€44
1๎˜.
2. A bakery produces seven different kinds of pastry (one of which is an eclair).
If the different kinds of selections of 15 pastries are equally likely, what
is the probability that a selection contains exactly 4 eclairs? This is a
stars and bars problem. The total number of ways to select 15 pastries
unconstrained is equivalent to having 15 stars (pastries) and 7 (kinds of
pastry)-1=6 bars giving ๎˜€21
6๎˜. To have exactly 4 eclairs is the same as
throwing 4 eclairs into our selection and then removing eclairs as a choice
for the remaining 11 pastries. This gives 11 stars and 6 - 1 = 5 bars
and ๎˜€16
5๎˜ways to have exactly 4 eclairs. Putting the two together gives a
probability of (16
5)
(21
6)
1

Partial preview of the text

Download Solutions to Quiz 2 in CSE 21: Combinatorics and more Quizzes Computer Science in PDF only on Docsity!

CSE 21: Quiz 2 Solutions

August 14, 2007

  1. How many ways to deal 5 out of 52 cards such that you have two pairs? Note that a full house (3 of one rank, 2 of another) doesnโ€™t count as two pair. Answer: We first choose the two denominations for our 2 pair

2

, and then the 2 suits for each of our pairs

2

, and finally we must choose 1 of the 44 remaining cards that are not of our 2 denominations as the 5th card in our hand

1

. Putting it all together gives

2

2

1

  1. A bakery produces seven different kinds of pastry (one of which is an eclair). If the different kinds of selections of 15 pastries are equally likely, what is the probability that a selection contains exactly 4 eclairs? This is a stars and bars problem. The total number of ways to select 15 pastries unconstrained is equivalent to having 15 stars (pastries) and 7 (kinds of pastry)-1=6 bars giving

6

. To have exactly 4 eclairs is the same as throwing 4 eclairs into our selection and then removing eclairs as a choice for the remaining 11 pastries. This gives 11 stars and 6 - 1 = 5 bars and

5

ways to have exactly 4 eclairs. Putting the two together gives a probability of

(^165 )

(^216 )