Determine the number of integer solutions to:
|x|+ |y| + |z| = 15
Note:
The absolute value function F(x) = |x| is defined as:
x if x ≥ 0
F(x) =
-x if x < 0
If restricted to non-negative integers, the number of solutions would be C(17,2) = 136. If none of these involved zero as a value we could multiply by 8 for the combinations that could be negated. But the count of those that don't involve zeros is C(14,2) = 91, as we need to add 12 in all to the 1's in each variable. This leaves 45 that involve zeros.
Three of the 45 involve two zeros each (x=15, y=15 and z=15), so 42 involve only 1 zero. The three with double zeros need to be multiplied by 2, for positive/negative, and the 42 with only one zero need be multiplied by 4 for the combinations of positive/negative for the two non-zero values.
That's 91*8 + 42*4 + 3*2 = 902.
|
Posted by Charlie
on 2014-02-19 14:16:30 |