My Math Forum

My Math Forum (http://mymathforum.com/math-forums.php)
-   Applied Math (http://mymathforum.com/applied-math/)
-   -   How many solutions are there to the equation? (http://mymathforum.com/applied-math/22714-how-many-solutions-there-equation.html)

Solarmew November 19th, 2011 04:07 PM

How many solutions are there to the equation?
 
ok, this one is really starting to piss me off :( ...

x1 + x2 + x3 + x4 + x5 = 21, x1>=1

i tried all the formulas:

n! (n-r)!
n!/(r!(n-r)!)
(n+r-1)!/(r!(n-1)!) - i think it's this one

but nothing's working or even coming close to the answer ...
i don't get it :(
how do i do this?

Solarmew November 19th, 2011 04:14 PM

Re: How many solutions are there to the equation?
 
is it not 25!/(21!*4!) = 12650?

the answer is 10626, but that's the closest i can get to it :(

Solarmew November 19th, 2011 04:18 PM

Re: How many solutions are there to the equation?
 
24!/(20!*4!) works tho ... :?

is it because x1 is >=1 and not >=0? ...

Solarmew November 19th, 2011 04:48 PM

Re: How many solutions are there to the equation?
 
doesn't work far x_i >=2 ...
so it's not 23!/(19!*4!) ...

the actual answer is 1365

CRGreathouse November 19th, 2011 05:05 PM

Re: How many solutions are there to the equation?
 
Let's call f(n, k) the number of solutions to x1 + ... + xn = k with xi >= 0. You're looking for f(5, 16), since this is what you get by assuming each variable has at least 1. It's clear that f(n, k) = f(n-1, k) + f(n-1, k-1) + ... + f(n-1, 0) since this is just saying that xn can have any value from 0 to k.

So you have
f(5, 16) =
f(4, 16) + f(4, 15) + ... + f(4, 0) =
f(3, 16) + 2f(3, 15) + 3f(3, 14) + ... + 17f(3, 0) =
. . .

You can probably solve it this way. You need to keep track of what the coefficients are at each step, but otherwise it's pretty easy. At the end you can simplify f(1, k) = 1 or f(2, k) = k + 1.

Solarmew November 19th, 2011 05:14 PM

Re: How many solutions are there to the equation?
 
Quote:

Originally Posted by CRGreathouse
You're looking for f(5, 16), since this is what you get by assuming each variable has at least 1. It's clear that f(n, k) = f(n-1, k) + f(n-1, k-1) + ... + f(n-1, 0) since this is just saying that xn can have any value from 0 to k.


could you please explain this a bit more?

Solarmew November 19th, 2011 05:15 PM

Re: How many solutions are there to the equation?
 
Quote:

Originally Posted by CRGreathouse
So you have
f(5, 16) =
f(4, 16) + f(4, 15) + ... + f(4, 0) =
f(3, 16) + 2f(3, 15) + 3f(3, 14) + ... + 17f(3, 0) =
. . .
.

also what equation am i supposed to be using for this?

CRGreathouse November 19th, 2011 06:22 PM

Re: How many solutions are there to the equation?
 
Quote:

Originally Posted by Solarmew
also what equation am i supposed to be using for this?

The one from my post:
f(n, k) = f(n-1, k) + f(n-1, k-1) + ... + f(n-1, 0)

Solarmew November 19th, 2011 06:33 PM

Re: How many solutions are there to the equation?
 
ok, i figured than one out and also the one for x_i >=2, i = 1,2,3,4,5

it's 21-5*2 = 11
(11,5)
15!/(11!*4!)


but what do i do for 0 =< x1 >= 10?

Solarmew November 20th, 2011 05:39 PM

Re: How many solutions are there to the equation?
 
Quote:

Originally Posted by Solarmew
ok, i figured than one out and also the one for x_i >=2, i = 1,2,3,4,5

it's 21-5*2 = 11
(11,5)
15!/(11!*4!)


but what do i do for 0 =< x1 >= 10?


ahhh... ok... did
364+455+560+680+816+969+1140+133-+1540+1771+2024 = 11649
it works ...

but tried the same approach with

0 =< x1 >= 3
1 =< x4 <4
x3 >= 15

and it didn't work :(
how come?


All times are GMT -8. The time now is 01:55 PM.

Copyright © 2019 My Math Forum. All rights reserved.