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 'Video on imaginary numbers and some queries'
Hi, I was watching the following video. I found some points confusing. Could you please help me to understand the gaps? Thanks, in advance! Question 1: Around 4:22, the video says the following. So for those mathematicians, negative numbers didn't exist. You could subtract, that is find the difference between two positive quantities, but you couldn't have a negative answer or negative coefficients. Mathematicians were so averse to negative numbers that there was no single quadratic...
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...

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