Fair division of apartments in combination-redivision projects.
Most code was written by Eitan Lichtman.
Input:
-
$k \in N$ agents,$n \in N$ objects -
Set of object values:
$V = { v_1, v_2, \ldots ,v_n } $ ,$v_i \in \mathbb{N}$ -
Set of agents:
$A={1, \ldots, k}$ -
With corresponding agent rights
${p_1,\ldots ,p_k}, p_i\in\mathbb{R^+}$ s.t.$\sum_{j=1}^k p_i=1$ . -
The relative-entitlement for agent
$i$ is$re_i = sum(V)p_i$ .
Output:
The algorithm will output an allocation as follows,
The balance payment for agent
Target function:
The goal is to minimize
Note that the total of negative balance payments are equal to the total of positive balance payments, and therefore are ignored.
We will present the Complete Greedy Algorithm (CGA) adjusted to combination-redivision. given a group
Like CGA for Min-Dif, CGA for combination-redivision also sorts the numbers in a decreasing order and perform the search in a greedy way (in each iteration we put the next number in the basket with the smallest sum meanwhile). Also, if at any point two partial baskets have the same sum, the next number is only assigned to one of them, to eliminate duplicate nodes.
Now we will explain the differences: CGA for Min-Dif terminates the search when a perfect partition is found with a difference of zero or one because it is definitely optimal. In combination-redivision a result of one is not necessarily optimal. For example, dividing the numbers
Another difference is that instead of the last rule of CGA, we have the following rule: Let
We will present the Integer Linear Programming algorithm adjusted to combination-redivision.
Like ILP for Min-Max we use the following variables: A set of
Given an optimal algorithm
In order to solve the combination-redivision problem for different rights we use the black box method, meaning we show an algorithm with
-
Instead of the baskets starting with a sum of
$0$ , each basket$i$ starts with a sum of:$max(p_1,\ldots ,p_k) (sum(V))-p_i (sum(V))$ . We do this in order to convert the problem to a problem with equal rights by matching all of the baskets to the basket with the maximum right. -
Execute
$A$ with an input of$V$ and the baskets, receiving an output of the numbers from$V$ allocated into the$k$ baskets. -
Subtract
$max{p_1,\ldots ,p_k} (sum(V))-p_i (sum(V))$ (the value that we started with) from each basket$i$ and return the final allocation.