[Math] How many ordered quadruples $(a,b,c,d)$ satisfy $a+b+c+d=18$ under various conditions

combinatoricsinteger-partitions

part (a)

How many ordered quadruples $(a,b,c,d)$ satisfy
$$a+b+c+d=18,$$
where $a,b,c,d$ are nonnegative integers?

(part (b)
How many ordered quadruples $(a,b,c,d)$ satisfy
$$a+b+c+d=18,$$
where $a,b,c,d$ are odd positive integers?

part (c)

How many ordered quadruples $(a,b,c,d)$ satisfy
$$a+b+c+d=18,$$
where $a,b,c,d$ are integers such that $|a|,\ |b|,\ |c|,\ |d|$ are each at most $10$?

For part (a) I counted the number of positive quadruples which is 18+4=22 so it would be 21C3 = 1330 ways to do that. But, I'm not sure how to do part (b) or (c).

Best Answer

Part (a): read about stars and bars

$\binom{18+4-1}{4-1}$

Part (b)

$a=2p+1 , b=2q+1 , c=2r+1 , d=2s+1$

$p+q+r+s=7$

Stars and bars again

$\binom{7+4-1}{4-1}$

Part (c)

Continuing Brian’s solution, $a+10=w , b+10=x , c+10=y , d+10 = z$

$w+x+y+z=58$ where all four are at most 20.

Quadruples with at least one greater than 20:divide 37 into 4 and then add 21 to one of the four numbers

$\binom{37+4-1}{4-1}\times 4$

Quadruples with two greater than 20: divide 16 into 4 and then add 21 to two of the four numbers

$\binom{16+4-1}{4-1}\times\binom{4}{2}$

Last we use principle of inclusion and exclusion

$\binom{58+4-1}{4-1}-\binom{16+4-1}{4-1}\times 4 + \binom{16+4-1}{4-1}\times\binom{4}{2}$