0

I've been learning about combinatorics, and up until now I have an okay understanding of generating functions and some basic situations like putting (in)distinguishable balls into (in)distinguishable boxes. The following problem stumps me, however: If we are given $n$ distinguishable balls and $k$ distinguishable boxes, in how many ways can we put the balls into the boxes, given that we are only allowed to put an even amount of balls into any given box? I tried writing out a couple of small cases to see if I could find a pattern, but this didn't get me far: could I use (exponential) generating functions here?

RobPratt
  • 45,619
Goon
  • 51
  • @user2661923 You've got the wrong idea. As you can see in the answers to this equivalent problem, exponential generating functions are indispensable in answering this question. I was able to solve it "intuitively", but it was way harder than the generating function method. – Mike Earnest Feb 23 '22 at 22:44
  • @goon The top answer to the duplicate tells you the number of strings of length $n$ with elements in ${1,\dots,k}$ where every $i\in {1,\dots,k}$ appears an even number of times. This is equivalent to your problem; there are both $k^n$ strings of length $n$ and $k^n$ ways to put $n$ distinct balls in $k$ distinct boxes. – Mike Earnest Feb 23 '22 at 22:49
  • @MikeEarnest Nice catch, thanks. I have deleted my comments. I misread the question, and presumed that the OP intended that each box get exactly the same number of balls. That is, if $n = 9, k = 3$, I wrongly assumed that each of the $3$ boxes was to get exactly $3$ balls. – user2661923 Feb 23 '22 at 22:56

0 Answers0