1
$\begingroup$

How many ways can you distribute n balls into k boxes so that every box has an even number of balls?

Well, so far I think than n must be an even number. And I know that it basically starts with a simple equation:

$$x_1 + x_2 + x_3 + \cdots + x_k = n$$ where $$x_i\equiv 0\pmod 2$$ Normally I would use a combination with repetition but since there has to be an even number of balls in every box I don't know what to do.

$\endgroup$

2 Answers 2

2
$\begingroup$

Of course $n$ must be even. Then distribute $\frac{n}{2}$ balls over $k$ boxes (no conditions) and double the amounts in all boxes. This gives all such even distibutions and so the problem is equivalent to the $\frac{n}{2}$ over $k$ boxes problem for even $n$. For $n$ odd there are no solutions.

$\endgroup$
1
  • $\begingroup$ Thank you very much, that's exactly what I was thinking. $\endgroup$
    – Karol
    Commented Feb 20, 2020 at 11:27
1
$\begingroup$

Hint: Let $n = 2m$. Let $x_i = 2y_i$, $1 \leq i \leq k$. Then \begin{align*} x_1 + x_2 + x_3 + \cdots + x_k & = n\\ 2y_1 + 2y_2 + 2y_3 + \cdots + 2y_k & = 2m\\ y_1 + y_2 + y_3 + \cdots + y_k & = m \end{align*} which is an equation in the nonnegative integers.

$\endgroup$
3
  • $\begingroup$ That's exactly what I was thinking about doing, I've been actually editing question and I wanted to put this as my proposition. $\endgroup$
    – Karol
    Commented Feb 20, 2020 at 11:25
  • 1
    $\begingroup$ Well, you were on the right track then. $\endgroup$ Commented Feb 20, 2020 at 11:26
  • $\begingroup$ Thank you very much $\endgroup$
    – Karol
    Commented Feb 20, 2020 at 11:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .