60 kids riding 20 different trains while each train has 4 seats the order inside the train matters. I have the following question :
60 kids riding 20 different trains while each train has 4 seats the order inside the train matters. how many possibilities are there to sit the kids in the trains while $m$ trains are full, the rest of the trains $(20-m)$ could be full or not.
This is what I did :
$$\binom{20}{m}*\binom{60}{4m}*(4m)!*\binom{80-4m}{60-4m}*(60-4m)!$$
$\binom{20}{m}$ - Choose $m$ full trains
$\binom{60}{4m}*(4m)!$ - Choose 4m kids of the 60 kids and the possibilities to sit them, to fulfill the $m$ trains full.
$\binom{80-4m}{60-4m}*(60-4m)!$ - Choose the rest of kids, and the possibilities to sit them.
My friend tend to think that my solution counts rehearsals of possibilities, I don't think so, I'll be glad to check my solution to know if it correct or not.
Thank you!
 A: Your friend is right and here is why:
Let's say $m=10$, and let's say you choose train # 1, 2, 3, 4, 6, 7, 8, 9, 10, 11 to be full. Then when you go through all the possible ways to seat the rest of the kids, some of these possibilities will include train #5 being full, leading to train # 1-11 being full. Then if you the next time chose train # 1-10 to be full, and you go through all possible ways of seating the rest of the kids, some of those possibilities will include train # 11 being full, leading to the combinations of trains 1-11 being full once again being counted.
The correct answer is: (It has been tested and works satisfyingly.)
$$60! * \sum_{x_4=m}^{cyc(r_4,4)} \left[\binom{i_4}{x_4} * \binom{4}{4}^{x_4} * \sum_{x_3=start(r_3, i_3*2)}^{cyc(r_3, 3)} \left[\binom{i_3}{x_3} * \binom{4}{3}^{x_3} * \\ \sum_{x_2=start(r_2,i_2*1)}^{cyc(r_2,2)}\left[\binom{i_2}{x_2} * \binom{4}{2}^{x_2} *  \sum_{x_1=start(r_1,i_1*0)}^{cyc(r_1,1)} \binom{i_1}{x_1} * \binom{4}{1}^{x_1}\right]\right]\right]  $$
Where: 
$r_n = 60 - \sum_{m=n+1}^4 k_m * m$
(The number of remaining occupied seats to distribute over all possible seats, if the seats already distributed in trains with exactly $n+1$ or more seats distributed are subtracted.)
$i_n = 20 - \sum_{m=n+1}^4 k_m$
(That is, the remaining number of trains, when those with more than $n$ seats occupied in the current distribution are subtracted.)
$x_n =$ The number of trains with exactly n seats occupied in the current distribution (of occupied seats over all possible seats) being summed.   
$cyc(a,b) =$ The integer part of the result of $a/b$
$start(a,b) = a-b $ when $a >= b$ and $start(a,b) = 0 $ when $ a <b$
When you have a certain number of trains with four seats occupied, a number with three seats occupied, and a number with two seats occupied, there will only be one possibility concerning the number of trains with one seat occupied, and that will always be equal to the remaining occupied seats to distribude/ the remaing number of kids to seat. Therefore, the sigma iterating possible $x_1$ values can be simplified away in this manner:
$$60! * \sum_{x_4=m}^{cyc(r_4,4)} \left[\binom{i_4}{x_4} * \binom{4}{4}^{x_4} * \sum_{x_3=start(r_3, i_3*2)}^{cyc(r_3, 3)} \left[\binom{i_3}{x_3} * \binom{4}{3}^{x_3} * \\ \sum_{x_2=start(r_2,i_2*1)}^{cyc(r_2,2)}\left[\binom{i_2}{x_2} * \binom{4}{2}^{x_2} *  \binom{r_1}{i_1} * \binom{4}{1}^{r_1}\right]\right]\right]  $$
Explanation
The problem consists of two distributions:
1) The number of ways that the 60 occupied seats can be distributed over the total 80 seats.
2) The number of ways that 60 unique kids can be distributed over 60 occupied seats.
These two numbers must be multiplied by one another. Number #2 is equal to $60!$, hence this factorial leading the formula. Number #1 is trickier to compute, and consists of all the sigmas.
The different ways that the occupied seats can be distributed can be divided into groups, depending on how many trains have 4 seats occupied, how many have 3 seats occupied, and so on. Each such group of distributions must be summed individually because it has a unique number of distributions contained within it. 
The nested sigmas iterates through all possible combinations of $x$-values. ($x_n$ is the number of trains with exactly $n$ seats occupied in the current group of distributions being summed.) 
After each sigma, two numbers of distributions are multiplied together. The first one is the number of ways that the (current number of trains with $n$ occupied seats) can be distributed over the remaining trains. 
The second factor after each sigma is the number of ways that $n$ occupied seats can be distributed on each train, raised to the power of the number of trains that has exactly this amount of seats occupied (in the current group of distributions being summed).
