How to create a fair distribution algorithm?

126 Views Asked by At

I am even a math noob but need to understand what is the best mathematical formula for fair distribution. The problem statement is as follows:

We choose 2 numbers at a given time to distribute donations at a particular instance in time (The numbers from 1-6500 represent community members ID). The maximum % of the total resource we need to distribute between them is 10% from the overall resource pool. For fair distribution, we are counting the number of days they have served the community continuously. The longest one has served in days gets the appropriate amount of the distribution. I (Being very bad at mathematics come up with the following formula and hope no one will grill me for that :) ). Was looking for some expert to teach me how to come up with an algorithm for that:

            - Fd = Td * (Rn) * (Tp) /100
               Td  = Total number of days
               Rn  = Total Random numbers
               Tp  = Percentage of winning