We are given $N$ boxes and $M$ balls. We are required to find he number of ways of distributing the balls into the boxes such that each box has even number of balls.
We consider each ball to be distinct. Similarly, each box is distinct.
For examples : if $N = 2$, $M = 4$, then the answer is $8$. The possible ways are :
{{}, {1, 2, 3, 4}}
{{1, 2}, {3, 4}}
{{1, 3}, {2, 4}}
{{1, 4}, {2, 3}}
{{2, 3}, {1, 4}}
{{2, 4}, {1, 3}}
{{3, 4}, {1, 2}}
{{1, 2, 3, 4}, {}}
Please help me find some closed formula for it.
If you have $m$ equal balls and thus $m/2$ equal pairs of balls and $n$ different boxes.
Hence you have to put all the pairs in line, and make $n-1$ splits from 1 to $m/2$.
The $i$ split goes into the $i+1$ box. The nonsplitted first set goes to the 1st box.
If a ball is chosen twice, the corresponding box for that split is empty: you are selecting no box for that split.
Hence the arrangement leads to: $$ {m \choose n-1} $$ combinations.
I dont believe there is a closed solution for different balls (yet!).