Partitioning values into sets

  • Thread starter nerdjock
  • Start date

I have a problem where I have a set of positive real numbers and must partition this set into two new sets such that:

1. The sum of the values in each set is as close as possible to the sum of the values in the other set. i.e. the difference is as close to zero as is possible.

2. A function f defined over the elements of each set is simultaneously minimized for both sets.

Essentially such that (Absolute value of difference of the sum in each set)+ (Sum of value of function in each set) is as small as possible. One condition may be more important than the other, so weights may be applied to both conditions to signify relative importance.

What techniques could I use for this? It would be great if someone could identify which branch of mathematics this falls under, as I would very much like to learn about it for myself, but am unable to determine were I should be looking.

Thanks very much in advance.


Insights Author
2018 Award
You have two function ##f,g\, : \,S \longmapsto \mathbb{R}_+## and weights, which means a single function ##H\, : \,\lambda f + (1-\lambda)g## which you want to minimize. Depending on the amount of date, a brute force method could be successful. In case you can model your data by a continuous function, a Lagrange multiplier ansatz might work.

Want to reply to this thread?

"Partitioning values into sets" You must log in or register to reply here.

Physics Forums Values

We Value Quality
• Topics based on mainstream science
• Proper English grammar and spelling
We Value Civility
• Positive and compassionate attitudes
• Patience while debating
We Value Productivity
• Disciplined to remain on-topic
• Recognition of own weaknesses
• Solo and co-op problem solving

Hot Threads