SlipEternal
Junior Member
- Joined
- Jan 4, 2012
- Messages
- 114
I have solved a problem, but the algorithm is taking too long to process. I was hoping to simplify it a bit. Here is what I know:
\(\displaystyle \sum_{n=0}^{a_1+a_2}{\left(\sum_{i=0}^n{\binom{a_1}{i}\binom{a_2}{n-i}x_1^iy_1^{a_1-i}x_2^{n-i}y_2^{a_2-n+i}}\right)}=(x_1+y_1)^{a_1}(x_2+y_2)^{a_2}\)
Now, for any pair \(\displaystyle (x_i,y_i)\), I know that \(\displaystyle x_i+y_i=c\) where \(\displaystyle x_i, y_i, \text{ and }c\) are all positive integers. I have a function that is supposed to calculate the inner sums (as I am looking for statistical data about these inner sums). So, is there a way to simplify this?
\(\displaystyle \sum_{i=0}^n{\binom{a_1}{i}\binom{a_2}{n-i}x_1^iy_1^{a_1-i}x_2^{n-i}y_2^{a_2-n+i}}\)
Trial and error is not yielding any immediate patterns, and the issue is not when I only have two sets of \(\displaystyle (x_i,y_i)\) but when I have an arbitrarily large number of them.
\(\displaystyle \sum_{n=0}^{a_1+a_2}{\left(\sum_{i=0}^n{\binom{a_1}{i}\binom{a_2}{n-i}x_1^iy_1^{a_1-i}x_2^{n-i}y_2^{a_2-n+i}}\right)}=(x_1+y_1)^{a_1}(x_2+y_2)^{a_2}\)
Now, for any pair \(\displaystyle (x_i,y_i)\), I know that \(\displaystyle x_i+y_i=c\) where \(\displaystyle x_i, y_i, \text{ and }c\) are all positive integers. I have a function that is supposed to calculate the inner sums (as I am looking for statistical data about these inner sums). So, is there a way to simplify this?
\(\displaystyle \sum_{i=0}^n{\binom{a_1}{i}\binom{a_2}{n-i}x_1^iy_1^{a_1-i}x_2^{n-i}y_2^{a_2-n+i}}\)
Trial and error is not yielding any immediate patterns, and the issue is not when I only have two sets of \(\displaystyle (x_i,y_i)\) but when I have an arbitrarily large number of them.
Last edited: