A shop has 8 different types of post cards and at least 12 of each type. How many selections of 12 postcards are there if
a) you can choose any number of each type?
Suppose the 8 types are numbered 1,2,...,8
Suppose the 12 cards are in a stack so that the cards of a lower type number
are above any cards of a higher type number.
Now let's think of inserting 7 cardboard partitions
into the stack of 12 to separate the cards of different types.
The 1st cardboard partition we insert will have all cards of type 1, if any,
just above it and all cards of type 2, if any, just below it.
The 2nd cardboard partition we insert will have all cards of type 2, if any,
just above it and all cards of type 3, if any, just below it.
etc., etc,
The 7th cardboard partition we insert will have all cards of type 7, if any,
just above it and all cards of type 8, if any, just below it.
Now you see why we only need 7 partitions to separate the 8 types
of cards.
[For instance, in the case all 12 cards are type 1, all 7 cardboard partitions
will be together at the bottom of the stack. And for instance, if they are all
of type 8, then all 7 partitions will be together at the top of the stack. And
for instance, if they are all of type 4, there will be three cardboard
partitions on top of the stack and 4 partitions on the bottom of the stack.]
So we now have a stack of 19 things, 12 cards and 7 cardboard partitions.
Now let's imagine that we have a stack of 19 slips of paper. We choose 7 of
those slips of paper and write the word "partition" on them, leaving them stuck
out a ways from the stack. Then on the slip stuck out nearest the top of the
stack we write
"This slip of paper represents a partition with all type 1 cards, if any, just
above it and all type 2 cards, if any, just below it."
We do that with all 7 pieces of paper stuck out. On the 7th one we write
"This slip of paper represents a partition with all type 7 cards, if any, just
above it and all type 8 cards, if any, just below it."
On all the other pieces of paper between two slips with "partition" written on
them we will write this:
"This slip of paper represents a postcard of type (whatever)".
There is a 1-to-1 correspondence between the ways we can do this with the slips
of paper and the ways we can select the 12 cards.
We can choose those 7 pieces of paper from the 19 to write "partition" on in
C(19,7) = 50388 ways. That's the answer.
[Yes, I know, I could have just given you the formula for the number of
partitions of n=12 into r=8 terms counting 0's as terms as C(n+r-1,r-1).
But I thought I would show you WHY the formula works!]
-----------------------------------------------------------------
b) you can choose at most one of type 1 and any number of the other types?
Case 1: We choose none of type 1.
Then we have only 7 types to choose from. n=12, r=7. Using the formula
above, C(n+r-1,r-1) = C(12+7-1,7-1) = C(18,6) = 18564 ways
Case 2: We choose one of type 1.
After choosing the 1 card of type 1, we have only 11 cards to choose and
only 7 types to choose them from.
n=11, r=7. Using the formula,
C(n+r-1,r-1) = C(11+7-1,7-1) = C(17,6) = 12376.
Total for both cases 18564+12376 = 30940.
Edwin