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?

Guest May 24, 2014

#4**+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. '

https://answers.yahoo.com/question/index?qid=20100226154058AASnDH8

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

Since my head started spinning with d). I googled the answer for d)

'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'

https://answers.yahoo.com/question/index?qid=20130115003939AAKJtTP

I hope this helps

reinout-g
May 24, 2014

#1**+10 **

Your constraints are inconsistent.

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?

Alan
May 24, 2014

#3**+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...

reinout-g
May 24, 2014

#4**+23 **

Best Answer

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. '

https://answers.yahoo.com/question/index?qid=20100226154058AASnDH8

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

Since my head started spinning with d). I googled the answer for d)

'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'

https://answers.yahoo.com/question/index?qid=20130115003939AAKJtTP

I hope this helps

reinout-g
May 24, 2014

#5**+5 **

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!

Alan
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. '

https://answers.yahoo.com/question/index?qid=20100226154058AASnDH8

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

Since my head started spinning with d). I googled the answer for d)

'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