1
$\begingroup$

I have a set of integers $U$ with cardinality $311$ and whose sum is 500 dollars.

I want to group all the elements of this set into three different subsets:

  • The sum of the elements of subset $A$ is $450$ dollars.

  • The sum of the elements of subset $B$ is $30$ dollars.

  • The sum of the elements of subset $C$ is $20$ dollars.

What kind of algorithm could provide me a way to find the correct partitions?

What kind of tool could I use to find the vectors of solution? MS Excel is not capable of solving so many decision variables, even if they're integers. Thank you very much!

$\endgroup$
1
  • $\begingroup$ Do you have a decision problem or an optimization problem? In other words, do you want to determine whether such a partition even exists, or do you want to find the possible partition that is closest to the desired one? $\endgroup$ Commented Jul 28, 2020 at 7:09

1 Answer 1

1
$\begingroup$

Let $b=(450,30,20)$. Let binary decision variable $x_{i,j}$ indicate whether element $i$ appears in set $j$. The constraints are: \begin{align} \sum_j x_{i,j} &= 1 &&\text{for all $i$}\\ \sum_i i x_{i,j} &= b_j &&\text{for all $j$} \end{align}

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .