Log:

Results:

Random-Reconcile-Check


Fair can be defined simply as the minimum unjust advantage.

A fair distribution is where, given a list of winners who already picked awards, the difference between the winner with the highest total award value and the winner with the lowest total award value should not be more than any award value picked by the winner with the highest total award value.

Given a number of finite winners and finite awards, a winner should not get more than the other winners unnecessarily (Every winners is entitled to as much as the other winners, the choices should be random and also try to minimise the difference between the highest and the lowest values issued to each winners.).

I developed an algorithm Random-Reconcile-Check

1. Random

Every winner is given a chance to pick atleast one award randomly.

Assumptions:The number of awards is equal or greater than that of winners.

2. Reconcile

winners are first shuffled. Each winner A is then allowed to go checking awards that every other winners B picked. If the sum of awards (award value) by winner B is more than the award value of A, then A checks if B has any award that is less than or equal to the value difference, If any, A picks the awards and moves on to the next winner.

3. Check

The winners are sorted in an ascending order. If the last winner award value is more than the first winner's award value with a value equal to or more than any award the last winner has, then all the winners are forced to reconcile and another check is done.