We help IT Professionals succeed at work.

Using only non negative numbers

mustish1
mustish1 asked
on
Hi guys: Can any one please explain this question? Thanks

How many solutions (using only non-negative integers) are there to the following equation ?
x1+x2+x3+x4+x5+x6+x7=20

Ans: C(26,6)=230,230
Comment
Watch Question

ozo
CERTIFIED EXPERT
Most Valuable Expert 2014
Top Expert 2015

Commented:
There are C(26,6) ways to arrange 20 x's and 6 + signs in a row
each of which will produce a different solution to the equation
Dave BaldwinFixer of Problems
CERTIFIED EXPERT
Most Valuable Expert 2014
Commented:
Ignore the letter 'x', it could be misleading.  There are 7 variables or values, x1 thru x7, that you can manipulate to get them to add up to 20.  Call them A,B,C,D,E,F, and G instead.  If A = 20, then all the rest are 0.  If any one of them = 20, then all the rest are 0.  If A = 19, then one of them = 1 and the rest are 0.  If you kept on with that pattern, you could make a chart of all the values.  I'm sure there is a more elegant way to calculate it but that is the basic idea.
CERTIFIED EXPERT
Most Valuable Expert 2014
Top Expert 2015
Commented:
>  If any one of them = 20, then all the rest are 0.
xxxxxxxxxxxxxxxxxxxx++++++
+xxxxxxxxxxxxxxxxxxxx+++++
++xxxxxxxxxxxxxxxxxxxx++++
+++xxxxxxxxxxxxxxxxxxxx+++
++++xxxxxxxxxxxxxxxxxxxx++
+++++xxxxxxxxxxxxxxxxxxxx+
++++++xxxxxxxxxxxxxxxxxxxx
> If A = 19, then one of them = 1 and the rest are 0.
xxxxxxxxxxxxxxxxxxx+x+++++
xxxxxxxxxxxxxxxxxxx++x++++
xxxxxxxxxxxxxxxxxxx+++x+++
xxxxxxxxxxxxxxxxxxx++++x++
xxxxxxxxxxxxxxxxxxx+++++x+
xxxxxxxxxxxxxxxxxxx++++++x
> If you kept on with that pattern
you would list all C(26,6) ways to arrange 20 x's and 6 +'s

Author

Commented:
Thanks ozo. Can you please tell me why there is 7 rows group and then its going to 6 rows group
ways to arrange 20 x's and 6 + signs in a row

That shows a good understanding of math. I'm no math expert, so it took some thought to see how it applied. But it's an excellent restatement of the problem. Nice.

Tom
ozo
CERTIFIED EXPERT
Most Valuable Expert 2014
Top Expert 2015

Commented:
> why there is 7 rows group and then its going to 6 rows group
I'm not sure what you mean.  there are always 7 groups of x's separated by +'s
(some of the groups may contain 0 x's, as long as the number of x's is a non-negative integer)
ozo
CERTIFIED EXPERT
Most Valuable Expert 2014
Top Expert 2015

Commented:
> why there is 7 rows group and then its going to 6 rows group
I think I understand what you mean now.
There are 7 examples of "If any one of them = 20, then all the rest are 0" and 6 examples of "If A = 19, then one of them = 1 and the rest are 0."

Author

Commented:
ok thanks ozo.

Explore More ContentExplore courses, solutions, and other research materials related to this topic.