Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

I have 16 boxes, 7 of which are unlabelled green and 9 of which are unlabelled yellow. Also I have 7 distinct balls. Then the question is - how many ways can I pack the balls in the boxes?

share|improve this question
    
sorry what does mean this one tge? –  dato datuashvili Jan 17 '13 at 8:56
3  
Wasn't math.stackexchange.com/questions/280598 enough? –  mrf Jan 17 '13 at 9:00
    
@mrf: It makes a difference whether it's the balls that are distinct and the boxes undistinguishable, or the other way around, because balls and boxes don't have equivalent roles (since we consider assignments of balls to boxes and not of boxes to balls). –  joriki Jan 17 '13 at 10:30

2 Answers 2

Assuming that the balls are labelled and that each box can hold any number of balls, the answer is that you must first choose a way to partition the balls into subsets, each of which is placed in one box, and then choose whether to place each subset in a green or yellow box. If there are $k$ subsets, there are $S(7,k)$ ways to partition the balls and $2^k$ ways to choose green or yellow, where $S(n,k)$ is a Stirling number of the second kind. Therefore, the number of ways is $$ \sum_{1\le k\le 7} S(7,k) 2^k=14214. $$

share|improve this answer

Another approach would be to first choose $k$ balls that go in green boxes, then multiply the two Bell numbers that count the ways of partitioning the balls in green and yellow boxes:

$$ \sum_{k=0}^7\binom7kB_kB_{7-k}=14214. $$

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.