# Combinatorics Question

1. Nov 26, 2014

1. The problem statement, all variables and given/known data

Eight cards are selected with replacement from a standard pack of 52 playing cards, with 12 picture cards, 20 odd cards, and 20 even cards.

(a) How many different sequences of eight cards are possible?

(b) How many of the sequences in part (a) will contain three picture cards, three odd cards and two even cards?

2. The attempt at a solution

The first part is fairly straightforward. Given 8 available slots with 52 different choices for each slot, one can conclude that the number of different sequences of cards is 528.
I am, however, stumped by the second part.

2. Nov 26, 2014

### haruspex

Fix on one order, e.g. the order described, 3P, 3O, 2E. How many possibilities? Now how many rearrangements of that pattern amongst the 8 positions?

3. Nov 26, 2014

My first attempt was the following:
There are 12 possibilities in the first slot, 12 in the second, 12 in the third, then 20 in each of the remaining 5 slots. Therefore, there are 123*205 different possibilities, which is wrong according to my answer key.

4. Nov 26, 2014

### haruspex

That only covers one ordering of 3 "P"s, 3 "O"s and 2 "E"s (as letters). You must now consider how many sequences there are of such 8 letters.

5. Nov 26, 2014

Could you please elaborate?
Doesn't this cover sequences like $O_1, O_2, O_2, P_1, E_6, P_2, E_4, E_4$?

6. Nov 26, 2014

### Joffan

You've established how to get 3xP, 3xO and 2xE in that order (or in some fixed order). Now you have to arrange them into all possible orders. It's counting permutation with identical elements - 3 of one type, 3 of another and 2 of the last type.

[ I don't understand the subscripts in your preceding reply, incidentally, and you have 3 E's and only 2 P's ]

7. Nov 26, 2014

### haruspex

I could have explained my original suggestion more clearly.
The idea is to imagine you have also 8 placeholder cards that are only labelled as P, O or E; 3 Ps, 3 Os, 2 Es. This allows you to break the problem into two parts:
- how many ways are there of assigning actual cards to the first P, the second P, third P, first O etc?
- how many distinct ways are there of ordering the 8 placeholders?

8. Nov 28, 2014

I get it now. I'm supposed to multiply the result I obtained with $\frac{8!}{3!3!2!}$