Hello(adsbygoogle = window.adsbygoogle || []).push({});

I have a set of sets of real numbers greater than 1. Each set can have a different quantity of numbers.

Set A1 {a11, a12,...a1m1}

Set A2 {a21, a22, ..., a2m2}

...

Set AN {aN1, aN2, ..., aNmN}

If I want the sum of all possible products that have one element from each set, that's easy: (a11+a12+...+a1m1)x(a21+a22+...+a2m2)x...x(aN1+aN2+...+aNmN).

But what i interested in is the sum of all possible products that have one element from each set BUT if the product is Higher than K, then the product must be included as K, not as its real value.

Short example:

Set A1 (2,3)

Set A2 (7,9)

K = 20

Usual sum = 14 + 21 + 18 + 27

Sum I am interested in: 14 + 20 + 18 + 20

What's the fastest way to calculate it? is it possible to do this with a neat formula or am I forced to cycle over all combinations?

Thankx

Wentu

**Physics Forums - The Fusion of Science and Community**

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Sum of all possible products when each product has a maximum

Loading...

Similar Threads - possible products each | Date |
---|---|

I Sets, Subsets, Possible Relations | Feb 23, 2017 |

A Factoring (Possible) Effect of Dunning-Kruger. | Feb 21, 2017 |

I Possibility theory | Feb 8, 2017 |

B How many possible relations between two sets? | Jun 9, 2016 |

Cartesian product of (possible infinite) family of sets | Apr 4, 2014 |

**Physics Forums - The Fusion of Science and Community**