# Quite a complicated formula required...

• Jan 10th 2008, 06:19 AM
andrew2110
Quite a complicated formula required...
Hi all. I'm making a points rewards system as part of a university project and have hit a bit of a problem..

Basically the project is a tournament system where Z number of users can enter and there exists X number of point paying positions. Y is the total points available for the tournament.

I need to be able to distribute the points across X so that the sum of points awarded is equal to Y and such that

Points awarded to player N > Points awarded to player N+1
(ie. first place gets more points than second place)

The only way i've worked out how to do this so far is halfing the amount of points given to each position each time.. So 1st place wins 1/2 the points, 2nd wins 1/4, 3rd 1/8 etc...

However when I get down to rewarding the 14th user with 1/16384th of the total prize pool they dont really get anything at all.

Can anybody think of a better way of distributing score amongst the players?

oh just wanted to add, this i say quite a complicated formula as in its quite complicated by my standards! I've not touched maths seriously since a few courses in my first year of university!
• Jan 10th 2008, 06:24 AM
janvdl
Quote:

Originally Posted by andrew2110
Hi all. I'm making a points rewards system as part of a university project and have hit a bit of a problem..

Basically the project is a tournament system where Z number of users can enter and there exists X number of point paying positions. Y is the total points available for the tournament.

I need to be able to distribute the points across X so that the sum of points awarded is equal to Y and such that

Points awarded to player N > Points awarded to player N+1
(ie. first place gets more points than second place)

The only way i've worked out how to do this so far is halfing the amount of points given to each position each time.. So 1st place wins 1/2 the points, 2nd wins 1/4, 3rd 1/8 etc...

However when I get down to rewarding the 14th user with 1/16384th of the total prize pool they dont really get anything at all.

Can anybody think of a better way of distributing score amongst the players?

oh just wanted to add, this i say quite a complicated formula as in its quite complicated by my standards! I've not touched maths seriously since a few courses in my first year of university!

Why can't 1st get 1/2 ; 2nd gets 1/3 ; 3rd gets 1/4 ... ?

EDIT: My 9:):)th post! :D
• Jan 10th 2008, 06:29 AM
andrew2110
hmmm I might have confused myself doing that example..

but say if the points total is 100..
and we reward the top 3 users only

1st place gets 1/2 = 50 points
2nd place get 1/3 = 33.3 points
3rd place gets 1/4 = 25 points

thats already 108.3 points rewarded when the maximum is 100

my other method of doing:

1st place gets 1/2 = 50
2nd place gets 1/4 = 25
3rd place gets 1/8 = 12.5

obviously doesnt work either now that i've done another example!
• Jan 10th 2008, 06:32 AM
janvdl
Quote:

Originally Posted by andrew2110
hmmm I might have confused myself doing that example..

but say if the points total is 100..
and we reward the top 3 users only

1st place gets 1/2 = 50 points
2nd place get 1/3 = 33.3 points
3rd place gets 1/4 = 25 points

thats already 108.3 points rewarded when the maximum is 100

my other method of doing:

1st place gets 1/2 = 50
2nd place gets 1/4 = 25
3rd place gets 1/8 = 12.5

obviously doesnt work either now that i've done another example!

That would be because $\displaystyle \frac{1}{2} + \frac{1}{3} + \frac{1}{4} = \frac{13}{12}$

You just need to find the formula that equals 1 when added up.

EDIT: The ratio between the points will be given by $\displaystyle 2r - r^n - 1 = 0$ where n = the number of players, AND the 1st prize is 1/2 of the points!

EDIT2: $\displaystyle r - ar^{n} + a - 1 = 0$ is the formula for finding the ratio where n = number of players and a = the points that the first player gets(Like 1/2 or 1/3, etc)
• Jan 10th 2008, 06:41 AM
janvdl
Note that i edited my post, Andrew.
• Jan 10th 2008, 06:49 AM
andrew2110
Just looking at that formula, am very impressed!

$\displaystyle r - ar^{n} + a - 1 = 0$

In this formula if:

n = number of players
a = the points the first player receives

what does r equal?

Sorry if im being a bit thick about this. Im from more of a software engineering background with not so much maths experience :(
• Jan 10th 2008, 06:51 AM
janvdl
Quote:

Originally Posted by andrew2110
Just looking at that formula, am very impressed!

$\displaystyle r - ar^{n} + a - 1 = 0$

In this formula if:

n = number of players
a = the points the first player receives

what does r equal?

Sorry if im being a bit thick about this. Im from more of a software engineering background with not so much maths experience :(

If I were you I would just have this formula double checked... :D I'm prone to make stupid mistakes.

r would equal the ratio between the points.

So if the 1st term is 1/2(or 1/3 or 1/4, etc), then the 2nd term divided by the 1st term must equal r. (You can interpret term as PRIZE)
• Jan 10th 2008, 06:57 AM
andrew2110
Thanks janvdl :)

so if i've understood correctly, after I rearrange that formula to put 'r' on one side and the rest of on the other side, I'll be able to find the ratio between the points?

Its been such a long time since I've dabbled in maths obviously!
• Jan 10th 2008, 06:59 AM
janvdl
Quote:

Originally Posted by andrew2110
Thanks janvdl :)

so if i've understood correctly, after I rearrange that formula to put 'r' on one side and the rest of on the other side, I'll be able to find the ratio between the points?

Its been such a long time since I've dabbled in maths obviously!

As the players increase, it will become increasingly difficult to find r. I suggest you find a static number of players, and then find the formula to calculate the points.
• Jan 10th 2008, 07:05 AM
andrew2110
yea i see what you mean. My problem is that part of the specification is that the tournament must accept any number of entries and reward a prize to the top 1/3rd of the players... So I just need to come up with a formula that can calculate prize division with any number of entries into a tournament which is confusing me quite a bit! Thanks for your help so far though :)
• Jan 10th 2008, 07:06 AM
janvdl
Quote:

Originally Posted by andrew2110
yea i see what you mean. My problem is that part of the specification is that the tournament must accept any number of entries and reward a prize to the top 1/3rd of the players... So I just need to come up with a formula that can calculate prize division with any number of entries into a tournament which is confusing me quite a bit! Thanks for your help so far though :)

Well that formula will give you what you want, but like I said, it will definitely be difficult to find the ratio.