I've 'indirectly' studied combinatorics earlier in probability courses, but now it's part of the math course I'm taking. I always thought it was very hard, and well, here I am again...
The problem is, I'm guessing, fairly simple, but I just don't know how to attack it.
There are five letters and three mailboxes. In how many ways can the letters be put into the mailboxes such that at most one box is empty?
By writing out the different distribution alternatives I've come to the conclusion that the answer must be 18, since the allowed combinations are:
- 1, 1, 3
- 1, 3, 1
- 3, 1, 1
- 1, 2, 2
- 2, 1, 2
- 2, 2, 1
- 0, 1, 4
- 0, 2, 3
- 0, 3, 2
- 0, 4, 1
- 1, 0, 4
- 2, 0, 3
- 3, 0, 2
- 4, 0, 1
- 1, 4, 0
- 2, 3, 0
- 3, 2, 0
- 4, 1, 0
I've tried arriving at this answer by more direct calculation, but I can't seem to get it right because I can't really wrap my head around how to formulate it -- for example, if the letters are distributed to boxes 1 1 2 2 3 that, to me, is equivalent to 1 2 1 2 3. Thus, I need to adjust the 'unconditional' calculation $3^5$ -- but how? Can someone please point me in the right direction?
It appears the mailboxes are distinct, but the letters are not. In that case, (a) one mailbox is empty. You have three ways to pick an empty mailbox and for each you have four ways to distribute the letters for twelve. (b) If no mailbox is empty, you have a stars-and-bars problem with four places to put two bars for six.