Maximum sum of numbers, one from each set, with constraints
June 23, 2014 10:16 PM Subscribe
Working on a personal project, I am running into a number of math problems of the kind described within. I am not a math expert, so I don't know what to call these kinds of problems, so I don't know how to search for information about them.
posted by moonroof to Grab Bag (11 answers total) 2 users marked this as a favorite
Here is an example of the kind of problem I am trying to find the answer to.
There are ten sets of numbers with three numbers each (X, Y, Z).
I want to find the greatest possible sum of (for example) 4 Xs, 2 Ys, and 1 Z
BUT: (for example) If an X is chosen from a set, the Y and Z value from that set cannot be chosen.
My questions are:
Is there a name for these kinds of problems?
Is there a general method to make sure I always find the greatest possible sum, that will work even when the details change? Sometimes I have more sets, sometimes there are more numbers within each set, sometimes more than one number can be taken from inside a set, each problem is different, but I am always trying to calculate the greatest possible sum.
If I haven't been clear, please ask questions, and I will do my best to explain.