Number of solutions

Find the number of solution of x 1 + x 2 + x 3 + x 4 = 1 x_{1}+x_{2}+x_{3}+x_{4}=1 in integers between 3 -3 and 3 3 inclusive

Also see JEE Probability

Do like and share


The answer is 224.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

2 solutions

Let x i = 3 + y i , y i 0 x_i = -3 + y_i, y_i \geq 0 for i = 1 , , 4 i = 1, \ldots, 4 . Substituting into the original equation yields y 1 + y 2 + y 3 + y 4 = 13 y_1 + y_2 + y_3 + y_4 = 13 The number of non-negative integral solutions to the equation above is ( 13 + 3 3 ) = 560 \binom{13 + 3}{3} = 560 . Since the problem requires that y i 6 y_i \leq 6 , we have to find the number of solutions violating that requirement. Notice that only one variable at a time can violate the requirement.

So let us consider the case where one of the variables, say y 1 y_1 is greater than 6. We express this by letting y 1 = 7 + z 1 y_1 = 7 + z_1 where z 1 0 z_1 \geq 0 , and get z 1 + y 2 + y 3 + y 4 = 6 z_1 + y_2 + y_3 + y_4 = 6 The number of non-negative solutions to the equation above is ( 6 + 3 3 ) = 84 \binom{6 + 3}{3} = 84 . We apply the same argument to y 2 , y 3 y_2, y_3 and y 4 y_4 , respectively.

So the number of solutions to x 1 + x 2 + x 3 + x 4 = 1 , x i { 3 , , 3 } x_1 + x_2 + x_3 + x_4 = 1, \quad x_i \in \{-3, \ldots, 3\} is ( 16 3 ) 4 ( 9 3 ) = 224 \binom{16}{3} - 4\cdot \binom{9}{3} = \boxed{224}

Bill Bell
Aug 25, 2015

A slight alteration to this script would provide a list of the solutions too.

1
2
3
4
5
6
7
8
9
from itertools import product

poss=range(-3,4)

count=0
for x in product(poss,poss,poss,poss):
    count+=sum(x)==1

print count

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...