How many solutions are there to $x_1+x_2+x_3+x_4=10$ such that for all $0\le x_i\le3$?

64 Views Asked by At

I know the general path is that k=10 and n=4, so it somehow relates to ${13 \choose 3}$.

I know I'm missing a part due to the constraint that all elements are between 0 and 3.

For now, $${13 \choose 3}$$ is as far as I could possibly get.

I'm stuck at a standstill here, I'm looking at problems similar to this yet I'm unable to make the connection.

Thanks in advance.

2

There are 2 best solutions below

2
On BEST ANSWER

Hint:

If some $x$ is $0$, you can't reach $10$. If some $x$ is $1$, the other three are $3$. If some $x$ is $2$, there's only one way to achieve $8$. Hence you permute $1,3,3,3$ and $2,2,3,3$ in all possible ways.

8
On

Well, you can look at it in the reverse way.

Suppose we give $3$ each to them, then we have given a total of $12$

We need to take away $2$ by either taking $2$ from any one of them in $\binom41$ ways, or by taking $1$ each from any two in $\binom4 2$ ways, so....

or we can write $y_1+y_2+y_3+y_4=2, y_i\geq0,$
$y_i$ referring to take away instead of give
and then apply the formula you talked about