Algorithm to optimize redistribution of balls amongst urns

28 Views Asked by At

Here is the question: Say we have k urns with 1 ball in each urn. At each iteration of the game, I pick one urn and redistribute its contents amongst other urns and each urn can receive at most one ball and the urn we selected will need to be empty. Moreover, we can select what urns the balls go into. We have some extra urns if needed (I have not used them though). Our reward is the number of balls from the urn we select for redistribution.

My goal is to find the algorithm (in loose terms, no need for pseudo-code just the idea) which allows to have the highest average reward as the number of itterations goes to infinity. This will imply that if I have at first reward $a_1 , \cdots , a_l$ and then $b$ for infinity, the average will be $b$ as the itterations go to infinity.

So far my best result is an average reward of $r$ for $k=\frac{r(r+1)}{2}$. So this implies that the function of the average reward for $k$ balls is $\frac{-1 + \sqrt{1+8k}}{2}$. Is this the bets possible result?

My reasoning is that for say $k=66$ after a finite number of iterations, I will have $0$ balls in all the urns, except for the last 11, where I have consecutively this distribution: $(0, \cdots , 0 ,11,10,9,8,7,6,5,4,3,2,1)$ So then I can select the urn with $11$ balls and distribute them along all the ones in front and the first urn, we can then always have a reward of $11$. I am not convinced this is the best method though, any insight would help!

Is Does this problem commonly known?