How many solutions does the equation x + y + w + z = 15 have if x, y, w, z are all non-negative integers? Combinatorics question:
What I tried for solving this problem is (16 - 1 + 4 choose 4). I got 16 from the numbers 0 thought 16 as possible values for x, y , w or z. 
However apparently the answer is (16 - 1 + 3 choose 3). Can someone explain to me where this 3 is coming from since there are 4 variables , x y w z.
 A: Think of $15$ as a sequence of stars. You can insert $3$ bars in any position between them to get a solution, for example $0+3+10+2$ would be represented this way:
$$|\star\star\star|\star\star\star\star\star\star\star\star\star\star|\star\star$$
It should be clear than any permutation of those stars and bars (which is the name of this method by the way) represents a valid solution, so that the total is given by $\frac{18!}{15!3!}$ (permutation of $18$ objects divides in $2$ groups of indistinguishable objects with $15$ and $3$ elements respectively), which, as someone wrote in the comment, is the same as $\binom{15+4-1}{4-1}$
In general stars and bars gives $\binom{n+k-1}{k-1}$ as the number of ways to pick $k$ nonnegative numbers so that their sum is $n$. I personally find it easier to think about it as permutations of stars and bars for a specific case than to remember the general formula
A: The way I remember it is to put the number of $+'s$ at the bottom,
and add it to the required total at top, hence simply $\dbinom{15+3}{3}$
And if the requirement is for positive integers, preplace $1's$ for each variable,
and apply the same formula, so $\dbinom{11+3}{3}$
