# Combinatorial analysis

#### Schdero

A set of playing cards consists of 36 cards. These 36 cars are subdivided into 9 types (A,B,C, (...)I) with four cards each. The cards within these subtypes do not differ (A1=A2=A3=A4). How many possibilites are there, to take up 9 cards? The order of taking up cards and the order of the taken up cards do not matter (AAABBCCCD=ABABACDCC).

I somehow do not get a correct result. First i thought of how man possibilites there are to take 9 cards from 36, but i dont know how to get rid of all possibilites. I tried 36!/27!4!^9, but this is totally wrong...

#### Failure

A set of playing cards consists of 36 cards. These 36 cars are subdivided into 9 types (A,B,C, (...)I) with four cards each. The cards within these subtypes do not differ (A1=A2=A3=A4). How many possibilites are there, to take up 9 cards? The order of taking up cards and the order of the taken up cards do not matter (AAABBCCCD=ABABACDCC).

I somehow do not get a correct result. First i thought of how man possibilites there are to take 9 cards from 36, but i dont know how to get rid of all possibilites. I tried 36!/27!4!^9, but this is totally wrong...

Here is a feasible but somewhat laborious way of doing it. Consider, for example, the case where you are given 4 cards from one of the 9 subtypes, 3 from another, and 1 from yet two other subtypes. How many cases of that general sort, "4+3+1+1" are there?

Well, you can choose the subtype that contributes 4 cards in 9 ways. Having choosen that subtype, you can choose the subtype that contributes 3 cards in 8 ways, and the two subtypes that contribute 1 card each can be chosen in $$\displaystyle \binom{7}{2}$$ ways. In all, there are $$\displaystyle 9\cdot 8\cdot\binom{7}{2}=1512$$ different cases of being dealt 9 cards that follow this general "4+3+1+1" pattern.
So, I think, it comes down to listing all these possible ways of partitioning the number 9 into a sum of at most 9 non-negative integers ($$\displaystyle \leq 4$$) and, for each of these partitionings, determining how many ways there are to get them by combining the 9 subtypes of cards accordingly.
Such a list of partitionings might start like this (I am leaving out trailing 0s)

$$\displaystyle \begin{array}{lcl}9 &=&4+4+1\\ &=& 4+3+2\\ &=& 4+3+1+1\\ &=& 4+2+2+1\\ &\vdots& \vdots \end{array}$$
To keept this list reasonably small, you should only list the sums that have non-increasing terms (from left to right).

Last edited:
• Schdero

#### Plato

MHF Helper
A set of playing cards consists of 36 cards. These 36 cars are subdivided into 9 types (A,B,C, (...)I) with four cards each. The cards within these subtypes do not differ (A1=A2=A3=A4). How many possibilites are there, to take up 9 cards?
If we expand $$\displaystyle (1+x+x^2+x^3+x^4)^9$$ the coefficient of $$\displaystyle x^9$$ is 19855.
That is the answer to your question done with a generating function.

#### Failure

If we expand $$\displaystyle (1+x+x^2+x^3+x^4)^9$$ the coefficient of $$\displaystyle x^9$$ is 19855.
That is the answer to your question done with a generating function.
That's a great way of doing it, except for two possible problems: (1) that the OP does not know about the use of generating functions in enumerative combinatorics, and, (2) that he does not have access to a CAS to determine the coefficient of $$\displaystyle x^9$$ so very easily as the above statement seems to suggest.

In fact, it seems to me that if he does not have access to a CAS (or is not allowed to use a CAS) for that purpose, he might as well use the laborious procedure that I have suggested.