What is the number of integral solutions to the following equation? $$ a+b+c+d+e = 18 $$
Here, $a,b,c,d,e$ all are variables and can take zero and positive integers values. That means $a,b,c,d,e$ are all positive integers and can take zero values .
What is the number of integral solutions to the following equation? $$ a+b+c+d+e = 18 $$
Here, $a,b,c,d,e$ all are variables and can take zero and positive integers values. That means $a,b,c,d,e$ are all positive integers and can take zero values .
Let's assume first that your numbers are positive (non-zero) integers; there is a combinatorial theorem that gives the solution to this problem:
For any pair of positive integers $n$ and $k$, the number of distinct $k$-tuples of positive integers whose sum is $n$ is given by $n-1 \choose k-1$.
This is true since, as user Gamma Function suggests in a comment, if we take your sum $18$ to be $18$ stars
$$\star \star \star \star \star \star \star \star \star \star \star \star \star \star \star \star \star \star$$
there will be $17$ gaps in them in which you can put $4$ bars to divide the stars in $5$ subsets, namely your $5$ integers
$$\star \star | \star \star \star | \star \star \star \star \star | \star \star \star \star \star \star \star | \star$$
In how many different ways you can do this? Well, the same numbers of ways you would do choosing a $4$-element subset from a $17$-element set. That is, $17 \choose 4$ $= 2380$; generally speaking, this is $n-1 \choose k-1$.
Supposing now that your integers can be $0$, you can bring back the problem to the one discussed above, by just manipulating your equation:
$$(a+1) + (b+1) + (c+1) + (d+1) + (e+1) = (18+1+1+1+1+1)$$
that is to say,
$$a' + b' + c' + d' + e' = 23$$
Now the problem is identical to the first one: in particular, the number of integers $k$ remains the same, while $n$ becomes $n+k$. Therefore, the number of integer solutions to your equation is exactly $18+5-1=22 \choose 4$ $= 7315$; generally speaking, this is $n+k-1 \choose k-1$: in fact, it's as if in the star drawing you're assuming that the object in whose gaps are to place bars are both stars and bars, so they are $n+k$ instead of just $n$.