Combinatorics and Probability: Homework Solutions for CSE 21 - Winter 2012, Slides of Pre-Calculus

2.1 In this homework, we will consider ”ordinary” decks of playing cards which have 52 cards, with 13 of each of the four suits (Hearts,.

Typology: Slides

2022/2023

Uploaded on 03/01/2023

janeka
janeka 🇺🇸

4.1

(15)

260 documents

1 / 5

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
CSE 21 - Winter 2012
Homework #2
Homework 2 Solutions
2.1 In this homework, we will consider ”ordinary” decks of playing
cards which have 52 cards, with 13 of each of the four suits (Hearts,
Spades, Diamonds and Clubs), with each suit having the 13 ranks (Ace,
2, 3, ..., 9, 10, Jack, Queen, King).
(a) How many 5-card hands are there where all the cards have the same
suit?
(b) How many 5-card hands are there where all the cards belong to at
most two suits?
(c) How many 5-card hands are there where all the cards have at most 2
different ranks?
(a) You can choose 1 of the 4 suits, and then you choose 5 of the 13 cards
in that suit.
(4
1)(13
5).
(b) There are two cases for this question: all the cards could belong to
one suit, or all the cards could belong to two suits. The number of
ways that all the cards could belong to one suit is given in part (a).
Otherwise, we could have a hand with 2 cards in one suit, and 3 cards
in the other suit. Or, 1 card in one suit, and 4 cards in the other suit.
With each of the suits, there are 4 ways to choose the first suit, and 3
ways to choose the second suit.
43[(13
2)(13
3)+(13
4)(13
1)] + (4
1)(13
5).
(c) Since you cannot have a hand made of 1 rank, we only need to con-
sider the case where there are exactly 2 different ranks. There two
templates: XXXXY and XXXYY. There are 13 ways to choose X, and
then 12 ways to choose Y. Once these are chosen, we have to choose
the suits.
13 12[(4
3)(4
2)+(4
1)(4
4)]
1
pf3
pf4
pf5

Partial preview of the text

Download Combinatorics and Probability: Homework Solutions for CSE 21 - Winter 2012 and more Slides Pre-Calculus in PDF only on Docsity!

CSE 21 - Winter 2012 Homework #

Homework 2 Solutions

2.1 In this homework, we will consider ”ordinary” decks of playing cards which have 52 cards, with 13 of each of the four suits (Hearts, Spades, Diamonds and Clubs), with each suit having the 13 ranks (Ace, 2, 3, ..., 9, 10, Jack, Queen, King).

(a) How many 5-card hands are there where all the cards have the same suit?

(b) How many 5-card hands are there where all the cards belong to at most two suits?

(c) How many 5-card hands are there where all the cards have at most 2 different ranks?

(a) You can choose 1 of the 4 suits, and then you choose 5 of the 13 cards in that suit. ⇒(^41 )(^135 ).

(b) There are two cases for this question: all the cards could belong to one suit, or all the cards could belong to two suits. The number of ways that all the cards could belong to one suit is given in part (a). Otherwise, we could have a hand with 2 cards in one suit, and 3 cards in the other suit. Or, 1 card in one suit, and 4 cards in the other suit. With each of the suits, there are 4 ways to choose the first suit, and 3 ways to choose the second suit. ⇒ 4 ∗ 3 [(^132 )(^133 ) + (^134 )(^131 )] + (^41 )(^135 ).

(c) Since you cannot have a hand made of 1 rank, we only need to con- sider the case where there are exactly 2 different ranks. There two templates: XXXXY and XXXYY. There are 13 ways to choose X, and then 12 ways to choose Y. Once these are chosen, we have to choose the suits. ⇒ 13 ∗ 12 [(^43 )(^42 ) + (^41 )(^44 )] 

2.2 How many 8 digit numbers formed from the digits {0, 1, ..., 9} have some digit occurring at least 3 times.

Count the complement. So there are a total of 10^8 ways to form a string of length 8. Therefore, we have to subtract the ways to form a string where all the digits are distinct, and the ways to form a digit where each digit appears at most twice.

  • The number of ways to form a digit where all the digits are distinct is: 10987654*3.
  • Let D denote a distinct digit, and let S 1 , S 2 , ... be a digit that is the same. Then the cases are:

S 1 S 1 DDDDDD =

S 1 S 1 S 2 S 2 DDDD =

S 1 S 1 S 2 S 2 S 3 S 3 DD =

S 1 S 1 S 2 S 2 S 3 S 3 S 4 S 4 =

For example, for the S 1 S 1 S 2 S 2 DDDD case, we first choose the two ranks

which will be duplicated ((^102 ) ways), then choose the number of ways of

placing them ( (^) 2!∗8!2!∗4! ), and finally choose the (distinct) ranks of the digits that go into the remaining 4 places (8 ∗ 7 ∗ 6 ∗ 5 choices). The other values are computed in a similar way. Thus, the number we want is 10^8 minus the sum of all the numbers above (which may be 36, 269, 200 if I calculated correctly!) Thus, the probability that a random bill has some digit occurring at least 3 times is about 0. which is greater than 13 of the time. 

the Y bin, and one each into the other 3 bins. Now we have to count how many ways we can label the bins with letters. Since only 3 of the letters (A, B, R) occur twice, then there are only 3 choices for Y. Once that choice is made, then there are (^43 ) = 4 choices for the other labels. (Keep in mind that the order of the labels doesn’t matter). Thus, the total for this pattern is 3 ∗ 4 ∗ (^) 2!∗1!5!∗1!∗1! = 720. The next pattern YYXXV is computed the same way. Now there are 3 bins labeled Y, X and V (and as usual, the order of the bins doesn’t matter, just the labels on them). So, there are (^31 ) = 3 ways to choose the labels for Y and X, and then 3 ways to choose the remaining label for V. Since there are then (^) 2!∗5!2!∗1! ways to put the balls in these 3 bins, then the total in this case is 3 ∗ 3 ∗ 30 = 270. Finally, let’s do one more pattern, say YYYXX. Since only the letter A occurs more than 2 times, then the label for bin Y must be A. There are then 2 choices for X, namely B or R. The balls (positions) can be placed into the bins in (^53 ) ways, so the total in this case is 2 ∗ 2 ∗ 10 = 40. Carrying similar calculations for the otter patterns and adding up the numbers, you get a grand total of 1271. 

(a) How many 5-card hands (from an ordinary deck) have at least one card of each suit?

(b) How many 6-card hands have at least one card of each suit?

(a) (^) (^41 )(^132 )(^131 )(^131 )(^131 ); (First choose the suit that will have 2 cards ((^41 ) = 4 ways), then choose the 2 cards from that suit ((^132 ) ways), and then choose one card from each of the the remaining 3 suits.)

(b) There are 2 possibilities for the suits: 3 of one suit and 1 of each of the other three, or 2 suits that each have 2, and the remaining 2 suits that just have one. For the first case, the number of choices is (^41 )(^133 )(^131 )(^131 )(^131 ).

For the second case, the number of choices is (^42 )(^132 )(^132 )(^131 )(^131 ). The answer is the total of these the numbers. 

(a) In how many different ways can the letters in MISSISSIPPIPOKER be arranged (using all the letters)?

(b) In how many different ways can all the letters in the word supercalifragilisticexpialidocious be arranged?

(a) 16! / (4! * 4! * 3!). Count of letters. M = 1, I = 4, S= 4, P = 3, O = 1, K = 1, E = 1, R = 1

(b) 34! / (3! * 2! * 2! * 2! * 2! * 3! * 3! * 3! * 7! * 2!). Counts of all the letters. s = 3, u = 2, p = 2, e = 2, r = 2, c = 3, a = 3, l = 3, i = 7, f = 1, g = 1, t = 1, x = 1, d = 1, o = 2 

2.6 Show that the number of subsets of an n-set S having an odd number of elements is exactly the same as the number of subsets of S having an even number of elements (where we assume n > 0).

The easiest way to do this is to apply the binomial theorem: (x + y)n^ = (^) ∑nk= 0 (nk)xkyn−k. Plugging in x = −1, y = 1, this becomes:

(− 1 + 1 )n^ = 0 = (^) ∑nk= 0 (− 1 )k(nk), i.e., (^) ∑j ( 2 nj) = (^) ∑j ( (^2) jn+ 1 ) and we are done

since the left hand sum counts the number of even-sized subsets of S while the right hand sum counts the number of odd-sized subsets of S.