TITLE: divide a fixed prize among an unknown number of contestants with repect to rank
QUESTION [0 upvotes]: I want to divide a prize, say 1000, among an unknown number of contestants, as determined by their rank in a marathon race. I want the smallest portion to be above zero (so it is worthwhile to compete). So the higher the rank: the higher the prize.
PS, feel free to explain in detail as I am a math noob. Thanks.
PPS, I just made the marathon up to make the problem more familiar, but I guess real marathons actually are not even like that. My application is for a drag and drop stack of user interface elements, for which I want to have a gradient of values according to their sequence, above being higher value, below being lower value.
Update: this was simpler than I thought, and based on the comments, I came to a formula:  
n = number of contestants
P = prize : 1000
r = current contestant rank
p = unknown portion  
p = P(r/(n(n+1)/2))  
But I would like to simplify this formula please if possible, cause I'll use it in programming
edit 2:
I got this far: P(r/(n(n+1)/2)) = 2Pr/(n(n+1))

REPLY [1 votes]: I think it might be interesting to formalize your thought: in fact, you want to distribute a certain amount a money, let's say 1000 (€!). 
As you noticed in your previous message, it is strictly equivalent to create numbers between 0 and 1 and then multiply it by the total amount of money you want to distribute. The number - let's say P(n) - between 0 and 1 corresponds to the proportion of the total amount of money to attribute to the n-th finisher.
Another constraint is that the total amount of money distributed is equal to 1000 which is equivalent as distributing 100% of the money you have: the sum of the proportion must be equal to 1.
Finally, you want the first person to receive more than the second and so on.
In a mathematical way, your question is equivalent to ask which (discrete) probability you can take to fit your constraints: you need to restrict yourself to discrete monotone probability. 
It is a really interesting subject, you might start to study probability to get the intuition behind the object (further study might include measure theory, a fascinating discipline).
{"set_name": "stack_exchange", "score": 0, "question_id": 3184887}