Register to reply

Sum of all possible products of elements taken from couples

Share this thread:
Wentu
#1
Dec13-13, 12:11 PM
P: 12
Hello

I have N couples of real numbers higher than 1.
Let's call them like (a0,b0), (a1,b1),...,(aN,bN)
I have a number R <= N.

I need the sum of all the possible products of N elements, chosing one from each couple but exactly R times the "b" element and N-R times the "a" element.
Which is the best way to do it?

As an example:
(2,3), (5,7), (11,13)
N = 3, R = 2
I need 2x7x13 + 3x5x13 + 3x7x11

Thank you!
Phys.Org News Partner Mathematics news on Phys.org
'Moral victories' might spare you from losing again
Fair cake cutting gets its own algorithm
Effort to model Facebook yields key to famous math problem (and a prize)
1MileCrash
#2
Dec13-13, 12:45 PM
1MileCrash's Avatar
P: 1,272
As an expression I think what you want to do is:

[itex]\Sigma^{N}_{k=0} (a_{k}(\Sigma^{N}_{i=0} b_{i}))[/itex]

I have no idea if there is any way to compute this other than just doing it.

EDIT: Nevermind, I see you don't want "sum of all possible products of N+1 elements" but sum of all possible products of a choice of R elements from the N+1 elements. No idea, you're probably going to have to write a program for that.
Wentu
#3
Dec17-13, 01:24 AM
P: 12
I got the answer from "Michael":
It is the coefficient of x^R in (a0+xb0)(a1+xb1)...(aN+xbN)


Register to reply

Related Discussions
Converting volume elements to area elements Calculus & Beyond Homework 2
Question: Can elements above iron actually be clusters of smaller elements? Atomic, Solid State, Comp. Physics 3
Kronecker product on only a few elements in a matrix: How to align resulting elements Linear & Abstract Algebra 0
Orders of products of group elements. Linear & Abstract Algebra 4
Questions concerning cross products, dot products, and polar coordinates Introductory Physics Homework 1