Assume you are given a set A = {1, 2, ..., m} and a set B = {1, 2, ..., n}, such that each element from the set A has to be assigned to some element from B. The following parameters for each element i from the set A and each element j from the set B are known:
For each fixed i, all values of tij, Tij (for all j's) are different. m and n are integers greater than 0, and the other variables are non-negative real numbers.
Elements from the set A are assigned to elements from B according to their preferences tij (or Tij). For example, if tij < tik (preferences Tij or Tik might be used in any case instead, read further), then element i will be assigned to j rather then k. Out of mn preferences, exactly r of them have to use value of Tij as a value of preference, and remaining mn - r have to use value of tij (which is lower value then Tij).
If element i is assigned to an element j, then the cost Sij is added to the total cost of assignment to element j, i.e., Cj = Cj + Sij. Let Max be the maximum among all costs Cj and Min the minimum among all costs Cj. The goal is to choose which preferences of assignment element i to element j will take the value of Tij, and which preferences will take the value of tij, such that the value of:
I think there is some dynamic programming algorithm, but I'm not sure. Does anybody know how to solve this by DP approach, or any other? It might not be polynomial, however, but I think it is.
Example. Let m = 3, n = 2, i.e. A = {1, 2, 3} and B = {1, 2, 3}. Let r = 2, and matrices S, t and T be given as
|5 9| |1 3| |10 7|
S = |7 1|, t = |4 2|, T = | 5 4|.
|8 4| |3 4| | 9 12|
Solution is equal to 5 in the case of minimizing the value of Max. Similar example might be constructed for minimizing Max - Min.
The problem is NP-hard, which can be shown by reducing Partition to it.
Let's assume we have an algorithm M that solves your problem optimally.
We are given a Partition instance X = {x1, x2, ..., xm} and want to find a partition of S into two subsets with minimum sum difference. Let's define n = 2, Sij = xi, tij = -j, Tij = j. Now we just iterate over all possible r and call M as a subroutine to find the global minimum for Max. We can show that the assignment that results in the minimum Max is an optimal 2-partition of X.
Since you're not working with integer costs but with real costs and since your problem is likely to get harder for n > 2 (we can also reduce Bin packing with n bins to your problem in a straight-forward way), it seems highly unlikely that there exists even a pseudopolyonomial solution for your problem unless P = NP. You should consider using heuristics to get a good approximative solution. A good starting point would be to look at the approximation schemes for Bin packing and try to adapt them to your problem. Maybe a simple first-fit approach is enough for your needs. Two more things you should keep in mind:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With