# Number of Integer solutions for this optimization problem

What is the number of integer solutions to the problem $$\sum_{i=1}^{i=k}x_i = n$$ subject to $\forall_i\ \ x_i \ge 0$

note This should hold for both cases $k < n$ and $k \ge n$

• Is order of the $x_i$'s important? – Dan Sep 14 '14 at 11:25
• @Dan, yes its important – bistaumanga Sep 14 '14 at 11:29

This is given by the formula $$CC_k^n = {n+k-1 \choose n}$$
• so is this problem equivalent to distributing $n$ distinct balls into $k$ distinct boxes? – bistaumanga Sep 14 '14 at 11:58
• $n$ similar balls into $k$ distinct boxes – Snufsan Sep 14 '14 at 12:03