# Looking for an algorithm or similar mathematical problem for trading ownerships in shared property

Suppose there is $$N$$ property. Each property is owned by multiple person. (they have shared ownership) For example: $$Person_1$$ owns 22% of $$Property_1$$, $$Person_2$$ owns 35% of $$Property_1$$ and $$Person_3$$ owns 43% of $$Property_1$$. Also every person has shared ownership in multiple property. The number of persons is $$M$$.

The following rules has to be fulfilled:

1. Shared ownership's can be traded between two person.
2. All trade must be fair. The same amount of ownership can be traded E.g: If $$Person_1$$ wants to trade 22% of his ownership from $$Property_1$$ he must get the same amount from $$Person_x$$ $$Property_x$$
3. Partial trades are allowed. E.g: $$Person_1$$ has 35% of ownership in $$Property_1$$ but he can only trade 22% from it, with $$Person_x$$ the 22% is transferred to $$Person_x$$ but the rest 13% is still owned by $$Person_1$$
4. The sum of the shared ownership for each person must be constant. Nobody get rich or poor.

The goal is to concentrate all of the ownerships in the smallest amount of properties with the least amount of trades executed. Every trade execution has a fee, so finding the optimum amount of trades while maximizing the ownership in a single property.

What I'm looking for is a starting algorithm (dosen't matter if it's greedy) or some similar mathematical problem where I can start to work on my own solution.

So far I was able to represent my problem in a matrix with some test data, but I stucked here.

Every column is a property $$Property_1$$ ... $$Property_n$$

Every row is a person $$Person_1$$ ... $$Person_m$$

The values in the matrix is the ownership for each person and property between $$0..1$$

• Welcome to Computer Science! Could you transcribe image into text? – Evil Apr 14 '20 at 21:57
• @evil Thank you so much! I've created an excel file from the test data. Data – szkkteam Apr 15 '20 at 5:33