Find the number of solutions to the equation : x1+x2+x3+x4+x5 = 21 where xi is a non negative integer Provided that 1) 0<=x1<=10 2) x1 is from 0 to 3 , x2 is from 1 to 4, x3 >=15
I know that the standard formula for calculating the number of non negative integral solutions is given by \(\Large C(n+r-1,r-1)\). And I know if there are constraints like \(\Large x_i > \alpha\) then we replace \(\Large x_i\) with \(\Large x_i - \alpha\) .(Hopefully I have these facts right). But I am not sure how to deal with these 2 conditions.
@ganeshie8
Hey you may use generating functions
Can you give a good place to learn that ? :/ my textbook has described it in a complicated way :|
I have a very good tutorial on generating functions, one sec
Here it is http://db.math.ust.hk/notes_download/elementary/algebra/ae_A11.pdf @DLS
1) 0<=x1<=10 you may proceed like this : since \(x_1\) can take values from \(0\) to \(10\), it can be 0 or 1 or 2 or .... or 10 the corresponding factor for \(x_1\) in the generating function is \((x^0+x^1+x^2+\cdots + x^{10})\)
There are no restrictions on other four variables, so the corresponding factor for each of them is \((x^0+x^1+x^2+\cdots)\)
The overall generating function is then given by \[G(x)= (x^0+x^1+x^2+\cdots + x^{10}) (x^0+x^1+x^2+\cdots )^4\]
The answer for part 1 is the coefficient of \(x^{21}\) of \(G(x)\)
Can you think of a way to find the coefficient of \(x^{21}\) of \(G(x)\) ?
oh this thing is called generating functions? :D didn't know that. we can use multinomial theorem maybe?
we don't really need to get all that sophisticated
binomial theorem will do :)
how are you planning to apply binomial here :o
\[G(x)= (x^0+x^1+x^2+\cdots + x^{10}) (x^0+x^1+x^2+\cdots )^4\] How are you planning to avoid binomial theorem here ?
\[G(x)= (x^0+x^1+x^2+\cdots + x^{10}) (x^0+x^1+x^2+\cdots )^4\\~\\ =(\dfrac{1-x^{11}}{1-x}) (\dfrac{1}{1-x})^4 \]
does that look okay to you?
I have just used the partial sum and infinite sum formulas of geometric series
what did you do in the first term :o
\[x^0+x^1+x^2+\cdots + x^{10}\] Notice that this is a geometric series with first term = \(1\) and common ratio = \(x\)
remember the partial sum formula of geometric series ?
oh right! sorry,my bad, yeah got that step!
good, try simplifying that expression a bit
i can proceed now :)
familiar with extended binomial theorem for negative exponents ?
\[G(x)= (x^0+x^1+x^2+\cdots + x^{10}) (x^0+x^1+x^2+\cdots )^4\\~\\ =(\dfrac{1-x^{11}}{1-x}) (\dfrac{1}{1-x})^4\\~\\ = (1-x^{11})(1-x)^{-5} \]
see if that looks okay
yep :)
we can open the bracket now i guess
\[=>(1-x^{11}) - x^{11}(1-x)^5\]
we could apply binomial theorem on the 2nd term :o
yeah that's fine too :)
\[=>(1-x^{11}) - x^{11}(1-x)^5\] how did you get that ?
sorry the power is -5
\[G(x)= (x^0+x^1+x^2+\cdots + x^{10}) (x^0+x^1+x^2+\cdots )^4\\~\\ =(\dfrac{1-x^{11}}{1-x}) (\dfrac{1}{1-x})^4\\~\\ = (1-x^{11})(1-x)^{-5}\\~\\ =(1-x^{11} )(\sum\limits_{k=0}^{\infty}\dbinom{-5}{k} (-x)^k) \]
I meant this..but it isn't required. \[\Large (1-x^{-5}) - x^{11}(1-x^{-5})\]
I thought of writing it like that because the coefficient of x^17 would only come from the 2nd term.
do you mean I meant this..but it isn't required. \[\Large (1-x)^{-5} - x^{11}(1-x)^{-5}\] ?
yeah :P equation editor is trolling me today :/
that looks god as you can see the first term \((1-x)^{-5}\) contains an \(x^{21}\) term and the second term \(x^{11}(1-x)^{-5}\) also contains an \(x^{21}\) term we need to find them both
whats the coefficient of \(x^{21}\) in the expansion of \((1-x)^{-5}\) ?
\[\large C(-5,r)1^r (-x)^{-n-r} => C(-5+r-1,r)(-x)^{-5-r}\]
-5-r = 21 r = -26?
This is the 2nd or 3rd time I happen to use binomial theorem for negative index :|
you're making it way more complicated than it actually is
lol sorry
whats the coefficient of \(x^{21}\) in the expansion of \((1-x)^{-5}\) ? the term is : \(C(-5, 21) (-x)^{21}\)
therefore the coefficient of \(x^{21}\) is simply \(-C(-5, 21)\)
How we evaluate that is another story
ohh..all this is because I haven't got the grip of this topic anymore :/ I had done it in XIIth or so, due to the gap in first year I have totally forgotten it :/ sorry..but I happen to remember it now :)
its all good :) see if you can find the "required" coefficient in second term
\[\Large (1-x)^{-5} - x^{11}\color{red}{(1-x)^{-5}}\]
do we need the coefficient of \(x^{10}\) in that red term ?
yep..we need all such indices which can add up with 11 to produce 21
there is only one number that produces 21 when added to 11
and that number is 10
once you see how all this works, it is a very simple problem actually...
yeah hopefully this would help in clearing alot of questions :| anyway, how do we get to know which all powers will (1-x)^-5 have ?
\((1-x)^{-5} = \sum\limits_{k-0}^{\infty}C(-5, k)(-x)^k\)
as you can see it will have all the powers of x
we're just looking for the coefficient of \(x^{21}\)
I don't know why I'm getting so much confused lol, I get it :D
its okay, read the first 3 pages of the pdf i gave you earlier
ALRIGHT! so we have the coefficient from the 2nd term now.
and the first term as well
just a last step to evaluate that term
what is the coefficient from second term ?
C(-5,10)
+C(-5,21) from the first term
= total answer
Excellent! careful about the signs though
oh yes. there is a (-1)^n hanging around there
only the first term should have it.
\[\Large (1-x)^{-5} - x^{11}\color{red}{(1-x)^{-5}}\] \(x^{21}\) coefficient from first term is \(-C(-5,21)\) \(x^{21}\) coefficient from second term is \(C(-5,10)\) subtract them to get \[-C(-5,21)-C(-5,10)\]
that is our final answer
yep!!
evaluate that
treat that same as a regular binomial coefficient
\[C(n,k) = \dfrac{n(n-1)(n-2)\cdots (n-k+1)}{k!}\]
\[C(-5,21) = \dfrac{-5(-5-1)(-5-2)\cdots (-5-21+1)}{21!}\]
whatever you get
it should simplify nicely though
lets try
\[C(-5,21) = \dfrac{-5(-5-1)(-5-2)\cdots (-5-21+1)}{21!}\\~\\ =\dfrac{(-1)^{21}5(5+1)(5+2)\cdots (5+21-1)}{21!} \]
Oh my! that is same as \[C(-5,21) = \dfrac{-5(-5-1)(-5-2)\cdots (-5-21+1)}{21!}\\~\\ =\dfrac{(-1)^{21}5(5+1)(5+2)\cdots (5+21-1)}{21!}\\~\\ =(-1)^{21}C(5+21-1,~21) \]
that is just a regular binomial coefficient which you can evaluate using ur calculator
That is so awesome! In general do we have below formula to convert negative binomial coefficients to positive : \[C(-n,~r) = (-1)^r C(n+r-1~r)\]
?
ohh..nice :D so did you generalize a formula for negative coefficient btw ? \[\Large (-1)^r C(r-n+1)\]
Now I see... you have tried to use that formula earlier right ?
haha yes :p
Oh my! that is same as \[C(-5,21) = \dfrac{-5(-5-1)(-5-2)\cdots (-5-21+1)}{21!}\\~\\ =\dfrac{(-1)^{21}5(5+1)(5+2)\cdots (5+21-1)}{21!}\\~\\ =(-1)^{21}C(5+21-1,~21)\\~\\ =-C(25,~21) \]
does that look good ?
yeah alot better :D
wolfram says the final answer is 11649 http://www.wolframalpha.com/input/?i=-%28-5+choose+21%29-%28-5+choose+10%29
il let you finish it off :)
Join our real-time social learning platform and learn together with your friends!