In how many ways we can distribute 7 distinct balls among 3 students such that everyone gets at least 2 balls?

We must give three balls to one student and two to the two others. There are $3$ ways to choose which student will get three balls, and then ${7\choose3}$ ways to choose which balls he will get. Distinguish one the remaining students. There are ${4\choose2}$ ways to determine which $2$ of the remaining $4$ balls he will get, giving in all$$3{7\choose3}{4\choose2}=630$$ ways.


There are $\binom{7}{2}$ ways of giving two balls to the first student.

There are $\binom{5}{2}$ ways of giving two balls to the second student.

There are $\binom{3}{2}$ ways of giving two balls to the third student.

Lastly, the last ball can be given to any student, so there are $\binom{3}{1}$ ways to give him.

However, there are repeated cases. For example, the case that we give ball 1&2, 4&5, 6&7 to the first, second, last student respectively and the ball 3 is given to the first student is the same as the case that we give ball 1&3, 4&5, 6&7 to the first, second, last student respectively and the ball 2 is given to the first student. Each case way has appeared $\binom{3}{2}$ times.

Therefore, the answer is $\dfrac{\binom{7}{2}\binom{5}{2}\binom{3}{2}\binom{3}{1}}{\binom{3}{2}}=\boxed{630}$


There are $3^7$ ways of distributing the balls, ignoring the restriction. Now how many ways do we have to subtract off because the restriction is violated?

Student A could get zero balls. The remaining balls can then be distributed in $2^7$ ways to students B and C.

Student A could get exactly one ball, in $7$ ways. The remaining balls can then be distributed in $2^6$ ways to students B and C. So far, we need to subtract $2^7 + 7\cdot 2^6 = 9\cdot 64 = 576$ possibilities. Naively, you could jump ahead and subtract a total of $27\cdot 64$ balls, but that would be a mistake.

Student B could get zero balls. The remaining balls can then be distributed in $2^7$ ways to students A and C, but you don't want to double subtract the case where zero balls were distributed to each of A and B, or where A got one ball. So you have to add back in $1$ distribution case for $A$ getting no balls, and $7$ cases where $A$ got one ball.

Student B could get one ball, in $7$ ways. Again, you don't want to double subtract the case where one ball was distributed to each of A and B, or where A got no balls and B got 1.

In the end, you tabulate your answer as follows:

  • $3^7 = 2187$ total cases.

  • Minus $3$ (who got shorted) times $576$ ways to short a particular student.

  • Add back $3$ times $1$ way to give all the balls to one student.

  • Add back $6$ times $7 = 42 $ ways to give one ball to one student and no balls to another.

  • Add back $3$ times $7\cdot 6 = 3 \cdot 42 = 126$ ways to give two students one ball apiece.

If there were a way to triply violate the conditions you would have to subtract that back out, but there isn't in this problem.

The total is $$ 2187 - 1728 +3+42+126 = 630 $$ ways to distribute the balls.

Of course, with the insight that the distribution must be some variant on $(3,2,2)$ the problem becomes much less messy, as in the previous answer. But this include/exclude method generalizes without requiring that insight.