# Distributing objects in boxes

In how many way can we distribute: 7 objects in 3 boxes; provided that: 1) objects are distinct, boxes are distinct and boxes may be empty; 2) objects are distinct, boxes are distinct and boxes may not be empty; 3) objects are identical, boxes are distinct and boxes may be empty; 4) objects are identical, boxes are identical and boxes may not be empty; 5) objects are distinct, boxes are identical and boxes may be empty; 6) objects are distinct, boxes are identical and boxes may not be empty.

(I should provide all this 6 options)

-
–  Austin Mohr May 8 '13 at 20:03
Your question is phrased as an isolated problem, without any further information or context. This does not match many users' quality standards, so it may attract downvotes, or be (temporarily) closed. To prevent that, please edit the question. This will help you recognise and resolve the issues. Concretely: please provide context, and include your work and thoughts on the problem. These changes can help in formulating more appropriate answers. –  Lord_Farin May 8 '13 at 20:50

Some pointers:

1. For each object you must make a $3$-way choice of box; there are $7$ objects, and the choices are independent, so there are $3^7$ ways to make them.

2. Start with the answer to (1) and subtract the unwanted distributions. You’ll want an inclusion-exclusion argument for this.

3. This is a standard stars-and-bars problem; the linked article has both a formula for the answer and a reasonably explanation of why the formula is correct.

4. This is the number of partitions of $7$ into $3$ parts. You can find it most easily by brute force.

5. This is ${7\brace 3}+{7\brace 2}+{7\brace 1}$; see (6) below.

6. This is $7\brace 3$, a Stirling number of the second kind. These numbers satisfy a nice recurrence, so $n\brace k$ is not hard to compute for small $n$ and $k$.

-
Nice solution..... –  juantheron Oct 8 '13 at 18:30