+0

# How many solutions are there to the equation x1 + x2 + x3 + x4 + x5 = 21, where xi , i = 1, 2, 3, 4, 5, is a nonnegative integer such that a

+45
41
25813
5

How many solutions are there to the equation x1 + x2 + x3 + x4 + x5 = 21, where xi , i = 1, 2, 3, 4, 5, is a nonnegative integer such that a) x1 ≥ 1? b) xi ≥ 2 for i = 1, 2, 3, 4, 5? c) 0 ≤ x1 ≤ 10? d) 0 ≤ x1 ≤ 3, 1 ≤ x2 < 4, and x3 ≥ 15?

May 24, 2014

#4
+2353
+23

Allright so I found some answers online and I'm going to combine them to give you a proper answer;

'How many solutions total are there to x1 + x2 + x3 + x4 + x5 = 21 ?

Imagine you have 21 "objects" which we can represent with the letter o:

o o o o o o o o o o o o o o o o o o o o o

I think that's 21 of them. Now, how do we divide them up into 5 non-negative values? Just split them up into five sections. The way to do that is just like this:

o o o o | o o o o | o o o o o o |o o o o o | o o

That corresponds to the solution x1=4, x2=4, x3=6, x4=5, x5=2

Now how many ways can you do that? There are 20 viable places for the separator marks -- anywhere between the 21 o's. So you pick a place for four of them -- 20C4.

But those are the solutions with positive values -- you want non-negative values.

How can we compensate for that? Well, we can reduce this to a different problem.

If I want to solve things with non-negative values x1,x2,..,x5, I can simply consider some positive number y1 and then let x1=y1-1. That will produce all non-negative possibilities.

So you just solve:

x1 + x2 + x3 + x4 + x5 = 21
(y1 - 1) + (y2 - 1) + (y3 - 1) + (y4 - 1) + (y5 - 1) = 21
y1 + y2 + y3 + y4 + y5 = 26

So now y1,y2,..,y5 are positive solutions -- we've just "transformed" the problem into a problem we know the answer to, just with different parameters. The answer is 25C4 instead of 20C4. '

25C4 = 12650 possibilities

Now for part a) of your question;

Let z1 = x1-1 and zi = xi for i = 2,3,4,5.

Then x1+x2+x3+x4+x5 = 21 => z1+1+z2+z3+z4+z5 =21 => z1+z2+z3+z4+z5 = 20

Similarly this has 24C4= 10626 solutions

part b) can be solved in the same way leading to 15C4 = 1365 solutions

For part c). The number of solutions with x1<=10 is the total number of solutions minus the solutions where x1>=11. Then again it can be solved in a similar matter.

This leads to 25C4-14C4 = 12650 - 1001 = 11649 solutions

'The solution could also be found using combinations with repetitions,
The solution is equal to a combination of putting 21 elements in 5 boxes(consider each variable a box).
Hence there are 21 elements and 4 borders x1 | x2 | x3 | x4 | x5 where the elements and borders could be combined in different ways.
as x3>=15, the solution could be simplified to 6 elements in 4 borders ( 5 boxes) ; for which the solution is C(10,6)
Now for the remaining conditions, subtract the case when x1>3 and when x2>3 , which is 2*C(6,2)
The final step is to subtract the case when x2=0 , which is tricky because when you take x2=0, there are now 6 elements to fill in 3 borders (4 boxes) and you also have to consider the case when x2=0 and x1>3, the value for which was already subtracted previously.
So in essence the final step would be C(9,6) - C(5,2) (All combinations when x2=1 - All combinations when x2=1 and x1>3)

The final solution is the C(10,6)-C(6,2)-C(6,2)-(C(9,6)-C(5,2)) = 106'

I hope this helps

May 24, 2014

#1
+27396
+10

a) constrains x1 to be greater than zero; c) allows it to be zero.

b) constrains x2 to be greater than 1; d) allows it to be 1.

Which constraints apply?

May 24, 2014
#3
+2353
+18

I'm still thinking about the simplest way to solve this, but I think these are seperate questions Alan.Since the values need to be nonnegative integers there's a limited amount of solutions for each case...

May 24, 2014
#4
+2353
+23

Allright so I found some answers online and I'm going to combine them to give you a proper answer;

'How many solutions total are there to x1 + x2 + x3 + x4 + x5 = 21 ?

Imagine you have 21 "objects" which we can represent with the letter o:

o o o o o o o o o o o o o o o o o o o o o

I think that's 21 of them. Now, how do we divide them up into 5 non-negative values? Just split them up into five sections. The way to do that is just like this:

o o o o | o o o o | o o o o o o |o o o o o | o o

That corresponds to the solution x1=4, x2=4, x3=6, x4=5, x5=2

Now how many ways can you do that? There are 20 viable places for the separator marks -- anywhere between the 21 o's. So you pick a place for four of them -- 20C4.

But those are the solutions with positive values -- you want non-negative values.

How can we compensate for that? Well, we can reduce this to a different problem.

If I want to solve things with non-negative values x1,x2,..,x5, I can simply consider some positive number y1 and then let x1=y1-1. That will produce all non-negative possibilities.

So you just solve:

x1 + x2 + x3 + x4 + x5 = 21
(y1 - 1) + (y2 - 1) + (y3 - 1) + (y4 - 1) + (y5 - 1) = 21
y1 + y2 + y3 + y4 + y5 = 26

So now y1,y2,..,y5 are positive solutions -- we've just "transformed" the problem into a problem we know the answer to, just with different parameters. The answer is 25C4 instead of 20C4. '

25C4 = 12650 possibilities

Now for part a) of your question;

Let z1 = x1-1 and zi = xi for i = 2,3,4,5.

Then x1+x2+x3+x4+x5 = 21 => z1+1+z2+z3+z4+z5 =21 => z1+z2+z3+z4+z5 = 20

Similarly this has 24C4= 10626 solutions

part b) can be solved in the same way leading to 15C4 = 1365 solutions

For part c). The number of solutions with x1<=10 is the total number of solutions minus the solutions where x1>=11. Then again it can be solved in a similar matter.

This leads to 25C4-14C4 = 12650 - 1001 = 11649 solutions

'The solution could also be found using combinations with repetitions,
The solution is equal to a combination of putting 21 elements in 5 boxes(consider each variable a box).
Hence there are 21 elements and 4 borders x1 | x2 | x3 | x4 | x5 where the elements and borders could be combined in different ways.
as x3>=15, the solution could be simplified to 6 elements in 4 borders ( 5 boxes) ; for which the solution is C(10,6)
Now for the remaining conditions, subtract the case when x1>3 and when x2>3 , which is 2*C(6,2)
The final step is to subtract the case when x2=0 , which is tricky because when you take x2=0, there are now 6 elements to fill in 3 borders (4 boxes) and you also have to consider the case when x2=0 and x1>3, the value for which was already subtracted previously.
So in essence the final step would be C(9,6) - C(5,2) (All combinations when x2=1 - All combinations when x2=1 and x1>3)

The final solution is the C(10,6)-C(6,2)-C(6,2)-(C(9,6)-C(5,2)) = 106'

I hope this helps

reinout-g May 24, 2014
#5
+27396
+4

Your interpretation of the question makes sense, Reinout.  I'm glad I didn't think of that interpretation or it would have been my head that was spinning!

May 25, 2014
#5
0

Allright so I didnt find some answers online and I'm going to combine them to give you a proper answer;

'How many solutions total are there to x1 + x2 + x3 + x4 + x5 = 21 ?

Imagine you have 21 "objects" which we can represent with the letter o:

o o o o o o o o o o o o o o o o o o o o o

I think that's 21 of them. Now, how do we divide them up into 5 non-negative values? Just split them up into five sections. The way to do that is just like this:

o o o o | o o o o | o o o o o o |o o o o o | o o

That corresponds to the solution x1=4, x2=4, x3=6, x4=5, x5=2

Now how many ways can you do that? There are 20 viable places for the separator marks -- anywhere between the 21 o's. So you pick a place for four of them -- 20C4.

But those are the solutions with positive values -- you want non-negative values.

How can we compensate for that? Well, we can reduce this to a different problem.

If I want to solve things with non-negative values x1,x2,..,x5, I can simply consider some positive number y1 and then let x1=y1-1. That will produce all non-negative possibilities.

So you just solve:

x1 + x2 + x3 + x4 + x5 = 21
(y1 - 1) + (y2 - 1) + (y3 - 1) + (y4 - 1) + (y5 - 1) = 21
y1 + y2 + y3 + y4 + y5 = 26

So now y1,y2,..,y5 are positive solutions -- we've just "transformed" the problem into a problem we know the answer to, just with different parameters. The answer is 25C4 instead of 20C4. '

25C4 = 12650 possibilities

Now for part a) of your question;

Let z1 = x1-1 and zi = xi for i = 2,3,4,5.

Then x1+x2+x3+x4+x5 = 21 => z1+1+z2+z3+z4+z5 =21 => z1+z2+z3+z4+z5 = 20

Similarly this has 24C4= 10626 solutions

part b) can be solved in the same way leading to 15C4 = 1365 solutions

For part c). The number of solutions with x1<=10 is the total number of solutions minus the solutions where x1>=11. Then again it can be solved in a similar matter.

This leads to 25C4-14C4 = 12650 - 1001 = 11649 solutions

'The solution could also be found using combinations with repetitions,
The solution is equal to a combination of putting 21 elements in 5 boxes(consider each variable a box).
Hence there are 21 elements and 4 borders x1 | x2 | x3 | x4 | x5 where the elements and borders could be combined in different ways.
as x3>=15, the solution could be simplified to 6 elements in 4 borders ( 5 boxes) ; for which the solution is C(10,6)
Now for the remaining conditions, subtract the case when x1>3 and when x2>3 , which is 2*C(6,2)
The final step is to subtract the case when x2=0 , which is tricky because when you take x2=0, there are now 6 elements to fill in 3 borders (4 boxes) and you also have to consider the case when x2=0 and x1>3, the value for which was already subtracted previously.
So in essence the final step would be C(9,6) - C(5,2) (All combinations when x2=1 - All combinations when x2=1 and x1>3)

The final solution is the C(10,6)-C(6,2)-C(6,2)-(C(9,6)-C(5,2)) = 106'

Guest Jan 24, 2016
{"found_math": false, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 0, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0, "katex": 0, "math-container": 0, "wp-katex-eq": 0, "align": 0, "equation": 0, "x-ck12": 0, "texerror": 0}