Sum of all possible products of elements taken from couples

  • Thread starter Thread starter Wentu
  • Start date Start date
  • Tags Tags
    Elements Sum
AI Thread Summary
The discussion focuses on calculating the sum of products from N couples of real numbers, where R elements must be chosen from the "b" values and N-R from the "a" values. An example is provided with couples (2,3), (5,7), and (11,13), where N is 3 and R is 2. The proposed method involves using the coefficient of x^R in the polynomial expansion of the product (a0 + xb0)(a1 + xb1)...(aN + xbN). It is suggested that writing a program may be necessary to compute this efficiently. The conversation highlights a mathematical approach to solving the problem rather than a straightforward calculation.
Wentu
Messages
14
Reaction score
2
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!
 
Mathematics news on Phys.org
As an expression I think what you want to do is:

\Sigma^{N}_{k=0} (a_{k}(\Sigma^{N}_{i=0} b_{i}))

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.
 
Last edited:
I got the answer from "Michael":
It is the coefficient of x^R in (a0+xb0)(a1+xb1)...(aN+xbN)
 
Seemingly by some mathematical coincidence, a hexagon of sides 2,2,7,7, 11, and 11 can be inscribed in a circle of radius 7. The other day I saw a math problem on line, which they said came from a Polish Olympiad, where you compute the length x of the 3rd side which is the same as the radius, so that the sides of length 2,x, and 11 are inscribed on the arc of a semi-circle. The law of cosines applied twice gives the answer for x of exactly 7, but the arithmetic is so complex that the...
Thread 'Unit Circle Double Angle Derivations'
Here I made a terrible mistake of assuming this to be an equilateral triangle and set 2sinx=1 => x=pi/6. Although this did derive the double angle formulas it also led into a terrible mess trying to find all the combinations of sides. I must have been tired and just assumed 6x=180 and 2sinx=1. By that time, I was so mindset that I nearly scolded a person for even saying 90-x. I wonder if this is a case of biased observation that seeks to dis credit me like Jesus of Nazareth since in reality...
Thread 'Imaginary Pythagoras'
I posted this in the Lame Math thread, but it's got me thinking. Is there any validity to this? Or is it really just a mathematical trick? Naively, I see that i2 + plus 12 does equal zero2. But does this have a meaning? I know one can treat the imaginary number line as just another axis like the reals, but does that mean this does represent a triangle in the complex plane with a hypotenuse of length zero? Ibix offered a rendering of the diagram using what I assume is matrix* notation...

Similar threads

Replies
7
Views
3K
Replies
14
Views
3K
Replies
12
Views
2K
Replies
12
Views
2K
2
Replies
80
Views
9K
Replies
4
Views
11K
Back
Top