# discrete

1 vote
396 views
How many solutions are there to the equation: $X_1+X_2+X_3+X_4+X_5=21$ ?

If $0 \leq X1 \leq 3 , 1 \leq X2 < 4 , X3 \geq 15$

edited
0
What about the constraints on $X_4$ and $X_5$?
0
519??
0
X4,X5>=0
0

OK

( use  star and bar technique  number of solution to  x1 + x2 +  x3 + ....  xN  =   S   =    C(   S +  N - 1  , N - 1  )      where  xi >= 0 )

First   convert x3 >= 15 ,  into x3 >= 0

then x1 + x2 + x3  + x4 + x5  =  21 - 15  =  6

x1 + x2 + x3 + x4 + x5   =   6  where   0 <= x1 <= 3 ,   1 <= x2 <= 3 ,   x3 >= 0 , x4 >= 0 , x5 >= 0

now x3 , x4 , x5 have no constraint on upper bound , we have to focus only on x1 and x2

x1 and x2 have 12 pairs : ( 0 , 1 ) ( 0 , 2 ) ( 0 , 3 ) ( 1 , 1 ) ( 1 , 2 ) ( 1 , 3 ) ( 2 , 1 ) ( 2 , 2 ) ( 2  , 3 ) ( 3 , 1 ) ( 3 ,2 ) ( 3 , 3 )

Min sum they can make is 1 and maximum is 6

Now for each sum find the number of ways they make sum S  and multiply the number of ways x3,x4,x5 make sum (6 -  S)  where 1 <= S <= 6

numeber of ways for x1 and x2 for sum = 1 , 2 , 3 , 4 , 5 , 6   =  (   1 , 2 , 3 ,  3 , 2 , 1 )

final result  =  1 * (  x3 + x4 + x5 = 6 - 1 )  +  2 *  (  x3 + x4 + x5 = 6 - 2 ) +  3 * (  x3 + x4 + x5 = 6 - 3 ) + 3 * (  x3 + x4 + x5 = 6 - 4 ) + 2 * (  x3 + x4 + x5 = 6 - 5 )  +  1 * (  x3 + x4 + x5 = 6 - 6 )

= 1 * C ( 5 + 3 - 1 , 3 - 1 )  + 2 * C ( 4 + 3 - 1 , 3 - 1 )  + 3 * C(3 + 3 - 1 , 3 - 1 )  + 3 * C ( 2 + 3 - 1 , 3  - 1  )  + 2 * C ( 1 + 3 - 1 , 3 - 1 ) +  1 * ( 0 + 3 - 1 , 3 - 1 )

= 1 * 21 +  2 * 15 +  3 * 10 + 3 * 6 +  2 * 3 + 1 * 1 =  21 + 30 + 30 + 18 + 6 + 1 =  106.
0
It's correct. But, I think you should use laTex to make it properly readable.