Probability of putting 12 distinguishable objects in to 10 distinguishable boxes subject to certain conditions Twelve distinguishable objects are to be randomly put into ten distinguishable boxes so that no box is empty and no box contains three objects. What is the probability of this?
My reasoning is as follows- The only case possible that respects the constraints is one in which some two boxes contain two objects each. So number of ways of this occurrence is $\binom{10}{2}$ (number of ways to choose some two boxes) x $\binom{12}{4}$ (number of ways to choose 4 objects from out of 12 objects that will go into the 2 boxes chosen previously) x 6 (number of ways in which the four objects chosen previously can go into the 2 boxes chosen previously) x 8! (number of ways in which the remaining 8 objects can be arranged in the remaining 8 boxes). The total number of ways of putting the objects into the boxes without any constraint is $10^{12}$.
So required probability = $\frac{\binom{10}{2} \times \binom{12}{4} \times 6 \times 8!}{ 10^{12}}$
Is this reasoning correct?
 A: Your answer is correct.  Here is another method of counting the favorable cases.
Choose which two of the ten boxes will receive two balls.  Select which two of the $12$ balls will be placed in the leftmost of those boxes.  Select which two of the remaining $10$ balls will be placed in the rightmost of those boxes.  Arrange the remaining eight balls in the remaining eight boxes.
$$\binom{10}{2}\binom{12}{2}\binom{10}{2}8!$$
Since there are $10$ possible choices for each of the $12$ balls, the probability that twelve distinguishable objects will be placed randomly in ten distinct boxes so that no box is left empty and no box contains three objects is
$$\frac{\dbinom{10}{2}\dbinom{12}{2}\dbinom{10}{2}8!}{10^{12}}$$
A: The probability is given by $\frac{\text{number of positive events}}{\text{total events}}$.
The problem is equivalent to the number of surjective functions $f:A\to B$ such that $|A|=12$ and $B=10$, with the constraint on the assignations given by "no more than two".
You use PIE to solve it: total number of surjective functions - number of functions which do not satisfy the constraint.
The number of surjective functions is $$\sum_{k=0}^{10}(-1)^k\binom{10}{k}(10-k)^{12}.$$
Whereas the number of functions which do not satisfy the constraint is $$\binom{10}{1}\binom{12}{3}9!$$ and it is obtained from assigning three elements of $A$ to a single element in $B$ (thus $\binom{10}{1}\binom{12}{3}$ ways) multiplied by the number of all the other possible remaining surjective functions $f:A'\to B'$ with $|A'|=9$ and $|B'|=9$, which are therefore bijective.
Thus, $$\sum_{k=0}^{10}(-1)^k\binom{10}{k}(10-k)^{12}-\binom{10}{1}\binom{12}{3}9!=\binom{10}{2} \binom{12}{4} 6 \cdot8!$$ is your numerator, so your answer is correct.
A: I haven't checked whether that is correct or not but I may have a simpler way to do this:
We just have to choose $2$ objects out of $12$ and $2$ boxes out of $10$ which will contain more than one object. The remaining $10$ object can be arranged in $10$ boxes in $10!$ ways.
Thus the total number of ways to carry out this task would be $\dfrac{\binom{12}{2}\binom{10}{2}10!}{2}$ (since both objects and boxes are distinguishable).
$\therefore P(\text{required})=\dfrac{\binom{12}{2}\binom{10}{2}10!}{2\times10^{12}}$
