Sum of all possible products of elements taken from couples

  • Context: Undergrad 
  • Thread starter Thread starter Wentu
  • Start date Start date
  • Tags Tags
    Elements Sum
Click For Summary
SUMMARY

The discussion focuses on calculating the sum of all possible products of elements taken from N couples of real numbers, specifically selecting R elements from the second position of each couple. The example provided illustrates the calculation with couples (2,3), (5,7), and (11,13) for N=3 and R=2, resulting in the expression 2x7x13 + 3x5x13 + 3x7x11. The solution involves finding the coefficient of x^R in the polynomial expansion of (a0 + xb0)(a1 + xb1)...(aN + xbN), which can be computed programmatically.

PREREQUISITES
  • Understanding of combinatorial mathematics
  • Familiarity with polynomial expansion
  • Basic programming skills for implementation
  • Knowledge of mathematical notation and summation
NEXT STEPS
  • Learn polynomial coefficient extraction techniques
  • Explore combinatorial algorithms for product calculations
  • Investigate programming libraries for symbolic mathematics
  • Study the application of generating functions in combinatorics
USEFUL FOR

Mathematicians, computer scientists, and software developers interested in combinatorial calculations and polynomial algebra.

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)
 

Similar threads

  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
  • · Replies 6 ·
Replies
6
Views
3K
  • · Replies 17 ·
Replies
17
Views
3K
  • · Replies 12 ·
Replies
12
Views
2K
  • · Replies 12 ·
Replies
12
Views
2K
Replies
9
Views
3K
  • · Replies 26 ·
Replies
26
Views
1K
  • · Replies 80 ·
3
Replies
80
Views
10K
  • · Replies 2 ·
Replies
2
Views
3K