E
E
entermix2016-03-15 15:44:55
Mathematics
entermix, 2016-03-15 15:44:55

How to properly allocate resources?

For example, we have 5 users, each has its own rating:
1 - 0.5
2 - 3.1
3 - 0.7
4 - 2.3
5 - 2.1
Let's say every rand (1.10) minutes a bonus appears, as correct distribute these bonuses depending on the rating?
UPD: Perhaps he gave an incorrect example, you need something like distributing the number of banner ad impressions to users between its advertisers.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey, 2016-03-15
@entermix

1. Take and normalize the sample:
Sum = 8.7
1 - 0.5 / 8.7 = 0.057471264
2 - 3.1 / 8.7 = 0.356321839
3 - 0.7 / 8.7 = 0.08045977
4 - 2.3 / 8.7 = 0, 264367816 5 -
2.1 / 8.7 =
0.24137931 4 - 0.494252873 + 0.264367816 = 0.758620689 5 - 0.758620689 + 0.24137931 = 1 This will be the one whose ad needs to be shown.
those. banners will spin according to the "importance" of the advertisers.
on average, the first will receive 5% of impressions, the second - 35%, the third - 8%, the fourth - 26%, the fifth - 24%. Provided that you have a good random number generator with a uniform probability distribution.

D
Dmitry Kovalsky, 2016-03-15
@dmitryKovalskiy

How would you like to distribute? All the best? Or from each according to his ability to each according to his needs?
If the latter - you can add the ratings together and calculate x= bonus*0.1/summ(rating) - Get the approximate cost of 0.1 rating points. Then multiply this cost by the rating itself and get the real reward of the participant. Only now this is not terver and not high school, but high school mathematics.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question