Dividing amount unequally in tournament winners?

2.3k Views Asked by At

Hi I am trying to write the algorithm to calculate the winning amount of the winners. My problem is as below,

1) I have open ended tournament in which participants can be in ratio of 2 (i.e 2,4,8,16 and so on) 2) I am going to declare 50% or 25% of them as winners for each respective position Ex.- If i have 32 participants then in case of 50% winners my winners are as below,

 Position    Number Of winners
   1st            1
   2nd            1
   3rd            2
   4th            4 
   5th            8

and if i have 25% of winners then winners will be till 4th position

3) Now i want to distribute the winning amount in them unequally as winner of 1st position will get more and then 2nd is little less than 1st and 3rd is little less than 2nd and so on 4) The multiple number of winners on position 3rd on words will get the same amount Ex. If amount to distribute is $800 then in 8 winners then the rough distribution for this will be like as below,

  Position     Number of Winners       Amount for each Winner
     1                 1                      300
     2                 1                      150
     3                 2                       75(Each)
     4                 4                       50 (Each)
                             -------------------------------
                              Total           800

(this is rough calculation we need formula or directions which will help us or guide to how to get the winning amount)

We are trying various methods but we are weak in math so unable to find any formula any help would be great.we are not expecting the exact formula (if have then great) but any direction would be great. Thanks in advance.

Update

I tried this formula

Divide 800 in 8

(X + 4) + (X + 3) + (X + 2) + (X + 1) + (X - 1) + (X - 2) + (X - 3) + (X - 4)

In above case X = 800/8 =100 it will give

104 + 103 + 102 + 101 + 99 + 98 + 97 + 96 = 800.

But now the problem is I have 2 players on 3rd position and 4 players on 4th position, and players on same position must have same prize.

2

There are 2 best solutions below

0
On BEST ANSWER

Assuming that you have $2^n$ players, let $X$ be the amount that the $1$st winner wins and let $K$ be the capital that you want to distribute to the $2^n/2=2^{n-1}$ ($50\%$) or to the $2^n/4=2^{n-2}$ ($25\%$) winners. Then for the $50\%$ case you can solve the equation $$X+2^0\frac X2+2^1\frac X4+2^2\frac X6+2^3\frac X8+2^4 \frac X{10}+\ldots+2^{n-2}\frac X{2\cdot(n-1)}=K$$ and for the $25\%$ case the equation $$X+2^0\frac X2+2^1\frac X4+2^2\frac X6+2^3\frac X8+2^4 \frac X{10}+\ldots+2^{n-3}\frac X{2\cdot(n-2)}=K$$ The equations differ only in the last term and both read as follows

  1. one 1st position winner that takes $X$, term: $X$ and
  2. one 2nd position winner that takes $\frac X2$, term: $2^0 \frac X2$ and
  3. two 3rd position winners that take $\frac X4$ each, term: $2^1\frac X4$ and
  4. four 4th position winners that take $\frac X6$ each, term: $2^2\frac X6$ and
  5. eight 5th position winners that take $\frac X8$ each, term: $2^3\frac X8$ and
  6. $\ldots$ until you reach (a total) of $2^{n-1}$ or $2^{n-2}$ winners.

Of course the above equations simplify substantially since the first equation ($50\%$-case) can be written as: $$\begin{align*}K&=X\left(1+2^0\frac 12+2^1\frac 14+2^2\frac 16+2^3\frac 18+2^4 \frac 1{10}+\ldots+2^{n-2}\frac 1{2\cdot(n-1)}\right)=\\\\&=X\left(1+\sum_{k=0}^{n-2}\frac{2^k}{2(k+1)}\right)=\\&=X\left(1+\sum_{k=0}^{n-2}\frac{2^{k-1}}{(k+1)}\right)\end{align*}$$ which gives $$X=\frac{K}{\left(1+\sum_{k=0}^{n-2}\frac{2^{k-1}}{(k+1)}\right)}=K\cdot\left(1+\sum_{k=0}^{n-2}\frac{2^{k-1}}{(k+1)}\right)^{-1}\tag1$$and the second equation ($25\%$-case) $$\begin{align*}&\phantom{11}X\left(1+2^0\frac 12+2^1\frac 14+2^2\frac 16+2^3\frac 18+2^4 \frac 1{10}+\ldots+2^{n-3}\frac 1{2\cdot(n-2)}\right)=\\\\&=X\left(1+\sum_{k=0}^{n-3}\frac{2^k}{2(k+1)}\right)=\\&=X\left(1+\sum_{k=0}^{n-3}\frac{2^{k-1}}{(k+1)}\right)\end{align*}$$ which gives $$X=\frac{K}{\left(1+\sum_{k=0}^{n-3}\frac{2^{k-1}}{(k+1)}\right)}=K\cdot\left(1+\sum_{k=0}^{n-3}\frac{2^{k-1}}{(k+1)}\right)^{-1}\tag2$$

which can be easily implemented as a computer algorithm (Excel will do) for different values of $K$ and $n$ (you should stipulate them).


The above distribution of the amount $K$ is of course optional. You can use any "weights" that you want to divide the amount $X$. However the above distribution ensures that the amount of each position is "less enough" than the amount of the previous position. If you want to give more to the first position and much less to the other positions, increase the fractions. A good idea to start with is to choose $X$ as a fraction of $K$, for example $K/2$.

In the case that you mention, with $2^n=32=2^5$, $K=800$ the second equation $25\%$-case becomes $$X=800\cdot\left(1+2^0\frac{1}{2}+2^1\frac{1}{4}+2^2\frac{1}{6}\right)^{-1}=800\cdot(6/16)^{-1}=800\cdot(16/6)=300$$ (since $2^2=2^{5-3}=2^{n-3}$ we stop at the term $\frac X6$). As you see, solving the above equation, gives $X=300$ as you have it. For the same $K$ and the same $n$ the first equation yields $$X=800\cdot\left(1+2^0\frac{1}{2}+2^1\frac{1}{4}+2^2\frac{1}{6}+2^3\frac{1}{8}\right)^{-1}=800\cdot(11/3)^{-1}=800\cdot(3/11)=218.18$$ The last result exhibits a disadvantage of the proposed solution which is that the result does not have to be an integer. However, by altering slightly the amount of $K$, say for example $K=803$ the equation yields $$X=803\cdot\frac{3}{11}=219$$

0
On

As tony noted, there are more than one solution to this problem. Let me restate the problem the way I understand it:

You have $2^n$ players. You would like to split the prize money M, between $2^n/2=2^{n-1}$ (in the $50\%$ case) or $2^n/4=2^{n-2}$ (in the $25\%$ case) winners.

With the ecxeption of the 1st position, the number of people on the k-th position is $2^{k-2}$. For the $50\%$ case, the highest $k$ you want to use is $k=n$, for $25\%$ case $k=n-3$. Lets focus on the $50\%$ case from now on

What you are trying to do is find winnings $m_i$ for each position such that $M=m_1+m_2+m_32^{3-2}+m_42^{4-2}+\ldots+m_n2^{n-2}=m_1+m_2+2(m_3+m_42^{4-3}+\ldots+m_n2^{n-3})=m_1+m_2+2(m_3+2(m_4+\ldots+m_n2^{n-4}))$.

This gives us an algorithm for splitting the prize money M (800 in your example):

  1. Choose prize money for the first position, $m_1<M$ and subtract it from $M$, $M=M-m_1$. In your example, you chose $m_1=300$, $M=500$.
  2. Chose prize money for the the second position $m_2<M$ and subtract it from $M$, $M=M-m_2$. In your example, you chose $m_1=150$, $M=350$.
  3. Divide M by two, $M=M/2$, choose prize for k-th position, $m_k<M$ and subtract it from M, $M=M-m_k$. In your example, for $k=3$,you get $M=350/2=175, m_3=75 \text{ and } M = 175-75 = 100$
  4. Repeat 3. until $k=n$ or until you run out of money.

As you can see, you can choose any amount for any position as long as that amount is smaller than the amount of money you have left. You can pick many different strategies for splitting the prize money, for example, people in each position will together get half or quarter the money of the position above them.