SOLUTION: How many solution does the equation {{{ x_1+x_2+x_3+x_4=1 }}} in integers between {{{ -3 }}} and {{{ 3 }}} ?

Algebra ->  Permutations -> SOLUTION: How many solution does the equation {{{ x_1+x_2+x_3+x_4=1 }}} in integers between {{{ -3 }}} and {{{ 3 }}} ?      Log On


   



Question 1171151: How many solution does the equation +x_1%2Bx_2%2Bx_3%2Bx_4=1+ in integers between +-3+ and +3+ ?
Answer by greenestamps(13200) About Me  (Show Source):
You can put this solution on YOUR website!


****************************************************

The student responded to my original response saying that he wrote a computer program to find the correct answer, which he says is 224.

My original response was an attempt to show a solution using logical analysis and mathematics -- not a computer.

My approach was valid; but my counting of the number of ways was flawed. I have corrected those numbers and have come up with a new answer that agrees with his.

I have corrected my response below....

****************************************************

I was waiting to see if another tutor would come up with a clever way to find the answer....

Not seeing that happening, here is the solution I came up with....

-------------------------------------------------------------------

Use a "greedy" algorithm, where you make an ordered list with the entries higher in the list using more of the larger numbers.

To make sure you don't duplicate entries in the list, require that the four numbers be listed in non-increasing order.

Then, for each of the sets of 4 numbers you find, determine the number of different arrangements of those 4 numbers.

 pattern  requirement  4-tuples  # of arrangements
 -------------------------------------------------
(3,3,a,b): a+b=-5: (3,3,-2,-3)   cross%286%29  12

(3,2,a,b): a+b=-4: (3,2,-1,-3)  cross%2812%29  24
                   (3,2,-2,-2)  cross%286%29   12

(3,1,a,b): a+b=-3: (3,1,0,-3)   cross%2812%29  24
                   (3,1,-1,-2)  cross%2812%29  24

(3,0,a,b): a+b=-2: (3,0,0,-2)    cross%286%29  12
                   (3,0,-1,-1)  cross%28+6%29  12

(2,2,a,b): a+b=-3: (2,2,0,-3)   cross%28+6%29  12
                   (2,2,-1,-2)   cross%286%29  12

(2,1,a,b): a+b=-2: (2,1,1,-3)    cross%286%29  12
                   (2,1,0,-2)   cross%2812%29  24
                   (2,1,-1,-1)   cross%286%29  12

(2,0,a,b): a+b=-1: (2,0,0,-1)    cross%286%29  12

(1,1,a,b): a+b=-1: (1,1,1,-2)    cross%286%29   4
                   (1,1,0,-1)   cross%28+6%29  12

(1,0,a,b): a+b=0:  (1,0,0,0)     4
------------------------------------------------------
        total number of ways:  cross%28118%29 224


ANSWER: There are cross%28118%29 224 different ordered 4-tuples of integers between -3 and 3 with a sum of 1.